As I said a few times so far, I have been writing blog posts to be my reminder and help to other blog readers :). Two days ago I migrate one of virtual machines from Windows Server 2008 R2 Hyper-V host to Windows Server 2012 R2 Hyper-V host. As many times until now I did Export then copy to the new storage and then Import, but… I forgot that I already did that a few months ago and what first need to do :). I got error like in the picture below ;)
This isn’t something new. I rewrite Rhoderick’s and Taylor’s articles. Thank you guys.
“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.”
What to do? We have two solutions!
The first is as follows:
Shut down all Hyper-V virtual machines on the WS2008R2 host then stop the Hyper-V Virtual Machine Management service.
net stop "Hyper-V Virtual Machine Management"
Copy all virtual machines what you want to migrate to WS2012R2 Hyper-V host then Import Virtual Machine… That’s easy way, but…
What if we already did Export and we don’t have WS2008R2 Hyper-V host?
The second resolution is as follows:
Exported Hyper-V virtual machines copy on the Windows Server 2012 and import them, then simple copy to a Windows Server 2012 R2. That server is only used to perform the import thus allowing the VM to be copied to Windows Server 2012 R2.
Now we can do whatever we want to do :)
I worked over the holidays and from tomorrow I’m going to deserved break until the end of the week.
Enjoy the day!