Moving VHDs for a virtual machine in Hyper-V on Windows 8.1
I’ve been using virtual machines to test out some software, but those VHD files take up a bit of disk space – so much that my PC’s solitary SSD drive was running out of room. Thankfully the Lenovo hard disk drive bracket kit arrived today so I can install an extra drive to supplement the SSD.
Now to move the VHD files to the new drive.
The instructions described here, whilst for Windows Server are essentially the same for a Windows desktop OS. The only difference is that the Move Wizard doesn’t offer the Move the virtual machine option. eg.
Of course, you can do this with PowerShell too (and I did):
Move-VMStorage -VMName W12R2-1 -DestinationStoragePath d:\VHDs\W12R2-1
And you even get a nice progress bar!
You also get the migration progress in the status field in Hyper-V Manager.
A few minutes later, the VHD was successfully moved to my new hard disk, and because this happened live, the VM kept running the whole time. Impressive!
Categories: PowerShell, Hyper-V