...hopefully some useful VMware related stuff

Dump IP address information for local network adaptors when doing a P2V

26/10/2009 09:27

When doing a P2V of a Windows box, a new network adaptor is created and the old one becomes hidden, the IP address information is not automatically transferred to the new adaptors in the converted machine.


One of my colleagues put me on to this, and it certainly sped up the process.


The following command will dump the information to a file called ipconfig.txt, which after conversion (and removal of the hidden network adaptors see here) can be imported back in.


netsh interface ip dump > ipconfig.txt


Once the machine has been converted, the hidden adaptors have been removed, rename the Local Area Network #3 or what ever it has been called to the same as it was previously or change the name in the ipconfig.txt file and run the following from the same location the ipconfig.txt file resides.


netsh -c interface -f ipconfig.txt


The ipconfig file will look something like this:



# ----------------------------------
# Interface IP Configuration        
# ----------------------------------
pushd interface ip

# Interface IP Configuration for "Local Area Connection"

set address name="Local Area Connection" source=static addr= mask=
set address name="Local Area Connection" gateway= gwmetric=0
set dns name="Local Area Connection" source=static addr= register=PRIMARY
add dns name="Local Area Connection" addr= index=2
set wins name="Local Area Connection" source=static addr=none

# End of interface IP configuration


Search site