19 March 2012 / #P2v

P2V preparation : IP address


When converting a physical server to a virtual machine (typically a P2V operation with VMware Converter), a big issue is that network informations are lost (due to TCP stack reset because the system saw the network card as new one).

In order to avoid this, we’ve used to do some pre conversion tasks (and some post conversion tasks as well as you can read on the previous post : Suppression des périphériques cachés).

We run the following command on the server which will be converted :

netsh interface ip dump >> C:\netSettingsDump.txt

Here is an example code generated from a test machine :

# ----------------------------------
 # IPv4 Configuration
 # ----------------------------------
 pushd interface ipv4

 set global icmpredirects=enabled
 add route prefix= interface="Local Area Connection" nexthop= publish=Yes
 add address name="Local Area Connection" address= mask=

 # End of IPv4 configuration

Once converted, during the purge operation of the converted VM, the following command is executed to restore the entire network configuration (including all settings) :

netsh -f C:\netSettingsDump.txt

Note : You just have to remember to put the same name at the interfaces than those who were on the physical server for the reconfiguration to work properly.

> Frederic MARTIN