Monthly archives "October 2013"

Exporting and Importing VMs

I am sure everyone is now trying out Windows 2012 R2. I am also doing the same :)

Just want to share some information on the export and import between different versions of Hyper-V

SOURCE HYPERV DESTINATION HYPERV CAN IMPORT ?
WINDOWS 2008 WINDOWS 2012 R2 NO
WINDOWS 2008 R2 WINDOWS 2012 R2 NO
WINDOWS 2012 WINDOWS 2012 R2 YES
WINDOWS 2012 R2 WINDOWS 2012 NO

However, there is a workaround mentioned on Technet Forum by Taylor Brown (MSFT) on making the import getting worked from Windows 2008 R2 to Windows 2012 R2.

VM’s that are exported from Windows Server 2008 or 2008 R2 utilized the version 1 WMI namespace which resulted in a .exp file to represent the exported virtual machine.  In Windows Server 2012 we introduced a new WMI namespace (version 2 or root\virtualization\v2) which implemented a much better import/export model – allowing you to effectively just copy the virtual machine folder (with the VM’s XML configuration file inside it) as well as the VM’s VHDs and then import that directly.  For Windows Server 2012 we maintained the version 1 WMI namespace which allowed for importing of Windows Server 2008/R2 VM’s on 2012.

In Windows Server 2012 R2 we have removed the old version 1 namespace which means we can’t import virtual machines that where exported from Windows Server 2008/R2.  However we can import them if you copy the virtual machine xml file and VHD’s – to do this you need to stop the vmms on the 2008/R2 server – copy all of the virtual machine files/vhds to the Windows Server 2012 R2 server and then import them.

My first production cluster will be up tomorrow with Windows 2012 R2. I wish if the option for exporting back to Windows 2012 was there. That would give high confidence for an early adapters.

Cheers and good luck !

Shaab

 

 

Windows 2012 R2 – New HyperV Feature – Live-Export

Trying out the new features with Windows 2012 R2. One of the interesting features is the Live Export. In the previous versions of HyperV, its mandatory to keep the VM down while performing an export.

WindowsServer2012-LiveExport-Error

With Windows 2012 R2, that restriction is lifted out.

The idea which is getting used here is similar of a snapshot. While we take a snapshot, a differencing disk is created from that point which will have the updates. This disk will have the extension .avhdx (Advanced Virtual Hard Disk). In case of a restore, This ahvdx is discarded and the parent disk will be used. At the time of deleting a snapshot, the avhdx will get merged to vhdx.

In Windows 2012 R2, While we perform a live export – a snapshot is happening in the background which creates a avhdx file. All the updates will be happening to this differencing disk till the export gets completed. Once the export is completed, this avhdx will get merged to the parent disk.

Lets see how it works.

I am going to export a VM named  VM1.

Please refer to the disk configuration of VM1. Now the VHDX configured is VM1.VHDX.

LiveExport-VM-Disk

Triggering a live export from Powershell. Please note – We need to open the powershell on elevated mode.

LiveExport-Export-VM

While the export is in progress, Lets go back to the disk configuration and see the current disk.

LiveExport-VM-Disk-While-Export-In-Progress

Lets wait for the export process to complete. The progress will be visible on the HyperV Manager.

LiveExport-Export-VM-Progress

And once the export is done, We will see that merging in progress. At this stage, the avhdx disk which got created is getting mreged back to the parent vhdx – in this example, vm1.vhdx.

LiveExport-Export-VM-DiskMerging-After-Completion-Of-Export   Additionally, Few events are getting logged while the export is happening. Refer to the Crimson Logs Microsoft-Windows-Hyper-V-VMMS/Admin

Live-Export-Event18303-ExportCompleted Live-Export-Event19070-DiskMergeStarted Live-Export-Event19080-DiskMergeCompleted

For any questions/suggestions, Feel free to drop as a comment.

Cheerio

Shaba

 

Windows Server 2012 inplace upgrade to Windows 2012 R2

Getting ready for the Windows 2012 R2 release. I was searching for the inplace upgrade procedures but couldn’t see any blog or technet writeup if its supported or how should we get this done.

As expected, Windows  Server 2012 can be upgraded to Windows Server 2012 R2. ie inplace upgrade is supported. I just tested with a standalone HyperV node with the in place upgrade and successfully completed Windows 2012 R2 installation.

Windows2012R2-Upgrade1

Windows2012R2-Upgrade2

Windows2012R2-Upgrade3

Windows2012R2-Upgrade4

The compatibility check will detect the applications and report in case of any issues.  I had few VMs which was running at the time of upgrade. And thus the compatibility report clearly says that Virtual machines are ON and needs to turned off before starting the upgrade.

Windows2012R2-Upgrade5

After turning off the VMs, I was able to proceed with the next step.

 

Windows2012R2-Upgrade6

Windows2012R2-Upgrade7

And thats all. In approximately 30 minutes, the server got upgraded. HyperV service was all fine and VMs are perfectly running.

Cheers

Shaba