VMware {code} Community
sahmed24
Contributor
Contributor

two machines with same IP without conflict. is this possible?

Hi

consider this scenario.

i have a testing environment in the form of vApp, that consists of two virtual machines, with static IPs. I want to run parallel tests. so i make clone of these machiens, and start all in parallel. or in inshort multiple instances of same vApp are running. is there a way to avoid ip conflicts, i..e somehow make vApp run with in boundaries so it doesnt interfere with outside world. basically avoid ip conflicts

//Rizwan

Reply
0 Kudos
3 Replies
stumpr
Virtuoso
Virtuoso

Run the VMs behind a NAT pool. Lab Manager does this, the feature is called network fencing.

Reuben Stump | http://www.virtuin.com | @ReubenStump
Reply
0 Kudos
sahmed24
Contributor
Contributor

how do i run the VMs behind the NAT pool. can you please explain more.

yes, i know lab manager has fencing that can do it, but i am not interested in lab manager. i need to use vApp of vCenter Server.

Reply
0 Kudos
stumpr
Virtuoso
Virtuoso

If you're not going to use something like Lab Manager, you'll need to create your own.

Install a VM appliance that runs some sort of NAT firewall. Usually these are Linux based with some web UI around IPTables. Find something with a command line or just do a basic Linux VM install. You can then use the VIX API to run IPTable scripts inside the VM to update the inbound NAT rules (Outside IP <-> Inside IP).

You then create private networks (vSwitches with no uplinks) and assign your vApps to those. You dual home your VM NAT firewall to that private network and your public network. You update the NAT rules to map an outside address to the inside, duplicated IP address.

That's the basic premise. You can make it as complex (fully automated like Lab Manager) or as simple (pre-create several private networks, NAT VM appliances) and just assign vApps.

You could also use non-routable VLANs off your switches, this would allow your vApp instances to be spread across hosts and avoid the requirement to create private networks and do mapping. But you'll have to add program logic to your code to avoid placing 2 vApps with the same IP address onto the same network object.

Reuben Stump | http://www.virtuin.com | @ReubenStump
Reply
0 Kudos