Skip to contentSkip to conversation

how can i mount a folder as a qemu disk?

Qemu-devel Paulo Silva 5 participants 6 messages Mar 22, 2009 – Mar 27, 2009

lore
Share & tools
lore
#0 lore raw

Hi!
How can i mount a folder as a disk, just like what UAE and Basilisk2 does? This is very useful for me, for transfering stuff between the root operating-system and the emulated one, and vice-versa
cheers,
Paulo

#1 lore raw
Quoted 6 lines · Paulo Silva

Hi!
How can i mount a folder as a disk, just like what UAE and Basilisk2 does? This is very useful for me, for transfering stuff between the root operating-system and the emulated one, and vice-versa
cheers,

Look up the -smb option in the docs.

Signature · 1 line
error compiling committee.c: too many arguments to function
#2 lore raw
Quoted 1 line · Avi Kivity

Look up the -smb option in the docs.

Last time I tried it, -smb doesn't work any more because Samba can no longer be run standalone by a normal user on current distros - it has hard coded paths to /var/something-or-other which you can't override.

-- Jamie

#3 lore raw

thanking the all answers so far (and expecting for more indeed) as far i didn't have samba installed yet (lazyness), and i confess i'm not that skilled to configure networks...

for this, i would suggest qemu having a folder mounting as imagedisk, just like happened on UAE and Basilisk, and making us able to emulate operating systems not having network support, and with an easy access to the base operating system files - and this situation like 'sometimes works and sometimes don't, because samba lack of support', would be very annoying being so dependant to that issues...

would be interesting if, when we set in the command line, a directory instead of a imagedisk ( like '-hdc ~/.qemu/hd/' instead of '-hdc ~/.qemu/hd50mb.img'), would be very interesting... - if UAE and Basilisk can do that, i think Qemu could do as well - maybe getting some code from there? (sorry not being that skilled on C coding, i really wanted to help on it....)

thanks!

Quoted 11 lines · Jamie Lokier
Quoted 1 line · Avi Kivity

Look up the -smb option in the docs.

Last time I tried it, -smb doesn't work any more because Samba can no longer be run standalone by a normal user on current distros - it has hard coded paths to /var/something-or-other which you can't override.

-- Jamie

#4 lore raw

Am Sonntag, 22. März 2009 18:43:51 schrieb Paulo Silva:

Quoted 11 lines

thanking the all answers so far (and expecting for more indeed) as far i didn't have samba installed yet (lazyness), and i confess i'm not that skilled to configure networks...

for this, i would suggest qemu having a folder mounting as imagedisk, just like happened on UAE and Basilisk, and making us able to emulate operating systems not having network support, and with an easy access to the base operating system files - and this situation like 'sometimes works and sometimes don't, because samba lack of support', would be very annoying being so dependant to that issues...

Quoted 6 lines

would be interesting if, when we set in the command line, a directory instead of a imagedisk ( like '-hdc ~/.qemu/hd/' instead of '-hdc ~/.qemu/hd50mb.img'), would be very interesting... - if UAE and Basilisk can do that, i think Qemu could do as well - maybe getting some code from there? (sorry not being that skilled on C coding, i really wanted to help on it....)

I'm not sure about the current state of vvfat in qemu 0.10.1, but its purpose is to create a virtual drive out of a folder of the host system. Which sounds very much like the thing you want to do.

With regards,
Jan

#5 lore raw
In reply to Paulo Silva
Quoted 6 lines · On Saturday 21 March 2009 21:02:25 Paulo Silva wrote:

Hi!
How can i mount a folder as a disk, just like what UAE and Basilisk2 does? This is very useful for me, for transfering stuff between the root operating-system and the emulated one, and vice-versa
cheers,
Paulo

Well, there's always sshfs:

http://fuse.sourceforge.net/sshfs.html

If you're stuck emulating windows and you don't mind it being A) read only, B) horribly inefficient, you can try the virtual FAT support:

http://www.nongnu.org/qemu/qemu-doc.html#SEC25

Note that's got some serious rough edges. Specifically, if you _don't_ mount that read only, and your kernel accidentally tries to write to it, the device behaves badly. (My emulated linux kernel went into an endless loop due to a dropped interrupt or some such. No idea what windows would do, I haven't got one..)

Rob