qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Fail to share Samba directory with guest


From: Jun Koi
Subject: Re: [Qemu-devel] Fail to share Samba directory with guest
Date: Thu, 1 Mar 2012 12:21:15 +0800

On Tue, Feb 28, 2012 at 9:43 AM, Jun Koi <address@hidden> wrote:
> On Tue, Feb 28, 2012 at 12:08 AM, Shu Ming <address@hidden> wrote:
>> On 2012-2-27 17:21, Jun Koi wrote:
>>>
>>> hi,
>>>
>>> on qemu 1.0.1, i am trying to share a host directory with the Windows
>>> guest like below:
>>>
>>> qemu-system-i386 -enable-kvm -m 1000 -net nic,model=rtl8139 -net
>>> user,smb=/tmp img.winxp
>>>
>>> but in the guest, \\10.0.2.4 doesnt show me any shared directory.
>>>
>>> i already run Samba on the host (default configuration).
>>>
>>> did i miss something, or is it a bug??
>>
>>
>> So 10.0.2.4 is your host IP with samba server?   And what's the network the
>> guest belongs to?
>>
>
> according to some network schemes used by Qemu, 10.0.2.4 is the IP of
> the Samba server (DHCP: 10.0.2.2, DNS: 10.0.2.3, Samba: 10.0.2.4)
>
> http://en.wikibooks.org/wiki/QEMU/Networking
>
> i tried \\10.0.2.2, but dont see any share folder, either.

i tested again, and again, but Samba sharing folder never work for me.
meanwhile, my guest can see the folder shared configured in /etc/samba/smb.conf

so this is definitely a bug. perhaps the Samba setting in net/slirp.c is wrong?
the current configuration is like below. i am not experienced with
Samba, so cannot figure out what is wrong.

btw, it seems the Qemu unittest ignore this sharing folder testing?

thanks,
Ju


// from net/slirp.c, function slirp_smb()
       fprintf(f,
            "[global]\n"
            "private dir=%s\n"
            "smb ports=0\n"
            "socket address=127.0.0.1\n"
            "pid directory=%s\n"
            "lock directory=%s\n"
            "log file=%s/log.smbd\n"
            "smb passwd file=%s/smbpasswd\n"
            "security = share\n"
            "[qemu]\n"
            "path=%s\n"
            "read only=no\n"
            "guest ok=yes\n",
            s->smb_dir,
            s->smb_dir,
            s->smb_dir,
            s->smb_dir,
            s->smb_dir,
            exported_dir
            );



reply via email to

[Prev in Thread] Current Thread [Next in Thread]