12

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!

Glorfindel
  • 4,158

5 Answers5

6

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.

Glorfindel
  • 4,158
harrymc
  • 498,455
1

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.

Lara Dougan
  • 2,296
0

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.

Edit:

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.

0

Just make sure each machine on the same subnet.

Example:

192.168.50.0 w/ 255.255.255.0 as the netmask, or its referred to as a /24.
That gives you the addresses: 192.168.50.1 - 192.168.50.254 on the same network.
You could then give:
ComputerA - 192.168.50.10
ComputerB - 192.168.50.11
ComputerC - 192.168.50.12

Since they are on the same subnet they should talk and play nice.
daalbert
  • 309
0

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.

Kirk
  • 2,472