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\}&
lt;/ChannelInstanceGuid>
Network Adapter
True
00-15-5D-01-1F-0E
False
84274ff9-5a3c-47bf-9bb4-b97cbec1ec3d
Switch-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.