preloader
19 March 2012 / #P2v

P2V preparation : IP address

post-thumb

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

reset
 set global icmpredirects=enabled
 add route prefix=0.0.0.0/0 interface="Local Area Connection" nexthop=192.168.0.253 publish=Yes
 add address name="Local Area Connection" address=192.168.0.152 mask=255.255.255.0

popd
 # 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