Mastering Windows Server 2016 Hyper-V

(Romina) #1

Additionally, because of the text-based nature of the file, it was susceptible to
corruption if an unplanned power outage or loss of access to storage occurred.


Windows Server 2016 moved to a new binary-based configuration file, the VMCX file,
in addition to a new VMRS file that contains resource state data for the VM. The
VMCX file cannot be read through a text editor, and it is resilient to corruption from
storage or power failures.


The correct method for viewing and modifying configuration is through the
aforementioned Hyper-V management tools. However, it is possible to dump out the
configuration of the VMCX file using PowerShell. The best method I have found is to
create a temporary object that contains a copy of the configuration in the VMCX file. It
is then possible to view all of the data from within the temporary object that is a copy
of the VMCX configuration. For example:


$tempVM = (Compare-VM -Copy -Path .\yourvmcxfile.vmcx -GenerateNewID).VM


You can examine all of the key properties by using the following:


$tempVM | select *


It is also possible to view specific collections that are part of the object, such as
network adapters and disks. For example:


$tempVM.NetworkAdapters
$tempVM.HardDrives
$tempVM.FibreChannelHostBusAdapters


If you type $tempVM and press Tab, PowerShell will show all of the options available to
you.


VM Configuration Versions


Each version of Hyper-V introduces a new VM configuration version that exposes the
new capabilities. Windows Server 2016 introduces the new VM configuration version



  1. Table 2.1 shows the various configuration versions available for each version of
    Hyper-V.


Table 2.1: VM Configuration Versions by Windows Server Version


HYPER-V
VERSION

VM CONFIGURATION VERSIONS SUPPORTED


Windows Server
2008

1


Windows Server
2008 SP1

2


Windows Server
2008 R2

3

Free download pdf