posted

1 Comment

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