Storage planning for Hyper-V Hosts (Part 5)

If you would like to read the other parts in this article series please go to:


New versions of the Windows Server platform typically introduce features that can enable new scenarios your business may want to take advantage of. A big concern of businesses with regard to IT is the possible downtime that can occur when some aspect of their server infrastructure needs to have maintenance performed on it. The reason for this concern is simple: any kind of downtime may lead to interruptions for customers that can result in lost revenue for the company.

Storage is one aspect of IT infrastructure that may require periodic or unanticipated maintenance. For example, if your business has a bunch of virtual machines running on a Hyper-V host cluster and one of the disks in the underlying physical storage of the cluster fails, your hardware RAID array will typically allow your virtual machines to continue to run without downtime. Instead of simply pulling the failed disk and replacing it with a hot spare however, you may want to move some VMs to a different cluster node to ensure continued availability in the event of sudden failure of a second disk in the same array.

What if you can’t afford a clustered host solution however and instead have only standalone Hyper-V hosts in your environment? In that case, if you’re still running Windows Server 2008 or Windows Server 2008 R2 on your Hyper-V hosts, you’re out of luck–there’s no way to move running VMs from one host to another without incurring downtime for the VMs. To provide additional flexibility for businesses that use non-clustered hosts like this, Microsoft introduced a new feature called Storage Migration beginning with Windows Server 2012. The following short description of Storage Migration and how it works is excerpted from my ebook “Introducing Windows Server 2012” from Microsoft Press which is freely available for download in PDF, EPUB and MOBIE format from this link.

Storage migration

Storage migration is a new feature of Hyper-V in Windows Server 2012 that lets you move all of the files for a VM to a different location while the VM continues running. This means that with Hyper-V hosts running Windows Server 2012, it’s no longer necessary to take a VM offline when you need to upgrade or replace the underlying physical storage. We briefly looked at storage migration in Chapter 2 in the context of performing a Live Migration without shared storage, so here we’ll dig a bit deeper and look at how storage migration actually works.

When you initiate a storage migration for a VM, the following takes place:

  1. A new VHD or VHDX file is created in the specified destination location (storage migration works with both VHD and VHDX).
  2. The VM continues to both read and write to the source VHD, but new write operations are now mirrored to the destination disk.
  3. All data is copied from the source disk to the destination disk in a single-pass copy operation. Writes continue to be mirrored to both disks during this copy operation, and uncopied blocks on the source disk that have been updated through a mirrored write are not recopied.
  4. When the copy operation is finished, the VM switches to using the destination disk.
  5. Once the VM is successfully using the destination disk, the source disk is deleted and the storage migration is finished. If any errors occur, the VM can fall back to using the source disk.

Storage migration of unclustered VMs can be initiated from the Hyper-V Manager console by selecting the VM and clicking the Move option. Storage migration of clustered VMs cannot be initiated from the Hyper-V Manager console; the Failover Clustering Manager console must be used instead. You can also perform storage migrations with PowerShell by using the Move-VMStorage cmdlet.

Running out of disk space

One scenario where Storage Migration can be a lifesaver is when you have a standalone Hyper-V host with VMs running on it and one of the VMs is running out of disk space, in other words, the VHD for that VM no longer has any room to grow on the underlying physical disk(s) on which the VHD file resides. By using Storage Migration in such a scenario, you can move the storage of that VM to a physical disk that has more free space so the VHD can continue to grow in size as needed.

Migrating CSV storage

Let’s say you have a Hyper-V host cluster that spans multiple cluster shared volume (CSV) LUNs and you want to move the VHD (or VHDX) files of one of your VMs from one CSV to a different one. Can you use Storage Migration to do this? Yes you can, and that’s another good use for Storage Migration i.e. providing flexibility in how you use clustered storage.

Migrating SAN storage

You might be thinking that because your organization has clustered Hyper-V hosts deployed that Storage Migration isn’t of any use to you. You’re likely wrong however. For example, let’s say your company is a large enterprise that has a Hyper-V host cluster that uses an older SAN (storage area network) for host storage, and you want to replace your SAN with a newer one from a different vendor–but without incurring any downtime for the VMs whose VHDs are stored on your current SAN. What should you do? You might try this:

  1. Create virtual disks on your new SAN, then create LUNs and present these LUNs to your clustered Hyper-V hosts.
  2. Use the Storage Migration feature to migrate the VHDs of the running VMs from your old SAN to the LUNs on your new SAN.

Note that this should work even if both SANs are connected to the same fabric with each SAN having its own device-specific module (DSM) on top of the multipath I/O software of your servers.

However, there is a certain amount of risk inherent in the above process because you’re presenting new disks to an existing cluster. So an alternate approach you might prefer to use is to do the following:

  1. Evict the inactive nodes on your old host cluster (on the old SAN).
  2. Assign the new LUNs (on the new SAN) to the evicted nodes.
  3. Create a new host cluster on your new SAN.
  4. Use the Live Migration feature to move the remaining nodes from the old cluster to the new one.

Of course, if your Hyper-V hosts are non-clustered then you can follow the first and simpler approach which involves Storage Migration.

Storage Migration considerations

Obviously the key here in terms of storage planning for Hyper-V hosts is this: If you want to be able to have the added flexibility of using Storage Migration in your environment, you need to deploy Hyper-V hosts that are running Windows Server 2012 or later. So if you currently have Windows Server 2008 or Windows Server 2008 R2 Hyper-V hosts deployed, you’ll need to start by upgrading them to Windows Server 2012 or Windows Server 2012 R2.

Apart from the version issue, there are a few other things you need to keep in mind concerning Storage Migration:

  • Be sure to apply all pending updates and hotfixes to your hosts before you perform a Storage Migration.
  • You can’t use Storage Migration if you used differencing disks to create your VMs.
  • You can’t use Storage Migration if your VMs are using pass-through disks.
  • You can roughly predict the time it will take to perform Storage Migration for a VM by simply using Explorer to copy the VM’s VHD from the source storage device to the destination one.
  • You can speed up a Storage Migration by creating a checkpoint (snapshot) of your VM before moving its storage. The reason for this is because creating a checkpoint of a VM makes its VHDs smaller and read-only, and Storage Migration can copy read-only files faster than writeable ones (and of course smaller files faster than larger ones).
  • If the disks you want to move have any internal RAID dependencies (for example using RAID 0 inside a VM) then you may run into problems if you try and move the storage using Storage Migration (or if you try to perform a Live Migration). Other than that however, both Storage Migration and Live Migration are “OS agnostic” i.e. they will work for any guest operating system supported by Hyper-V on that version of Windows Server.

Where to learn more

For more information about Storage Migration in Windows Server 2012, see the topic “High-Performance, Continuously Available File Share Storage for Server Applications Technical Preview” in the TechNet Library.

For additional information, see the blog post “Windows Server 8 – Truly Live Storage Migration” on the Team blog of MCS @ Middle East and Africa.

Also see the following posts by Ben Armstrong on his Virtual PC Guy blog:

If you would like to be notified when Mitch Tulloch releases the next part of this article series please sign up to the Real time article update newsletter.

If you would like to read the other parts in this article series please go to:

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top