Home > Blogs > VMware vSphere Blog


Storage vMotion Considerations when using dedicated VM Swapfile Datastore

I had a query recently asking if I could explain why the space usage on a dedicated VM swapfile datastore increased during a Storage vMotion operation. I did some testing in-house and noticed that  a second .vswp file is created on the dedicated VM swap datastore during a migration.

The reason why this occurs is that the VM's swapfile name is appended with a hash of the absolute path to the VM's config file, which is based on the VM's current home directory path. As a result, when you Storage vMotion the VM to a new home directory on a new datastore, its config file path changes, and therefore the hash we append to the swap filename changes too. This means that a new swapfile name for the destination VM must be created.  Since the swapfile has a new name for the destination VM, we can't use the old swapfile, so we need to copy/mirror the old swapfile over to the new swapfile, then destroy the old swapfile atomically with the VM switchover operation. So for a period of the Storage vMotion operation, both the old and the new swapfiles will exist.

Just something to keep in mind if you have a dedicated swap datastore for your VMs – you may see increases in space utilization during a Storage vMotion operation.

Get notification of these blogs postings and more VMware Storage information by following me on Twitter: Twitter @VMwareStorage

This entry was posted in Storage, vSphere and tagged , , by Cormac Hogan. Bookmark the permalink.
Cormac Hogan

About Cormac Hogan

Cormac Hogan is a senior technical marketing architect within the Cloud Infrastructure Product Marketing group at VMware. He is responsible for storage in general, with a focus on core VMware vSphere storage technologies and virtual storage, including the VMware vSphere® Storage Appliance. He has been in VMware since 2005 and in technical marketing since 2011.

One thought on “Storage vMotion Considerations when using dedicated VM Swapfile Datastore

  1. You really make it appear so easy along with your presentation but I in finding this topic to be actually something that I think I’d never understand. It seems too complicated and extremely large for me. I am having a look forward for your next put up, I’ll try to get the cling of it!

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>