7

I have two VM's on my machine, both Windows 7 Pro. One is a MySQL server and one is running Apache 2.0. Essentially they mimic a split webserver/database setup. On XP this was fairly easy. However it is proving a lot more difficult.

I found this which I had already done most of except for the adding the ip addresses to the hosts file, but even with that I cannot get the machines to see each other.

I can ping the machines from the host machine, but only if I am pinging the primary connection. Pinging the secondary connection fails. Pinging the other VM from either the VM's fails (and I am running the command prompt as Admin) on either connection.

Any ideas?

Update: What I would like is a step-by-step guide. I can't be the only one who has 2 Windows 7 Pro VM's on their machine can I?

17
  • I wonder if you might have missed a step on one or more of the virtual machines. I also wonder if firewall rules on the host might get in the way?
    – sarnold
    May 30, 2011 at 23:53
  • I haven't missed a step. The firewall rules seem to be in order, but disabling the firewalls on both VMs does allow me to ping each other. May 31, 2011 at 0:03
  • @Graham, and on the host as well?
    – sarnold
    May 31, 2011 at 0:03
  • The firewall on the host shouldn't matter. I just want the connection to be between the two VM's. May 31, 2011 at 0:08
  • 1
    I don't have any rep on ServerFault. I do on here. There was zero response and interest until I placed the bounty on it. Jun 2, 2011 at 23:28

4 Answers 4

5

It's a common problem with default network settings. Its default setting is to make a virtual NIC on another subnet and use NAT to communicate. So from the virtual PC you can browse the host but you can't browse the VPC from the host.

Here is the possible solution:

  1. [WIN7] Win7 & Virtual PC: how to browse local workgroup LAN?
  2. And probably related: This one
5
  • i have 3 win7 vm's at same time i am using vmware and works like charm
    – Synxmax
    Jun 2, 2011 at 10:34
  • i had exactly the same problem, have a look at the thread first.
    – Teoman Soygul
    Jun 2, 2011 at 10:39
  • Switching to VMWare/VBox at this stage is a non-starter as the systems are already setup. Took long enough to get to this stage (and I don't have the x86 disc with me). Jun 2, 2011 at 15:06
  • Also those links are the same. Jun 2, 2011 at 15:07
  • Alright fixed the first link. Last edit messed it up. It was the first link that I was referring to, have a look.
    – Teoman Soygul
    Jun 2, 2011 at 15:11
4
  1. Silly but make sure file and printer sharing is on , also workgroups are same

  2. try port scan 80 and 3306 , if it's filtered get ride of firewalls if it's closed make sure your webserver is online ( if u using wamp , xampp , etc )

  3. make sure you checked your network map ( windows 7 feature ) and all vm's are in same network not multiple networks

EDIT

As i asked from a certificated network engineer

You should set host ip as gateway for both machines if u using VirtualPC

for example :

host ip : 192.168.1.1  gateway : none
vm1  ip : 192.168.1.2  gateway : 192.168.1.1
vm2  ip : 192.168.1.3  gateway : 192.168.1.1

And be sure that u checked ports ( Http: 80 , Mysql: 3306 ) and they are open as i told use a port scan there is bunch of freeware port scan and in this situation host firewall can act directly and filter ports , And is there anything else like iis or any other webserver running ? if yes change default port !

2

Okay I think you must do following steps to solve your problem.

  1. You must check firewall rules for your both virtual machines.
  2. The Workgroup on the both virtual machines must be same.
  3. You must check out Connections Settings on both of your Virtual Machines, Them must be corrected set.

I think thats All. Good Luck ! If you have any question, I am waiting for your comments.

2

1- Check both machies are on the same "physical" net. (in the virutal world, are both bridged on the same real network card??)
2- Check both have an IP on the same IP subnet in example 192.168.0.20 and 192.168.0.22

5
  • how do you detect a net break in two parts? because each group/part can comunicate (ping) in each side but not all together (as on your situation). On fisical nets this is almost allways caused by not working hubs or swiches. in your case the "virtual switch" is VirtualPC softwere also afected by host firewall. so you must check the two point shown here, and shutdown the firewal to try
    – Luis Siquot
    Jun 2, 2011 at 17:39
  • what do you mind with "Pinging the secondary connection fails"? have you got two network adapters on the VMs?
    – Luis Siquot
    Jun 2, 2011 at 17:43
  • Yes. The original one that is attached to the physical network card and the internal one that the article suggests. Jun 3, 2011 at 8:37
  • I'm sorry but you are guided by an horrible article. starting at point 1 (need to shutdown all machines). have you ever ran one VM machine without problems?? can one VM machine comunicate to the world (ie google)?? if your anwser is yes, let start a second VM machine, it will comunicate to all the world and also other VMs on the same host. so please use just only ONE network adapter on each of your two VMs. and configure them the same way as the host is configured: if host uses DHCP, use DHCP on the VMs, if host uses static IP, use static IP on VMs, this is not mandatory, but the simplest way
    – Luis Siquot
    Jun 3, 2011 at 14:17
  • extending my point 1 and correcting "the guide" point 5 i say: Set the "unique" VM network adapter to the network interface of your machine (e.g. Intel/PRO/1000 MT Mobile Connection).
    – Luis Siquot
    Jun 3, 2011 at 14:23

You must log in to answer this question.

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