Live Storage Migration is a welcome addition to the latest generation of Hyper-V, replacing Quick Storage Migration, which rarely lived up to its name. Live Storage Migration allows administrators to move some or all of the files associated with a running virtual machine (VM) to another storage location without downtime.
Before Windows Server 2012, this Hyper-V feature was called Quick Storage Migration and the process was performed with the aid of System Center Virtual Machine Manager. It was a nice option, but the definition of "quick" was anywhere from one to 15 minutes of service disruption. The server was not restarted during this process but put in a saved state in order to move the memory to the new location. The size of this memory and the network transfer rate determined the duration of the disruption.
Live Storage Migration is included in the base product without the need for SCVMM. It is a different process than Live Migration, where the files associated with the VM stay in the same place, but pointers/links to these files move to a secondary host.
Why use Live Storage Migration?
In my environments, I have a constant need to migrate VMs or VM storage to maximize performance or move off older hardware. This not only includes host servers, but also storage infrastructure. Using the Live Storage Migration feature to move to a new storage area network, SMB storage or local storage allows for great flexibility during these transition times in hardware lifecycles. You can also use Live Storage Migration during everyday storage management, where a particular volume may be reaching capacity or if several VMs that demand high disk I/O share the same volume. In these cases, being able to move VMs to an alternate volume without downtime is a valuable tool to maintain harmony in your virtual environment.
How to perform a Live Storage Migration
You can perform a Live Storage Migration with PowerShell using the following example:
Move-VMStorage –VMName <VMNAME> -DestinationStoragePath D:\<DESTINATIONPATH>
You can also perform a Live Storage Migration from the Hyper-V Manager Console using the following steps:
- Right-click on the VM you would like to migrate to another volume and choose Move.
- Click Next on the Before You Begin page.
- On the Choose Move Type page, select the radio button Move the Virtual Machine's Storage and choose Next.
- On the Choose Option for Moving Storage page, choose to move all of the virtual machine's data to a single location.
For some advanced configurations, you can move the files that make up the VM (i.e., VHDX, XML, BIN) to different locations. Most administrators keep all the files in a single location for easier management.
- On the Choose a New Location for the Virtual Machine page, click Browse and choose the alternate volume where you want your VM to reside.
For better organization of the file on the volume, create a new folder to place the files in or just type the name of the folder you want to create in the path line within the wizard.
- Click Finish on the Completing Move Wizard page and wait for the process to complete. Your VM will remain running the entire time. To test, you can set continuous ping commands to the server Ping <ServerName> -t. When the Storage Migration is complete it will drop one ping command.
In part two of this tip, I'll cover how to perform more than one Live Storage Migration at a time and offer some guidelines for avoiding bottlenecks and downtime when using this feature.
Dig Deeper on Improving server management with virtualization