qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Feature request: integrated smb server?
@ 2004-09-02 23:21 David E. Still
  2004-09-03  0:01 ` John R. Hogerhuis
  2004-09-03 21:11 ` Fabrice Bellard
  0 siblings, 2 replies; 9+ messages in thread
From: David E. Still @ 2004-09-02 23:21 UTC (permalink / raw)
  To: QEMU

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

I'm sure that this feature request may be more difficult than it 
sounds, but what would it take to integrate a small smb server into 
qemu's networking code?  Something that would give read and write 
access to the guest OS to a single folder on the host (given proper 
permissions, of course).  The command-line could look something like 
this:

qemu -smb ~/Documents/qemu-share drive.img

I'm recommending smb over other file-sharing methods, say nfs or ftp, 
because most operating systems can easily mount smb shares, where 
Windows only really likes to mount smb shares (thanks, Bill :P ).  Ftp 
would work, but then you need a client to transfer the files.  The 
current tftp patch is a great start for that, but I'd also like to be 
able to write and *install* to the host system.  I'm not suggesting a 
full SAMBA implementation, but just a minimal smb server with little to 
no security to allow read/write to a folder specified at run-time and 
not require a full tun/tap setup to transfer files to the host.

Anyhow, just a suggestion from a satisfied user.

- Stealth Dave
--
David E. Still
Writer/Producer
TripleCat Productions
http://www.triplecatproductions.com

[-- Attachment #2: Type: text/enriched, Size: 1323 bytes --]

I'm sure that this feature request may be more difficult than it
sounds, but what would it take to integrate a small smb server into
qemu's networking code?  Something that would give read and write
access to the guest OS to a single folder on the host (given proper
permissions, of course).  The command-line could look something like
this:


qemu -smb ~/Documents/qemu-share drive.img


I'm recommending smb over other file-sharing methods, say nfs or ftp,
because most operating systems can easily mount smb shares, where
Windows only really likes to mount smb shares (thanks, Bill :P ).  Ftp
would work, but then you need a client to transfer the files.  The
current tftp patch is a great start for that, but I'd also like to be
able to write and *install* to the host system.  I'm not suggesting a
full SAMBA implementation, but just a minimal smb server with little
to no security to allow read/write to a folder specified at run-time
and not require a full tun/tap setup to transfer files to the host.


Anyhow, just a suggestion from a satisfied user.


- Stealth Dave

--

<bold>David E. Still</bold>

<smaller>Writer/Producer</smaller>

<bold><color><param>8080,0000,8080</param><bigger>TripleCat Productions</bigger></color></bold>

<color><param>8080,0000,8080</param>http://www.triplecatproductions.com</color>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Feature request: integrated smb server?
  2004-09-02 23:21 [Qemu-devel] Feature request: integrated smb server? David E. Still
@ 2004-09-03  0:01 ` John R. Hogerhuis
  2004-09-03  1:20   ` David E. Still
  2004-09-03 21:11 ` Fabrice Bellard
  1 sibling, 1 reply; 9+ messages in thread
From: John R. Hogerhuis @ 2004-09-03  0:01 UTC (permalink / raw)
  To: qemu-devel

On Thu, 2004-09-02 at 16:21, David E.Still wrote:
> what would it take to integrate a small smb server intoqemu's
> networking code? 

A lot. Having implemented a NetBT stack and read a lot about SMB in a
past life, there's no such thing as a small SMB server; it's a complex
layered set of protocols. You would have to integrate Samba if you
really wanted to do this feasibly.

Curious, what is your need? As you say, most OS's can mount and expose
SMB shares. That means that the guest can already do what you want. Why
not just expose an SMB share in the guest and mount it over the network?
VmWare's integrated SMB server is one of the bits of evil in it; I've
had issues with VmWare's various services that it installs interfering
with the real thing...

The argument you could make for such a feature is zero setup to do. Just
start the guest, and QEMU exposes the file transfer service. The guest
doesn't know anything about it. The user doesn't have to set anything
up.
> beable to write and *install* to the host system.  I'm not suggesting 

What do you mean by install? Don't installers usually have to access the
registry?

There was a thread a little while back that discusses your suggestion.
Fabrice decided that FTP was the way to go over HTTP or SMB, since it is
simple and clients are readily available. One thing to understand is
that the last mile to the guest's disk is a tricky thing. Operating
systems tend to make the assumption that they have exclusive access to
filesystems they have mounted. So read-only access is probably the best
you can hope for without living very dangerously. 

On Windows, if you really want to be able to write to the host file
system, you should probably go through SMB to do it. Then all the
authentication, arbitration, perimissions, decryption, etc. is done by
the host OS. And if you believe that, then you have to set up an SMB
client to talk to Window's SMB server anyway. So embedding an SMB server
wouldn't save any work.

Of course there could be simplifying assumptions I'm missing that could
take SMB out of the equation. I'm interested to hear those from
others...

-- John.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Feature request: integrated smb server?
  2004-09-03  0:01 ` John R. Hogerhuis
@ 2004-09-03  1:20   ` David E. Still
  2004-09-03  1:46     ` John R. Hogerhuis
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: David E. Still @ 2004-09-03  1:20 UTC (permalink / raw)
  To: QEMU

> On Thu, 2004-09-02 at 16:21, David E.Still wrote:
>> what would it take to integrate a small smb server intoqemu's
>> networking code?
>
> A lot. Having implemented a NetBT stack and read a lot about SMB in a
> past life, there's no such thing as a small SMB server; it's a complex
> layered set of protocols. You would have to integrate Samba if you
> really wanted to do this feasibly.

I kind of figured this might be the case, but I thought it wouldn't 
hurt to ask. :)

> Curious, what is your need? As you say, most OS's can mount and expose
> SMB shares. That means that the guest can already do what you want. Why
> not just expose an SMB share in the guest and mount it over the 
> network?
> VmWare's integrated SMB server is one of the bits of evil in it; I've
> had issues with VmWare's various services that it installs interfering
> with the real thing...

My "need" is for the guest OS to be able to read/write files in a 
folder on the host OS.  FTP can do it, but smb would be "easier" in the 
sense that the guest would see it as just another mounted disk.

> The argument you could make for such a feature is zero setup to do. 
> Just
> start the guest, and QEMU exposes the file transfer service. The guest
> doesn't know anything about it. The user doesn't have to set anything
> up.

Yes, it's largely an ease-of-use issue.  I run QEMU on Mac OS X and 
Mandrake 10.0 (x86), but I have yet to be able to successfully 
configure a tun/tap network connection, which would probably allow me 
to use a smb share between the host and guest.  I've tried on and off 
ever since I discovered bochs a couple of years ago, but I could never 
quite get it to work.  User networking in QEMU is just so much easier.  
I'm spoiled! :)

>> beable to write and *install* to the host system.  I'm not suggesting
>
> What do you mean by install? Don't installers usually have to access 
> the
> registry?

As I said, I run Mandrake 10.0 on my home computer.  I haven't had any 
Windows partitions for years, but I still like to fire up an 
occassional game using using WINE (either plain or Transgaming's 
Cedega/WineX).  I've discovered that some games will run fine, but have 
great difficulty with the installation process.  If I can install the 
the SMB share by running Win98 in QEMU, then I can attempt to run the 
binary installation using WINE.  FTP over QEMU's networking tends to be 
rather slow (I've done it using non-host computer on the LAN).  I 
completely understand that software installed on a virtual machine 
won't completely install on the host (i.e., with registry settings, 
etc.).

> There was a thread a little while back that discusses your suggestion.
> Fabrice decided that FTP was the way to go over HTTP or SMB, since it 
> is
> simple and clients are readily available. One thing to understand is
> that the last mile to the guest's disk is a tricky thing. Operating
> systems tend to make the assumption that they have exclusive access to
> filesystems they have mounted. So read-only access is probably the best
> you can hope for without living very dangerously.
>
> On Windows, if you really want to be able to write to the host file
> system, you should probably go through SMB to do it. Then all the
> authentication, arbitration, perimissions, decryption, etc. is done by
> the host OS. And if you believe that, then you have to set up an SMB
> client to talk to Window's SMB server anyway. So embedding an SMB 
> server
> wouldn't save any work.

Embedding an SMB server would save the need for a tun/tap connection, 
which, historically, has been the bane of my virtual networking 
existence. :P  User networking in QEMU has always "just worked."  
(Yeah, I'm getting spoiled by my Mac. ;) )

> Of course there could be simplifying assumptions I'm missing that could
> take SMB out of the equation. I'm interested to hear those from
> others...
>
> -- John.

If the cost (in this case development time) greatly outweighs the 
benefits (easy file sharing between guest and host), then I can 
certainly accept that.

- Stealth Dave

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Feature request: integrated smb server?
  2004-09-03  1:20   ` David E. Still
@ 2004-09-03  1:46     ` John R. Hogerhuis
  2004-09-03  1:57     ` Ng Pheng Siong
  2004-09-03  8:50     ` Laurent Amon
  2 siblings, 0 replies; 9+ messages in thread
From: John R. Hogerhuis @ 2004-09-03  1:46 UTC (permalink / raw)
  To: qemu-devel

David,

So it would seem that the real issue is that user mode networking isn't
seamlessly passing your SMB traffic.

Given that user mode networking is a lot like going through a NAT box,
what needs to be done is some port forwards for NetBT ports (gosh it's
been a while... TCP 137,138,139? Same for UDP ports? Anyway it's defined
in RFC 1001, 1002).

I think port forwarding has actually just been added, or at least talked
about on the list.

IIRC, however, somewhat more than just port forwarding needs to be done
to pass NetBT through a NAT. We need an ALG (application level gateway)
specific to NetBIOS over TCP (NetBT) since some parts of the packets
need to be rewritten (NATed) beyond just the headers for file sharing to
work right.

Am I on target here? If NetBT "just worked" through user mode I think
you'd have what you want.

-- John.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Feature request: integrated smb server?
  2004-09-03  1:20   ` David E. Still
  2004-09-03  1:46     ` John R. Hogerhuis
@ 2004-09-03  1:57     ` Ng Pheng Siong
  2004-09-03  8:50     ` Laurent Amon
  2 siblings, 0 replies; 9+ messages in thread
From: Ng Pheng Siong @ 2004-09-03  1:57 UTC (permalink / raw)
  To: qemu-devel

On Thu, Sep 02, 2004 at 06:20:47PM -0700, David E. Still wrote:
> My "need" is for the guest OS to be able to read/write files in a 
> folder on the host OS.  FTP can do it, but smb would be "easier" in the 
> sense that the guest would see it as just another mounted disk.

I run Samba on my FreeBSD host and the Win98 guest mounts its shares. Works
fine. I've always used user-mode networking, never tried tun/tap. 

> As I said, I run Mandrake 10.0 on my home computer.  I haven't had any 
> Windows partitions for years, but I still like to fire up an 
> occassional game using using WINE (either plain or Transgaming's 
> Cedega/WineX).  

Ah, so you want to mount the guest's shares from your host, to run your
game's installer under WINE directly from the guest's disk?  You can try
copying the game installer over from the guest to the host, and run the
installer directly on the host, instead.


-- 
Ng Pheng Siong <ngps@netmemetic.com> 

http://firewall.rulemaker.net -+- Cisco PIX & Netscreen Config Version Control 
http://sandbox.rulemaker.net/ngps -+- M2Crypto, ZServerSSL for Zope, Blog

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Feature request: integrated smb server?
  2004-09-03  1:20   ` David E. Still
  2004-09-03  1:46     ` John R. Hogerhuis
  2004-09-03  1:57     ` Ng Pheng Siong
@ 2004-09-03  8:50     ` Laurent Amon
  2 siblings, 0 replies; 9+ messages in thread
From: Laurent Amon @ 2004-09-03  8:50 UTC (permalink / raw)
  To: qemu-devel

Selon "David E. Still" <dave@triplecatproductions.com>:


> My "need" is for the guest OS to be able to read/write files in a
> folder on the host OS.  FTP can do it, but smb would be "easier" in the
> sense that the guest would see it as just another mounted disk.

With OS X as host and Win98 as guest, I just recompiled qemu with the slirp
patch posted a few days ago, and was able to use SMB to mount a share served by
SAMBA on my host using user-et (so no tun/tap needed). There are a couple
caveats, though:
1 is that Win98 will always serve the same username and the samba "usernames"
directive in the standart samba with 10.3.5 doesn't seem to work (I have had to
use "username map".
2 is that you *need* network connectivity and a defined DNS (so you can't use it
with a "no-network" OSX network location -- empty resolv.conf file). I'll have a
look into it somewhen if it is not above my rusty capabilities since it is a
need of mine.

On an unrelated subject (the development schedule one) it might be a good idea
to have at least an idea of what the consensus on the list is for needed
features. Maybe put that on the Wiki or somewhere.

As I want to use it as a poor man's VirtualPC (on OSX), and in the meanwhile
waiting for Darwine to integrate it I would vote for :
- Implementation of MMX/Altivec
- Everything that can bring more performance, especially on OSX (easiest thing
would be to upgrade my TiBook/400 :-)
- Better keyboard support, especially of a 104-key keyboard. Reg. support of the
keyboard on OSX is awful. I got it it to work better(patch is on the list), but
it is not perfect yet. It would need a new keyboard definition for Win98, but I
don't have anything to do it.
- Faster drawing code (SDL needs to be patched or dispensed from altogether).
Fabrice suggested a while back that we write an API with primitives that could
directly map from an emulated card capabilities to the host primitives.
- Support of live device cdroms on OSX. It's halfway there. The device can be
mounted but is not recognized as a data CDROM but rather as audio (the image
from the cdrom is, however).
- Support of USB devices.


I recognize that I have no say over the development except for what I do myself,
but most of it is beyond my capacities. This is just my personal wish list. I'd
like to see

This might well be better on the qemu-user list, but it does not work. I haven't
tried lately, but I am subscribed but have yet to receive anything from it and
the test I send a while back bounced.

Thanks for listening to be, and I would also add that it is not my feeling that
this list is hostile to newbies (or people who used to develop but haven't
written a line of code in years and still think they are entitled :-)

Regards,

Lga.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Feature request: integrated smb server?
  2004-09-02 23:21 [Qemu-devel] Feature request: integrated smb server? David E. Still
  2004-09-03  0:01 ` John R. Hogerhuis
@ 2004-09-03 21:11 ` Fabrice Bellard
  2004-09-03 21:23   ` Derek Fawcus
  2004-09-03 21:45   ` John R. Hogerhuis
  1 sibling, 2 replies; 9+ messages in thread
From: Fabrice Bellard @ 2004-09-03 21:11 UTC (permalink / raw)
  To: qemu-devel

David E.Still wrote:
> I'm sure that this feature request may be more difficult than it sounds, 
> but what would it take to integrate a small smb server into qemu's 
> networking code? Something that would give read and write access to the 
> guest OS to a single folder on the host (given proper permissions, of 
> course). The command-line could look something like this:
> 
> qemu -smb ~/Documents/qemu-share drive.img
> 
> [...]

I am working on a very simple solution to support that...

Fabrice.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Feature request: integrated smb server?
  2004-09-03 21:11 ` Fabrice Bellard
@ 2004-09-03 21:23   ` Derek Fawcus
  2004-09-03 21:45   ` John R. Hogerhuis
  1 sibling, 0 replies; 9+ messages in thread
From: Derek Fawcus @ 2004-09-03 21:23 UTC (permalink / raw)
  To: qemu-devel

On Fri, Sep 03, 2004 at 11:11:35PM +0200, Fabrice Bellard wrote:
> David E.Still wrote:
> > I'm sure that this feature request may be more difficult than it sounds, 

> > Something that would give read and write access to the 
> > guest OS to a single folder on the host (given proper permissions, of 
> > course).
> 
> I am working on a very simple solution to support that...

and I'm working on a complex solution to support that...

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] Feature request: integrated smb server?
  2004-09-03 21:11 ` Fabrice Bellard
  2004-09-03 21:23   ` Derek Fawcus
@ 2004-09-03 21:45   ` John R. Hogerhuis
  1 sibling, 0 replies; 9+ messages in thread
From: John R. Hogerhuis @ 2004-09-03 21:45 UTC (permalink / raw)
  To: qemu-devel

On Fri, 2004-09-03 at 14:11, Fabrice Bellard wrote:

> I am working on a very simple solution to support that...
> 

OK, I'll bite...  what is your solution?

-- John.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-09-03 21:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-02 23:21 [Qemu-devel] Feature request: integrated smb server? David E. Still
2004-09-03  0:01 ` John R. Hogerhuis
2004-09-03  1:20   ` David E. Still
2004-09-03  1:46     ` John R. Hogerhuis
2004-09-03  1:57     ` Ng Pheng Siong
2004-09-03  8:50     ` Laurent Amon
2004-09-03 21:11 ` Fabrice Bellard
2004-09-03 21:23   ` Derek Fawcus
2004-09-03 21:45   ` John R. Hogerhuis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).