0

EDIT 2: There's nothing wrong with the adapters. If I disable my two actual network adapters on the host machine so that the virtual adapter is the only one up, then everything works correctly. As mentioned below, tracert shows that the traffic from the host machine is going out onto the physical network and then trying to find the VM. I don't know how to suppress this behavior. It seems to me that if NIC 1 has an IP of x.y.z.n, NIC 2 has an IP of a.b.c.m and NIC 3 has an IP of q.r.s.l and finally I write into cmd "ping q.r.s.26" it should use the correct NIC to send that ping automatically. However, that seems to not be the case. Anyone know how to get it to work? I can't really disconnect from my company network every time I want to use a VM.

ORIGINAL: This may be a series of questions depending on the answer(s) to the first question(s).

I'm running the latest version of VirtualBox and I have two VMs. The first is a storage array simulator which is build on FreeBSD 64. The second is RHEL 6.5. I have set up the storage array to use IPs 192.168.3.25-27, 255.255.255.0 and the RHEL uses 192.168.3.10. The virtual adapter on my PC has 192.168.3.9. All adapters presented to the VMs by VBox are in host-only mode, which I thought would allow them to talk to each other as though they were on a network switch. So far, having no luck getting them to communicate. I was able to make it work with VMWare Player 5.0 but that's a side note. I don't need external networking to work, just want my PC and those two VMs to be able to share a handshake.

What did I miss?

EDIT 1: I can now ping VM1 from VM2. I cannot get the host machine to ping anything. A tracert shows the pings are going out onto my physical network. Possibly I've got a setting wrong on the VirtualBox virtual adapter or Windows 7 is having a senior moment and using the wrong NIC.

6
  • "VirtualBox creates a new software interface on the host which then appears next to your existing network interfaces. In other words, whereas with bridged networking an existing physical interface is used to attach virtual machines to, with host-only networking a new "loopback" interface is created on the host. And whereas with internal networking, the traffic between the virtual machines cannot be seen, the traffic on the "loopback" interface on the host can be intercepted." - virtualbox.org/manual/ch06.html#network_hostonly Aug 1, 2014 at 19:01
  • That doesn't restrict multiple vm's on the same host network from communicating between one another. I'd say start from the bottom up. See what you can ping and what you can't and check firewalls.
    – Marc05
    Aug 1, 2014 at 19:17
  • Yeah I saw that already, not sure what you're trying to point out. In the paragraph above it says, "the virtual machines can talk to each other and the host as if they were connected through a physical Ethernet switch" I currently can't get a ping between any devices; says "destination unreachable" Aug 1, 2014 at 19:18
  • what I'm trying to point out is that the manual says that host-only networking doesn't use the standard network adapters. You say you set these IPs but you make no mention if you set them up in the regular network adapters, or in the software loopbacks. Also, are you using a subnet for the the Host-only network that's totally new/different from you actual network(s)? Perhaps take some screenshots of the Host-Only adapter information you set on the Host (from the VBox GUI). Aug 1, 2014 at 19:34
  • Can you include the output of ipconfig and route print -4 from your host machine? Your VMs are configured with static IP addresses, correct or is there a DHCP server on the network?
    – heavyd
    Aug 1, 2014 at 20:28

2 Answers 2

0

I've been working for a while with VB and I also came from VMWare previously.

  • Host-Only networks are intended for isolated guests guests with communication between them and able to be accessed from the host. (Appliances?)

  • Internal-Network will allow connectivity between guests but it will not allow connections from the host.

  • There is an experimental NAT Service in VBox now that will work similar to the one in VMWare, but so far it's been too unstable for me.

My solution (to have inter-guest communication and host communication) has been to use 2 NICs per guest:

  • The first one with "intnet" (Internal Network), as the main connectivity should be between the guests.
  • NAT (original, not the new experimental service) for the secondary. The NAT interface allows you to forward ports from the guests, so I can access the guest from the HOST and any other machine in the network.

Would that suit your needs?

3
  • I think your assessment of Host-Only is incorrect. Guests are not isolated if they are connected to the same host only network. From the documentation: the virtual machines can talk to each other and the host as if they were connected through a physical Ethernet switch
    – heavyd
    Aug 1, 2014 at 20:31
  • Thanks! You are right. I've corrected my statement. I would've swear that Host-Only didn't have communication between them back in the day. Well, I stand corrected.
    – Marcelo
    Aug 1, 2014 at 20:39
  • I think it would work, will test Monday. Even if it does work, still wondering why it doesn't work the way the VBox guide says it should. Aug 1, 2014 at 21:06
0

Ignore this, I misread the original post

The host-only adapter allows communication between the physical hosts and any VMs using that mode, which creates a special network device on your physical host completely separate from your physical network adapter. The problem is that you set the host-only network to use the same IP range as your physical network. The routing for 192.168.3.0/24 is already set to be your physical adapter, but by setting the host-only adapter to have the same settings the physical machine now has conflicting routing. Thus when it sees a packet coming in on 192.168.3.10, it tries to send replies down your physical network interface (defined by the routing) and as such never gets to the VMs.

The simple way to fix this is to use bridged mode instead of host-only. This allows your VMs to act like independent machines on your network, so they can use the same IP range etc. The only downside is that other machines on your network can see the VMs as normal machines, and can connect to them. This may or may not be an issue depending on your situation.

Alternatively, you need to set a different IP range on your host-only network. This will resolve the routing issues and everything should be able to communicate properly. You will likely also need to assign a static IP address to the physical host side of the host-only network, unless one of your VMs runs a DHCP server.

2
  • I didn't read this whole post, stopped at "same IP range as physical network." No, I didn't. My physical network is 192.168.1.x today because I'm working from home but I'm remotely connected to the enterprise network. When I did the tracert, it was showing IPs from my enterprise network, like 130.x.x.x. Either way, if the subnet is /24 it shouldn't be touching the 192.168.1.x area at all, right? The 192.168.3.x should be its own thing. Aug 1, 2014 at 21:06
  • @user1766768 Apologies, I misread the OP. But yet, you are right, the subnets are completely different and so won't conflict. However in that case I have no answer for you :( Aug 1, 2014 at 21:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .