Create Account

Username
Password
Remember me
Email
 
0

Need help setting up SAMBA/NFS/? with Virtual Box (Windows Home/Ubuntu Guest).

9 comments, 3521 views, posted 2:19 pm 12/09/2011 in Linux & Open Source by marksyzm
marksyzm has 10244 posts, 995 threads, 1087 points, location: Oxford, United Kingdom
3.14159 x 1337% = 42

I'm totally stuck with this at the moment. I simply can't get my Windows 7 host to see my Samba network - even if I have it set to a Host only network, NAT or bridged... WTF?

I installed SAMBA and WinBind, they're definitely up and running, and as I'm doing this on a laptop I lose the wireless connection on Host only network setting so maybe I have to use an ethernet connection in order for it to work... or does bridged network do the same?
Would I be able to do this with Guest Additions shared directory instead?

All I need is to set up my web folder to be visible on the network, but I can't find a decent tutorial in order to do this!

Comments

1
4:32 pm 12/09/2011

FlyOnTheWall

Don't know if this will help at all, but:

Have you enabled Network Discovery on the Windows 7 Host?
Can you ping the IP of the guest from the host?

Typically I would use the NAT option for the NIC in the VBox settings, as this then uses your NIC to communicate both with the Guest OS, as well as the Tinterwebz, etc.

The Guest Additions shared directory is used to share a Host folder with the guest, not the other way round...

I have not tried this type of sharing myself though... I will play a bit at a stage - put in the meantime, keep googling for your issue - I don't know when I will get round to this myself...


1
4:42 pm 12/09/2011

Edorph

I've only used the guest additions' shared directory thingy for sharing folders, which works nice.

I do have a web server running in my guest though, using NAT for networking. What happens when you telnet to the guest's smb port? Are you getting through to it at all?

0
4:55 pm 12/09/2011

marksyzm

Now I've got loads of questions...

Quote by FlyOnTheWall:
The Guest Additions shared directory is used to share a Host folder with the guest, not the other way round...


I meant that way around too in that scenario, thinking maybe I could set up an alias to that shared directory and set up an alias in the webserver. Ideally I would want this set to the HTML document root. I heard that you don't get executable priviledges on this though? Or would it take on the permissions of the directory it's aliased to?

Quote by FlyOnTheWall:
Can you ping the IP of the guest from the host?


How do you get the IP of the guest? I tried ifconfig and that brings up 10.0.2.15 which I couldn't see when I tried SSH'ing in but I didn't try pinging that one yet. I'll have a look at that later... I didn't have much time to test this all out to be fair. Obviously I need to be pinging all those ports I'm connecting to.

Quote by FlyOnTheWall:
Have you enabled Network Discovery on the Windows 7 Host?


I'm pretty sure I've got network discovery on although having said that it's a new laptop so I don't think I set everything up - good thinking! I can see the other computers in the house though but maybe that's just windows default settings.

Is NAT the equivalent of host interface?

I think what I might do rather than all this is to ideally set it up so the router sees it directly i.e. with DHCP - you think this is a good idea? Here's the guide I got on it: http://r3dux.org/2009/09/how-to-make-virtualbox-use-your-routers-dhcp-to-get-an-ip-address-in-linux/

0
6:03 pm 12/09/2011

FlyOnTheWall

Permissions will be based on the "shared" permissions set in the Guest Folders as well as the NTFS permissions set within Windows itself. The most restrictive of the two will apply. Remember that you will have to connect to the shared folder using a valid UN/Pwd combination for the Windows guest - create a test account in Windows and use those credentials when connecting from Ubuntu.
Ifconfig will give you the Ubuntu host's IP addy. Use NAT on the VBox interface and see if your host can ping to the guest - it should afaik - I will test tonight (you have now made me think and wonder - I usually just fiddle till stuff works - techie geek here.. )

When you select NAT, the hosts receive IP addies from the "DHCP Server" within the virtual network. All traffic outbound is then translated to the Host's IP addy and forwarded onto the real network - the Virtual NAT generates its own NAT tables. All return traffic will be sent to the actual NIC on your host, retranslated and forwarded to the virtual network hosts.

The Host Interface setting will reserve that physical interface to the guest - basically you are then using your physical NIC as if it is the NIC on the guest.

You have now piqued my curiosity - will have to play tonight (now where did I save those VMs - I have one or two Ubuntu VMs stored somewhere on my server... or did I delete them...)


0
6:20 pm 12/09/2011

marksyzm

It gave me 10.0.2.15 which is the same on all guests as far as I saw (windows, linux, fedora)

I'm going to try again - it might be that stupid network discovery thing

0
10:36 pm 12/09/2011

marksyzm

I got it working with the shared folders! I didn't really do much to be honest... I tried setting it up so the network could see it but noticed that the router could see it's IP address so I tried ssh-ing into that and it worked! Still couldn't get samba up though.
I was a bit puzzled and tried just creating a shared folder when it told me that with Linux guests you have to mount them manually so I did that with full read/write and it now creates those files as root which will do me as I just need it for a local server. I can see the hostname on devices too via a browser. Perfect.

0
10:37 pm 12/09/2011

marksyzm

Oh I had to set it to bridged to get the hostname to work.

0
8:27 am 13/09/2011

FlyOnTheWall

Good man! Didn't have time to play myself - was tasked to perform other duties at home. Will still play soon though! hahaha

0
10:02 am 13/09/2011

marksyzm

Hmmm... seems I do have to force it to see the network though, after a shutdown. I think I'll have to add a bash script on boot then to fix that. I also have to manually reconnect the drives which might prove annoying. Back to pursuing the Samba connection then

Add Comment

Log in via teoti, or register to add a comment!