Wikia

How To Wiki

Howto share data between host and guest OS on Qemu with Samba

Talk0
1,844pages on
this wiki

PrerequisitesEdit

  • you must have a windows OS installed under qemu and to know how to launch it
  • you also need samba installed on your computer
  • we suppose that the directory you want to share is on /mnt/windows and it has all the permissions (chmod a+rwx)

Steps Edit

The following steps have been tested on a Debian GNU/Linux host OS using qemu version 0.8 and samba version 3.0.22

  • add the following to the /etc/samba/smb.conf file on the host OS :
[qemu]
   comment = Windows file space
   path = /mnt/windows
   read only = no
   public = yes

Before you edit your lmhosts file in Windows 98 or 2000 you should be able to access the samba shared resources on the host if you enter the following ip within windows explorer.

\\10.0.2.2
  • if you use windows XP as the guest OS, add the following to the C:\WINDOWS\system32\drivers\etc\lmhosts file :
10.0.2.4 smbserver
  • if you use windows 98 or 2000 as the guest OS, add the following to the C:\WINDOWS\lmhosts file :
10.0.2.2 smbserver
  • restart the samba server :
/etc/init.d/samba restart
  • restart the guest OS with the following option to qemu :
-smb /mnt/windows
  • now you can access the shared directory from the windows explorer :

To use the shared directory :

  • if you use windows XP as the guest OS, open windows explorer and type the location :
\\10.0.2.4\qemu
  • if you use windows 98 or 2000 as the guest OS, open windows explorer and type the location :
\\10.0.2.2\qemu

If the Guest operating system is a linux-based OS, you can mount the share with :

mkdir -p /mnt/share && mount //10.0.2.2/qemu /mnt/share

on the guest OS, into /mnt/share.

See also Edit

Around Wikia's network

Random Wiki