Shared folder vs Network Sharing Guest Windows 2016

Discussions related to using VirtualBox on Windows hosts.
Post Reply
PeterJ83
Posts: 2
Joined: 26. Sep 2018, 23:59

Shared folder vs Network Sharing Guest Windows 2016

Post by PeterJ83 »

My Guest is Windows 2016 Server and I have created a C:\my_share folder with a Guest account
I use a VirtualBox Host-Only network adapter with fixed ip addresses in the VM and on the host on the same subnet.
Any other network adapters are not connected to anything
I have created a network share on my VM, but my Windows 10 Pro says in settings->Network and Internet->Ethernet "no connection"
But of course Ethernet is not the same as a virtual network adapter.
Anyway I cannot share why not?
First when I used Oracle Virtual Box shared folders feature, I could get it to work.

Another way around was doing a bridge setup with my Ethernet adapter and that worked, but it required physical connection to minimum a switch. Why is that?
Am I doing anything wrong?
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Shared folder vs Network Sharing Guest Windows 2016

Post by BillG »

Either method should work, but it depends on what you want to do. VirtualBox shared folders do have limitations, so if you want to do anything complex, Windows file sharing would be better. Windows file sharing is a network file share system so the host and guest need to be in the same network. VirtualBox sharing does not require a network connection between host and guest (but it does require the guest additions installed in the guest.
Bill
PeterJ83
Posts: 2
Joined: 26. Sep 2018, 23:59

Re: Shared folder vs Network Sharing Guest Windows 2016

Post by PeterJ83 »

It is not that simple. If I use "VirtualBox Host-Only network" my Windows 10 will say, that there is no network connection at all, and its "firewall/file sharing/discovery" will be set to public, and it cannot map the shared folder. It uses only Ethernet and Wi-Fi adapters to decide whether there is a network connection or not.
As soon it detects an identified connection it will go in private mode. People just don't realise that, because they usually have a private connection to the internet.
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Shared folder vs Network Sharing Guest Windows 2016

Post by BillG »

That is correct, but that is a Windows problem, not VirtualBox. Windows sees the host only network as an unidentified network (because it does not have a default gateway). Unidentified networks are made public by default, blocking file sharing. This topic comes up often in the Technet networking forums.

I always use bridged networking and Windows file and printer sharing for PC and server vms (unless I have a workgroup or domain in an internal network with no access to the host).
Bill
Post Reply