VMs and different IP subnets

NCI_IT
NCI_IT used Ask the Experts™
on
I've been tasked to come up with a solution for a team of software developers. They want to be able to run 3 or more Linux VMs in a physical Windows PC. The problem is that each of these virtual PCs need to ideally be on different networks than the physical network card they are connecting to. The VMs would connect out through a second NIC than what the Windows OS would connect out of.

Is this even possible to do without using NAT? Can the NIC be connected to a VLAN trunk on the switch?

We have yet to decide on exactly which VM we will be using.

The hope is to replicate a field install of 3 physical servers which will each be on different networks without having to have the infrastructure surrounding it.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Yes.
vmware can give each VM its own IP address, and they can share a NIC, they can also be placed into VLANs as well.
Not sure on all the other VM products, but most all of them do support those options.
clarification:  they can all be in different subnets as well.  the VM software would operate a software switch that is "connected" to the PC NIC card.  Each VM NIC could have its own MAC address as well, that is default for most of the VM software.  

Author

Commented:
So - if I understand what you are saying, VM#1 would need to go to the router and back in order to talk to VM#2.

Is that correct?
Should you be charging more for IT Services?

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

the VM software can handle the traffic between VMs.  but there may now be options to force that traffic out to the router as well.  It depends on the software you use, and the configuration options selected.
Top Expert 2010

Commented:
Depending on what VMware product you are using - options are a bit different. You are correct in your assumption that a router will be required for communication between different IP subnets - the VMware software does not provide any routing functionality.

The router can be either physical (outside of your VMware host) or virtual such as options from Monowall, Vyatta, and PFSense.

Please detail your setup:
Type of VMware software (Workstation, Server, ESX, ESXi)
Type of host PC or Server
Number of NICs in VMware host
Types of routers/switches involved
connectivity requirements for each vm - ie. are they isolated and only host on the subnet? Do they need to communicate with other physical or virtual machines? etc.

With that info I am sure we can help you design a solution

Good Luck

Author

Commented:
Please detail your setup:

Type of VMware software - Not chosen at this point. VMware has been brought up but it will need to be researched for feature function.
Type of host PC - PC, will be XP, Vista or Win7
Number of NICs in VMware host - at least 2, one for the Windows OS and the other for the VM boxes
Types of routers/switches involved - Cisco, various models
connectivity requirements for each vm - The VMs need to communicate with each other and with other hosts on different subnets. In fact, each virtual host will likely have multiple virtual NICs on different subnets.

The purpose of this setup is to replicate a Linux server cluster for a custom application.
Certainly doable, in fact, I've seen many similar demos that are all hosted on a single notebook running a few VMs of the servers and clients to show how things interact.
You will want to make sure you have enough RAM in the systems, as well as processor, but RAM is the larger issue from my experience.
If you are not concerned about taking snapshots of the system, then you can begin trying VMWare Player, which is free.  VMWare Workstation adds some additional functionality, including multiple snapshots (point in time images) for each VM.
Top Expert 2010

Commented:
Sounds like your VMware software will likely be VMware Workstation - the Player software won't give you the flexibility required for your setup, VMware Server requires a Server OS, and ESX/ESXi requires server class software.

So long as you don't need to put your virtual machines on an existing subnet shared with other physical machines you should be able to accomplish this with VMware Workstation and a virtual router such as Vyatta. You can assign your guest VMs to "host-only" networks that are shared with the virtual NICs on the Vyatta appliance, then route everything out through the bridged network NIC you are allocating to your vmware guests.

Note that you will need return routes to the Vyatta from your physical infrastructure router.

Good Luck

Author

Commented:
The virtual servers will need to talk to hosts on the physical network as it needs to interact with them. In turn the external hosts will need to talk back to the virtual servers.

I'll look into VMware workstation.
Top Expert 2010
Commented:
That is fine and doable with what I posted above. The only restriction for physical hosts is that, because your new IP subnets will be virtual only, you won't be able to use an existing physical subnet, nor will you able to add physical hosts to the same IP subnets.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial