How To Guy

How to Mass Storage vMotion

The best thing about storage vMotion? Migrating VMs whether powered off, or on.

With the recent addition of a SAN to my home lab (see my Q&A with Drobo to learn more about it), I wanted to move all my virtual machines from the old SAN (I won't mention any names) to the new SAN. In the "olden days of virtualization," you would have to use Windows copy, SCP, or FTP to move virtual disks "down" from the old and "up" to the new. Of course, virtual machines would also have to be shut down. Things are so much easier today.

Sure, I use svMotion here and there to move a VM's virtual disk. I have done it by right-clicking and clicking Migrate on the VM, in just about any of the vSphere client inventories. When I wanted to see what virtual machines were on what datastore or do a "drag and drop," I found it is also easy to go into the vSphere Client Datastores and Datastore Clusters Inventory and then do a simply drag and drop of a virtual machine from one datastore to another.

The best thing about storage vMotion is that, sure, you can migrate virtual machines anytime, manually, if they are powered off. But being able to move virtual machine's from one SAN to another with them powered on...now, that is simply amazing.

That power of svMotion has saved thousands of companies and administrators tons of downtime while increasing uptime (and profits). That's why I love svMotion.

So what if you need to move ALL the VMs on a particular datastore, LUN, or SAN (if the SAN just has one LUN and is relative small) to another? Perhaps some can be powered off, but others need to stay up. Those VMs could be tier-1 apps, DNS servers, or even your vCenter server. How do you do it? You don't want to do them one at a time. And no, you don't want to have to break out your dusty PowerShell book to write a script.

This may be "old hat" for those of you with large enterprise networks, but it had been a long time (what, with me just having one SAN) since I had to perform a mass storage vMotion of many virtual machines from one datastore to another.

After pondering the PowerShell approach, I wondered if I could mark multiple virtual machines and drag and drop them to another datastore, just like I would using Shift or Ctrl (or Command on a Mac) when I mark multiple files and drag and drop them to another network share.

Sure enough, it works. Here's how.

I went into the Datastores and Datastore Clusters Inventory, went to the datastore where I wanted to move the virtual machine from and clicked on the Virtual Machines tab. I marked all the virtual machines I wanted to move.

Choose VMs you want to move.

Figure 1. Choose VMs you want to move. (Click image to view larger version.)

I right-clicked on them and clicked Migrate.

Migrate them.

Figure 2. Migrate them. (Click image to view larger version.)

In the wizard that came up, I specified what the new datastore was and that I wanted to keep the same virtual machine disk type that I had before (thin vs. thick).

When I clicked Finish, immediately the virtual machines began moving, powered on or not, from one datastore to other.

The move is on

Figure 3. The move is on. (Click image to view larger version.)

After a few minutes, the virtual machines had completed their migration (of course the time will vary greatly depending on the number and size of the virtual machines).

Once completed (see Fig. 4), the virtual machines had all been migrated to my new datastore on the new SAN, all without downtime to powered on virtual machines (and their application users).

The move is done

Figure 4. The move is done. (Click image to view larger version.)

Storage vMotion is truly an amazing feature and not only does it make moving a running virtual machine from one datastore to another datastore easy, it also allows you to perform mass movements of VMs from one SAN/NAS to another SAN/NAS, as well as makes possible features like storage distributed resource scheduler (SDRS).

About the Author

David Davis is a well-known virtualization and cloud computing expert, author, speaker, and analyst. David’s library of popular video training courses can be found at Pluralsight.com. To contact David about his speaking schedule and his latest project, go to VirtualizationSoftware.com.

Featured

Subscribe on YouTube