Q. I created a new virtual machine (VM) and I'm connecting it to the virtual hard disk of a previous VM. I still have the old VM's XML configuration file. Can I change the new VM so it keeps the old one's network configuration?

John Savill

January 7, 2010

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. Hyper-V stores configurations in XML files. Part of that configuration file for the network adapter includes the device GUID of the network adapter. This GUID is unique for each VM, so if I create a new VM with the exact same configuration for an existing VHD, the network adapter will have a new device ID and therefore be treated as a new piece of hardware, losing any static IP configuration.

It isn't supported, but you can copy the device GUID from the network adapter in the old configuration file into the new configuration file. Doing so makes the VM think it's the same network device and thus maintains any configuration related to the adapter, such as IP address.

Open the old configuration file and locate the network adapter section. It will look like the following:

<_cb6dd1a0-c17d-4394-b5b9-9894ff971996_>{f07d99f3-06dc-40ea-a1b8-25c3a8d04491}Network AdapterTrue00-15-5D-01-1F-0EFalse84274ff9-5a3c-47bf-9bb4-b97cbec1ec3dSwitch-SM-036bf681-40b0-4c47-bad3-3b131c1fbb98-0

Note the FriendlyName, which tells us it's the Network Adapter. The device ID is the ChannelInstanceGUID. Copy the value in the curly brackets ({}) and paste over the ChannelInstanceGUID in the new VM's configuration file.

Related Reading:



Check out hundreds more useful Q&As like this in John Savill's FAQ for Windows. Also, watch instructional videos made by John at ITTV.net.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like