0

Following on from my previous question: Can I share a folder from ubuntu VM to windows host

I want to share a folder on my virtualbox ubuntu 18.04, so that my windows 10 can read/write to one of my working directories.

Nothing I am trying seems to be working very well. I have been reading: Using Samba to share a folder from a Linux guest with a Windows host in VirtualBox + links on from there and also this: https://www.geeksforgeeks.org/create-shared-folder-host-os-guest-os-virtual-box/

What I have done so far:

In ubuntu (guest): - sudo apt-get install samba - sudo vim /etc/samba/smb.conf - wins support = yes - interfaces = 127.0.0.0/8 192.168.250.250/24 - usershare allow guests = yes - sudo ufw disable (disable firewall) - Right click /home/user/development (in the file manager) -> local network share: - tick Share this folder - tick both boxes (allow create/delete + guest access) - note I can see the green / red <-- --> share icon on this folder

On ubuntu virtualbox settings: - NAT network adapter (for internet access) - 10.0.2.15 inside the Ubuntu guest - 192.168.71.1 on windows host - Host-only adapter (for folder sharing only) - 192.168.250.250 inside the Ubuntu guest - 192.168.56.103 on windows host

On windows: - no actions take here yet, but windows IP address is: 192.168.1.108

Here is what I can/can't do from the windows host:

  • Can not ping 10.0.2.15 - timeout
  • Can ping 192.168.71.1
  • Can not ping 192.168.250.250 - timeout
  • Can ping 192.168.56.103
  • In windows explorer: \\10.0.2.15 - cannot access check spelling etc...
  • In windows explorer: \\192.168.71.1 - takes me to my windows shared folders
  • In windows explorer: \\192.168.250.250 - cannot access check spelling etc...
  • In windows explorer: \\192.168.56.103 - takes me to my windows shared folders
  • In windows explorer: \\10.0.2.15\development - cannot access check spelling etc...
  • In windows explorer: \\192.168.71.1\development - cannot access check spelling etc...
  • In windows explorer: \\192.168.250.250\development - cannot access check spelling etc...
  • In windows explorer: \\192.168.56.103\development - cannot access check spelling etc...

Here is what I can do on the Ubuntu VM:

  • Can ping windows box ip address: 192.168.1.108
  • Can access the internet
  • I can acceess smb://homegroup/ -> smb://user-virtualbox/ and see my development folder.

Now I am not sure what to do or how to progress from here.

code_fodder
  • 1,687

1 Answers1

-1

So, it turns out that one of the methods of setting up a samba share (I can't find the link now) was telling my to setup a static IP address inside the VM for my host-only connection.

I just read another article that suggested that I use DHCP. I reset the connection to DHCP and then I was able to ping my host-only ethernet adapter from windows to my VM. Then after a little bit of tweaking I was able to setup the samba share.

I don't really understand why that did not work (with the static IP address), but just happy that DHCP fixed it!

code_fodder
  • 1,687