Help With Host Only Networking

Discussions related to using VirtualBox on Windows hosts.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Help With Host Only Networking

Post by saberman »

Hosts: Windows 7 Ultimate x64
Guests:
Windows 7 Ultimate x64
Windows XP Professional

On the Hosts:
V:\VirtualBox\Shared
V:\VirtualBox\Users
V:\VirtualBox\<all of the VirtualBox folders (i.e. Machines, Drives, etc.)

Periodically the contents of the V:\VirtualBox folder (and sub folders) is copied to a different host.

I need to make the Shared and Users folders available to the guests. If I used a Bridged network and Windows networking the VMs' mappings to the folders have to be redone because the hosts have different names. For example, if the copy is done from Host1 to Host2 the mapping for the S: drive has to change from \\Host1\Shared to \\Host2\Shared.

I tried to use VirtualBox's shared folders as the S: drive would be mapped as \\VBOXSVR\Shared which doesn't change if everything is on a different host. Unfortunately, VirtualBox's shared folders does not NTFS security and Microsof Office 2010 has problems wiith it.

Can I do what I need to do using Host Only Networking? I tried setting it up but had to disable the Brigded adapter on the VM and then could only share a folder from within the VM. I could not find a way, from the host side, to expose V:\VirtualBox\Shared as a shared folder in the Host Only network.

Any suggestions would be appreciated.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Help With Host Only Networking

Post by noteirak »

From a sharing point of view, there wouldn't be any big difference from a host-only or a bridged mode. Both will use an interface in the host and the guest, and in both case you would use the IP address of each.
Could you show the VM config (run this in install dir and replace VmName) in host-only as well as the network config :

Code: Select all

vboxmanage showmvinfo "VmName" --details
ipconfig /all
Also show the network config in the guest

Code: Select all

ipconfig /all
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Re: Help With Host Only Networking

Post by saberman »

I found part of the problem. Windows could not identify the network and labeled it as Unknown Network. It gets set as a public network and you can't see any of the machines on it.

I hack around for a while and manged to change it to private by telling the system that all unknown networks were private. (This is not something I would want to run with.) But when I did that the IP addresses got fouled up and I had to use static addreses. That worked until I rebooted. Then I could not get it working again and managed to get one test VM so fouled up it wouldn't even work with a bridged adapter -- restored it from a back up.

Is there some way to get Windows running in a VM to identify the host only network. Any name will do as I can then set the system to treat that name as private if necessary.

When I get some time I will play with it again and see what combination gets it working again.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Help With Host Only Networking

Post by socratis »

It took me a while to find the answer as well, so here you go. The idea is to add a gateway to your network configuration.

Open Network and Sharing Center -> Change adapter settings -> (Select your HostOnly network adapter) -> Properties -> Properties for IPv4 -> Advanced... -> Default Gateways.

Add your default gateway, based on your host-only network.

Verify with "ipconfig" in the command prompt. Reboot, and your network should be identifiable...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Re: Help With Host Only Networking

Post by saberman »

Host: Windows 7 Ultimate x64 with all patches
VirtualBox 4.3.4

Cannot get this working

On the host:
VirtualBox GUI
File
Preferences
Networking
NAT Networks
<nothing>
Host-only Networks
VirtualBox Host-Only Ethernet Adapter
Adapter
IPv4 Address: 192.168.234.100
IPv4 Network Mask: 255.255.255.0

Control Panel
Network and Internet
Network Connections
Local Area Connection 3
Unidentified network
VirtualBox Host-Only Ehernet Adapter

Right click on Local Area Connection 3
Properties <answer UAC prompt>
Internet Protocol Version 4 (TCP/IPv4)
Properties
Use the following IP Address (checked)
IP address: 192.168.234.100
Subnet mask: 255.255.255.0
Default Gateway: 192.168.234.1
Click on OK
Click on Close
Unidentified network ==> Unidentified network Identifying for a few seconds then goes back to just Unidentified network

Ipconfig
Ethernet adapter Local Area Connection 3:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
Physical Address. . . . . . . . . : 08-00-27-00-30-F3
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::2c42:e879:5a7c:6dc6%26(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.234.100(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 0.0.0.0
192.168.234.1
DHCPv6 IAID . . . . . . . . . . . : 436731943
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-16-6D-92-3B-00-26-2D-F3-E9-82

DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled

Reboot and Local Area Connection 3 is still unidentified and still public.

Only other enabled adapter is hardware NIC.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Help With Host Only Networking

Post by socratis »

OK, I'm a little bit confused. Or you ;) . Did you do all of the changes on the host? Because the instructions I gave in my previous post apply to the guest.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Re: Help With Host Only Networking

Post by saberman »

Right now I have the same problem on both. If you can please provide an example of both the host definition (VirtualBox and Windows) and the guest definition (VirtualBox and Windows).

By the way, where does VirtualBox store the IP address and file mask on the host for Virtual Host-only Networking. The only entry I can find in the VirtualBox.xml file is for the DHCP server and it has all zeros (which is reasonable since I unchecked the enable DHCP box).
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Help With Host Only Networking

Post by BillG »

The unidentified network is a Windows thing unrelated to VirtualBox. From Vista on, by default unidentified networks are set to public and file sharing is blocked. As socratis noted, if you don't have a default gateway configured Windows will mark it unidentified and therefore public.

You can make sure that it has a default gateway so that it is not marked unidentified, or you can change the local security policy in the Windows guest so that it does not make it public even if it is unidentified.

If you let the guest host only adapter get its IP from DHCP, it will get a default gateway automatically from the host only network DHCP server (and it should always be the same, even when you move the host to a different network).
Bill
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Help With Host Only Networking

Post by socratis »

BillG wrote:If you let the guest host only adapter get its IP from DHCP, it will get a default gateway automatically from the host only network DHCP server (and it should always be the same, even when you move the host to a different network).
No, it will not. That's why this workaround is needed. The HostOnly DHCP server of VBox does not provide a default gateway, hence the problem. I complained about it, but I was told that it is not a VBox issue, it's a Microsoft issue. Go figure...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Re: Help With Host Only Networking

Post by saberman »

Please provide an example of the host and VM settings both for VirtualBox and for Windows.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Help With Host Only Networking

Post by socratis »

There is no special settings, either on the host or on the guest, except what I said several posts earlier where you simply add the missing gateway to the guest. See my post for the details.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Re: Help With Host Only Networking

Post by saberman »

>Add your default gateway, based on your host-only network

At this point the host cannot see the network because it is listed as an unknown network and marked as public. I tried adding a gateway setting to the host but it still comes up as unknown. So how did you get the host the see the network?

Doesn't the host have to be able to see the Host-only network?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Help With Host Only Networking

Post by socratis »

You are having a problem with the host. I was talking about the guest. I don't have a Windows host, so I don't know how they react.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Help With Host Only Networking

Post by Perryg »

Broken link removed.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Re: Help With Host Only Networking

Post by saberman »

The solution given is to set the gateway to another active host on the subnet. This is a Host-only Network with only one host. There isn't another active host on the subnet.
Post Reply