Failover Clustering and Network Load Balancing Team Blog
Storage migration is a new feature in Windows 8 Server that allows moving the files for a virtual machine (VM) to a new location while the VM is running.
For example, suppose your VM’s files are currently on a SAN volume, but the SAN storage device is being retired. A new SAN is deployed and ready to take over. In previous releases you would have to shut down the VM, and then copy the files to the new SAN, then either ensuring the drive mapping was exactly the same or fix-up the configuration for the VM for the new paths.
In Windows Server 2012, you can leave the VM running and let the system move the files and perform configuration changes without taking the VM out offline..! Think how useful this will be for scenarios such as a volume that is either running out of space, or is over utilized. Provided that you have another volume that has spare capacity, you can move your VMs files on-the-fly to load balance or optimize capacity utilization.
For VMs that are managed by a cluster, you can move the VMs files by using the Move action in the Failover Cluster Manager and then select Virtual Machine Storage:
When you select Virtual Machine Storage, the Move Virtual Machine Storage dialog will open with the VM that you selected showing in the top pane:
The bottom-left pane shows the cluster managed storage available for placing VM files. The bottom-right pane is the contents of the volume/folder that is selected in the bottom left pain.
In the picture above, the bottom-left pane shows both Cluster Shared Volumes, I.E., Cluster Storage, and Cluster Disk 1. Cluster Disks will also be displayed if there is a cluster disk in the same cluster group as the VM. Since the disk is in the same group as the VM, the VM can use that disk to store its files. If you want to move a VM’s files to a disk, you need to first move the disk into the group with the VM, and then open the Move Virtual Machine Storage tool for the VM.
This tool provides a drag-and-drop experience: left-click and hold, and then drag the entire VM or just specific files of the VM to the bottom-right pane, and release. That will cause the Destination Folder Path column in the top pane to note the path where you want the VM file(s) to be moved to.
The picture below shows the VM contents expanded, which shows each file associated with the VM and the source column indicates where it currently exists. The bottom-left pane shows the volumes expanded to show folders where the VM’s files can be moved. Select the folder in the bottom-left pane, and drag the VM file(s), or the entire VM object, to the bottom-right pane to set the destination path for the files.
Once you have set the destination paths, click on the Start button - the dialog will close, and storage migration will start. You may notice in the Roles view of failover Cluster Manager the Information column will indicate that storage migration is running.
Storage migration can be a long running operation - the time it takes depends file size - the biggest files are usually the VHDs. Storage migration can take advantage of direct file copy, AKA Offload Data Transfer (ODX) - if the SAN supports it, or it will copy data using the network. If you close the Move Virtual Machine Storage tool, you’ll see the status of the migration in the Roles view of Failover Cluster Manager, enabling you to manage the cluster and do other tasks while the migration completes.
Once you press the Start button, the Hyper-V and Failover Cluster services will perform the storage migration - you can close the Failover Cluster Manager UI without interrupting the process.
The Move Virtual Machine Storage tool can work with more than one VM at a time. Simply select multiple VMs in Failover Cluster Manager and then select the same Move action and Virtual Machine Storage option. The following picture shows two VMs in the tool:
The Add Share button allows adding file share locations that can be used as destination folder paths for the VM. When the Add Share button is pressed, the path to the file share can be specified and then it will be added to the navigation tree in the bottom left pain – as shown below. Note that this control doesn’t verify that the share and folder selected have permissions or connectivity for all the nodes of the cluster to access. It’s important to check that any file share and folder that the VM is configured to use is accessible and that permissions are configured correctly so that the cluster managed VM can migration or failover successfully – please see Jose Barreto’s excellent blog article enumerating Test cases for Hyper-V over SMB.
After completing the storage migration, you can re-open the Move Virtual Machine Storage tool and see the new path in the Source Folder Path column, which is an easy way to verify that the migration completed successfully and to check the currently file locations for your VMs:
Hyper-V Manager has a wizard to move a VMs files, but it can only be used for VMs that are not managed by a cluster. If a VM is managed by a cluster and the Move action is selected from Hyper-V Manager, the following dialog will presented to let you know that you should move the cluster managed VM using live migration for the VM, or use the Failover Cluster Manager’s storage migration feature:
In summary, Windows Server 2012 empowers you to not only to live migrate VMs between servers, but also to move the storage of running VMs to new paths or devices using the Failover Cluster Manager’s storage migration feature – more options and better agility !!
This is great. But it doesn't appear that this any way to move the parent of a differencing VHDX without shutting down all the VMs that depend on it. Is that right?
Can you use mount points for cluster disks?
Any tips on how to script this via powershell?
I've been going thru the Failover Cluster-specific cmdlets and can't seem to find what's needed to hook into "Move Virtual Machine Storage" functionality of Failover Cluster Manager.
Closest I've found is the Move-ClusterVirtualMachineRole for live-migrating the VM config to a new host, but this doesn't seem to touch storage.
I'm int he process of doing exactly this procedure. However, I've run into a snag. I have many volumes that do not have a drive letter. I access them via GUID. This migration wizard doesn't seem to know how to handle those. Is there a PowerShell option for doing that that would let me use the GUID instead of drive letter? If not, what about using a drive letter for the volume for the migration and then changing it back to a GUID? Is that doable? If so, how? Any help would be greatly appreciated. I've had a rough time finding info on this.