Skip navigation

Q: I have virtual machines running on Windows Server "8" Beta and want to move to the Windows Server 2012 Release Candidate--what do I need to do?

A: The good news is very little! With the new ability to import virtual machines (VMs) in Windows Server 2012 Hyper-V, even when the VMs weren't exported first, the process is quite simple (this is assuming clustering isn't being used, which would require migration of VMs):

  1. On the existing Hyper-V server, make sure you don't delete the VMs--just stop them and leave them in place.
  2. Install Windows Server 2012 Release Candidate, install the Hyper-V role and any drivers needed to access the storage that contains the VMs.
  3. Make sure you configure Hyper-V with the same network switches with exactly the same name as were available on the previous Windows Server "8" Beta installation.
  4. In Hyper-V Manager, select the Import Virtual Machine action.
  5. Select the location of a VM and run through the import wizard. Within a few clicks, the VM will be imported. Repeat for all VMs to be imported.

It's possible to also import from Windows PowerShell. However, using the GUI does some automated fixing, which doesn't occur when using the Import-VM PowerShell cmdlet, unless you use the Compare-VM cmdlet as well. For example, here are two cmdlets in action, along with resulting output:

PS D:\virtuals> import-vm -path 'D:\Virtuals\APPVSequence\Virtual Machines\8FE19B75-7C0F-4B8E-821E-8A7B06E11938.xml'

import-vm : Unable to import virtual machine due to configuration errors. Please use Compare-VM to repair the virtual
machine.
At line:1 char:1
+ import-vm -path 'D:\Virtuals\APPVSequence\Virtual Machines\8FE19B75-7C0F-4B8E-82 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-VM], VirtualizationOperationFailedException
+ FullyQualifiedErrorId : Microsoft.HyperV.PowerShell.Commands.ImportVMCommand

PS D:\virtuals> $report = compare-vm -path 'D:\Virtuals\APPVSequence\Virtual Machines\8FE19B75-7C0F-4B8E-821E-8A7B06E11938.xml'

VM : Microsoft.HyperV.PowerShell.VirtualMachine
OperationType : ImportVirtualMachine
Destination : SAVDALHV01
Path : D:\Virtuals\APPVSequence\Virtual Machines\8FE19B75-7C0F-4B8E-821E-8A7B06E11938.xml
SnapshotPath : D:\Virtuals\APPVSequence\Snapshots
VhdDestinationPath :
VhdSourcePath :
Incompatibilities : {33012, 33012}

PS D:\virtuals> $report.Incompatibilities | Format-Table -AutoSize

Message MessageId Source
------- --------- ------
Could not find Ethernet switch 'b8c09ad6-7514-4dd7-a050-1c2eb70ec717'. 33012 Microsoft.HyperV.PowerShell.VMNetwo...
Could not find Ethernet switch 'b8c09ad6-7514-4dd7-a050-1c2eb70ec717'. 33012 Microsoft.HyperV.PowerShell.VMNetwo...

I can see that the problem is that the Ethernet switch in the VM configuration doesn't exist. I would then take steps to fix the problem and then import. This example also shows that it's much easier to work from the GUI, rather than by using PowerShell.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish