Paul Gregory | 9 April 2013
During the last couple of months I have been asked about storage migration within Hyper-V 3.0 and what is possible. The simple answer is assuming the host has access to both the source and destination storage locations, the storage can be migrated.
Storage migration can be used to achieve a number of benefits, anything from moving a set if VHD's from one location to another because of space or performance issues or because there is a move from standalone hosts to clustered hosts, or just storage consolidation. One of the interesting capabilities today is because clustering does not require reboots there is the potential to complete the following without any downtime at all:
- Take a standalone Hyper-V host
- Add external storage
- Create or add it into a cluster with another host
- Make the VM highly available within the cluster
- Migrate the VM's storage
At this point a standalone host with VM's has
become highly available and the running VM's have also become
highly available with ZERO downtime. I appreciate this does
depend if any additional hardware is required for the first host to
connect back to the chosen storage subsystem. But this is a
massive leap for an operating system which has in the past had a
poor reputation for requiring reboots.
The migration of the storage can be carried out using the Hyper-V manager on standalone VM's, the Cluster Manager on Highly Available VM's or from the command line using the move-vmstorage PowerShell command (example below), of course all this can be combined into a single experience with System Center Virtual Machine Manager 2012 SP1.
The move-vmstorage is a very simple command. The command itself takes basic three parameters:
- VM Name
- Storage Destination
- Computername of Hyper-V host is remote
Therefore to move the storage of a VM called "Windows Server 2012" from a local disk to a clustered shared volume this would be the command (all entered on a single line):
move-vmstorage -vmname 'windows server 2012' -destinationstoragepath 'c:\clusterstorage\volume1\Windows Server 2012' -computername HV-Host1
And remember storage migration is available in
the Hyper-V version on Windows 8 too!
Of course as in a previous blog storage and Virtual Machine migration can be combined to migrate a VM from one host to another while migrating the storage at the same time too.
Please watch this video to see this feature in action, or attend a training course on Windows Server 2012 @QATraining.
Follow me on Twitter or see my YouTube channel