VMware

What is VMware Storage vMotion and How It Works

A look at What is VMware Storage vMotion and How It Works - By utilizing Storage vMotion, VMware administrators can relocate virtual machines on the fly, reprovision disks, reclaim space very easily

One of many hypnotic appeals to leveraging virtual infrastructure is the ability to move workloads around without any downtime. This is certainly true with the VMware vMotion operation that hooked most of us on virtualization the first time we were able to see it work in action. With VMware vMotion you are able to move around the compute resources to different ESXi hosts in a cluster. Another equally cool technology is VMware storage vMotion that allows moving virtual machines to different storage without any downtime. Let’s take a closer look at what is VMware storage vMotion and how it works.

What is VMware Storage vMotion and How It Works

Being able to move virtual machine disk files around between datastores all while the virtual machine is running, affords some incredible flexibility, especially for maintenance.ย ย Additionally, storage vMotion holds benefits to a VMware administrator that are not so evident such as the ability to optimize disks for performance and even transform between different disk types, such as from thick to think or vice versa. It also renames all virtual machine files to match the inventory name of the virtual machine. This includes virtual disks, configuration files, snapshots and .nvram files.ย  So to summarize the benefits:

  • Moving a virtual machine to a different datastore(s) while it is running
    • Allowing redistributing the load across datastores for performance
  • Changing the provisioning type of the virtual disk(s)
  • Renaming the underlying files of the virtual machine to match the inventory name

A few important requirements to keep in mind with storage vMotion are the following:

  • vCenter Server
  • Virtual machine disks must not be in non persistent mode – Need to be persistent or RDM
  • ESXi 4.0 and later do not require vMotion to be configured to perform storage vMotion
  • Host needs to be able to access both the source and the destination datastore(s)

As is documented by VMware, let’s look at the process that is involved with Storage vMotion.ย  It is aย six-step process that involves the following:

  1. Copying the virtual machine home directory to the destination datastore.ย  This includes the config, log, swap, and snapshots contained
  2. A “shadow” virtual machine is started on the destination datastore
  3. Virtual machine disk files are copied to the target datastore whileย changed block tracking keeps up with the changes that are made to the virtual disks during the copy
  4. Storage vMotion keeps repeating the copy process of changes made to the source over to the destination
  5. Once the copying of changes gets down to only a few outstanding changed blocks, Storage vMotion performs a “stun” operation to transfer the compute resources over to the shadow virtual machine.
  6. Once the compute resources are swapped over to the new “shadow” virtual machine that is now the primary virtual machine, the old virtual machine files on the source datastore are deleted

How to Storage vMotion a Virtual Machine

Let’s look at the process to perform a Storage vMotion of a virtual machine.ย  The below screens are from the new HTML5 UI.

Starting-the-virtual-machine-Storage-vMotion-migration-process
Starting the virtual machine Storage vMotion migration process
Choose-to-Change-Storage-Only
Choose to Change Storage Only
Choose-Configure-Per-Disk-to-customize-destination-for-each-file
Choose Configure Per Disk to customize destination for each file
Changing-the-location-for-each-file-with-Storage-vMotion
Changing the location for each file with Storage vMotion
Finalizing-the-Storage-vMotion-operation
Finalizing the Storage vMotion operation

The process to move a virtual machine to a different datastore with PowerCLI is extremely easy as well:

Move-VM -VM 'VM Name' -Datastore $datastore

Thoughts

As we have covered the topic –ย What is VMware Storage vMotion and How It Works – we see that Storage vMotion provides an extremely valuable tool in the toolbox of VMware administrators.ย  It allows relocating virtual machines to completely different storage without so much as a reboot!ย  It also allows reprovisioning the disk type, reclaiming space, evening out performance workloads, renaming the virtual machine files, etc.ย  Administrators can take advantage of this tremendous flexibility by decoupling the requirement of virtual machines living on a certain datastore once they are provisioned there.

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.