My Main Rig is a Windows 7 Professional laptop. On this machine is two Virtual Machines, both of which are also Windows 7 Professional. I need these VMs to be able to see each other but I also need them to access to the internet.

Currently they are all connected to the public internet at the hotel I am staying at but I am unable to see the other machines because this is a public network.

What I need to do is create a private network amongst my physical machine and the two virtual machines that reside within it. How can I do that?

I found how to make it think the public network a private network, but not how to create a private network that exists within the machine while still seeing the outside world.

My Google-fu hasn't revealed much - maybe I am using the wrong terms.

UPDATE: I added an additional NIC to both VM's and set them to local. I then started the VMs and tried to create a new network. However I can now see other machines on the hotel network and presumably they can see me (not desired). Can anyone give a detailed explanation of how to set this up or a link to a site that does? I can't be the only person who wants a private internal network on their PC?!

UPDATE2: Found this that describes what I want to do. Will try tomorrow to see if it works - seems I was almost there.

UPDATE3: Seems it didn't work. Added bounty which will be awarded for anyone who can do a step by step guide for getting two virtual machines to communicate. Extra cudos for using MySQL & Apache on the VMs!


To have the VMs on a separate network that is private to your PC, use the Microsoft Loopback Adapter. The Microsoft Loopback adapter is a testing tool for a virtual network environment where network access is not available. It sets up a virtual network adapter that is private to your computer.

To install, see this : How to install a Loopback Adapter in Windows 7.

After it is installed, from within Virtual PC :

  1. Select your virtual machine
  2. Go to the Settings
  3. Click the "Networking" setting
  4. For your network adapter, select "Microsoft Loopback Adapter"

Now, you should be able to see your other running Virtual PC instances that also share the same loopback adapter, while this virtual network is inaccessible from outside your computer.

If you need to use Internet from within the VMs, see this article :
Configuring NAT via using the Microsoft Loopback Adapter and Internet Connection Sharing.

  • This seems the most logical suggestion, I will try this first. – graham.reeds Jun 2 '11 at 22:49
  • Okay, now what? The both VMs are on Loop Back Adaptor but there is no network between the machines. Do I need to set a static IP address for them? – graham.reeds Jun 2 '11 at 23:20
  • Yes, as this virtual network doesn't have a DHCP server. Choose another network segment than that serviced by your router, for example 200.200.200.x rather than 192.168.x.x. – harrymc Jun 3 '11 at 9:18
  • Still not got it working. I assigned the 1st VM and the second VM That didn't work so I also assigned the host to That didn't work. I also disabled ipv6 in case that confused the issue. Still no joy. Imagine, for an instant, I am really really dumb. Explain in simple steps how this should work and how to go about it. – graham.reeds Jun 5 '11 at 22:20
  • Before you ask "What errors did I get" - by not working I mean I can't ping the other VM. – graham.reeds Jun 5 '11 at 22:22

What VM product are you using? VMware? VirtualBox? MS Virtual PC? Most of them use NAT by default, which is what you would want if you desire to have those VMs be able to reach the internet.

Also how are you checking that these machines are "visible" to the public network? The host machine will be able to see the VMs because whether you use host-only, NAT, or bridged mode, your host Windows 7 will be able to see them. Only bridged mode should make the VMs visible to the public network. NAT mode makes your host PC act like a NAT router, so only your main host machine would actually be visible, but if you look at the network on the host machine, the VMs will still be visible because your host will be browsing both the public side AND the internal VM network.

So, to really see if those machines ARE ACTUALLY visible to the public network, you would need to use a device other than the host PC to try to look at them from the outside.

  • I am using VirtualPC - hence why it is tagged with VirtualPC. Maybe I should of made that more explicit in my post. If I disconnect the host from the network and look at the network (under computer) nothing appears. If I connect to the hotel network and do the same again I can see the VM's (as well as several other machines). Also the VM's non-static IP addresses are in the same range as my physical machine. – graham.reeds Jun 2 '11 at 8:33
  • What version of Virtual PC? The networking options differ depending on what version used. Are you using the latest? – Lara Dougan Jun 2 '11 at 15:54
  • I believe so. According to the help dialog it is – graham.reeds Jun 2 '11 at 23:24

The Hotels Wifi may actively prevent LAN side machines from communicating with each other.

You may have to get the machines on the Internet and then use a software layer VPN network like Hamachi.


You might be able to set one VM up with two NICs, the first being 'Shared NAT', and the second being 'Internal'. Then, on the second VM (etc.) set it's NIC to Internal.

Then in Windows on the VM with the two NICs, enable Internet Connection Sharing to share the 'Shared NAT' adapter with the Internal-only network.

  • 2
    How can a hotel network stop me from creating a LAN on my own machine? Did you read my question? – graham.reeds May 25 '11 at 23:08
  • Sorry, by LAN-side I meant the hotel's network. The network local to the hotel, not the network local to your hotel room. :) – Ƭᴇcʜιᴇ007 May 26 '11 at 3:31
  • I don't want to communicate with any other machines on the hotel network. I just want the machines internal to my machine to communicate with each other. I will try what your edit suggests tonight. – graham.reeds May 26 '11 at 9:06
  • Nope. I haven't got it working. I will do an update to my question. – graham.reeds May 26 '11 at 22:07
  • No matter what, if you want the VMs to communicate with the outside world, then they will need to communicate with at least one additional host on the hotel's network. – Kirk Jun 8 '11 at 1:51

Just make sure each machine on the same subnet.

Example: w/ as the netmask, or its referred to as a /24.
That gives you the addresses: - on the same network.
You could then give:
ComputerA -
ComputerB -
ComputerC -

Since they are on the same subnet they should talk and play nice.

It's been years since I've used Virtual PC, so it is possible that what I am going to suggest cannot be done. In other virtualization solutions, I would set up each VM so that I was able to get to the Internet (probably using a NAT connection). Once I was sure that the internet was working, I would add a 2nd NIC on a host only network, and set up static routing inside the client machines. The host only network would be for intra-client traffic, and the default route would be for everything else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.