PDA

View Full Version : Setting up a software router for Virtual PC


wdavies
01-21-2002, 09:58 PM
I'm very fustrated with Connectix. Virtual PC 5.0 comes with the ability for VPC to have its own IP address, seperate from the Mac's. This is great, because you can run x86 server apps under Linux, and then access them from the Mac (eg run Oracle for example, which doesnt have a PowerPC version).

However, Connectix has screwed up the implementation somewhat, so that one can only have a seperate IP address if one is connected to a DHCP router (at least thats the only way I can find to do it). Actually worse, VPC will hang the machine if you wake from sleep away from the network (oh yeah. I'm on a powerbook).

Anyway -- It seems it should be possible somehow to connect the Mac and the Virtual PC using software, but I have NO idea how to do this - can anyone help?

Cheers,
Winton

cadder
01-25-2002, 10:52 AM
Virtual PC 5.0 supports what Connectix has dubbed the "Virtual Switch" which really isn't anything new from v4.0, just a different name.

Instead of using shared networking (where the VPC app will act as a DHCP server for the virtual machines and give out really wacky addressess) you can choose to set the IP's individually. This will work with DHCP or with staticly assigned IP addresses.

Example:

The Mac is configured to get its IP address from a DHCP server and is running two virtual machines. The network has a DHCP server and everything is NAT'ed through a little firewall.

Virtual machine A is running Win2k and configured for "virtual switch". It is set to get its IP dynamically from the DHCP server. In order to get a good IP from the DHCP server, you must fully release and then renew the adapter's addresses (otherwise the machine will get confused and not pull a new address, instead it will say it cannot find the DHCP server).

Virtual machine B is running some variety of Linux and configured for "virtual switch". It has a hard-coded IP address of 10.0.0.200 (because it is going to act as a server and port-forwarding is IP based in the firewall).

This configuration works fine. You will have three machines all using the Mac's one network device but with different IP addresses. As long as all of the virtual machines are using the "virtual switch" and the DHCP server is working, you shouldn't have any problems connecting to the virtual machines with IP-based programs. You should be able to telnet to the Mac from the Win2k VM and use the web services on the Linux VM from anywhere.

This configuration is similar to what I run and have always been able to communicate back and forth (as long as I don't use my airport card when running Virtual PC).

I hope that helps somewhat, but if not I can try to delve a little deeper into the individual configurations of the virtual machines.

- AB