VMware Cloud Community
Stampede
Contributor
Contributor
Jump to solution

Missing Swap Files in VM Transfer

Hi Everyone,

I've been looking for a solution to this issue I'm having. I transferred all my VM's from one location to another and didn't realize the swap files were left in a separate data store. Sure enough that data store has now been wiped clean and my VM's won't boot without the swap files.

  Are these VM's trashed? Or is there a way to recover them without the original swap files?

Thanks for any advice!!

Peter

Tags (2)
0 Kudos
1 Solution
4 Replies
joshopper
Hot Shot
Hot Shot
Jump to solution

Swap files are created at boot time so this typically wouldn't be an issue as far as I know (I will test in a lab later). In the meantime since the swap files clearly weren't stored with the VMs are the VMs still trying to create the swap files in that alternate location and is that location still accessible? You can change the default location to "Store with virtual machine" and see if they will boot. You can also test a single machine and reserve all of its memory and see if it will boot.

-J.

0 Kudos
Stampede
Contributor
Contributor
Jump to solution

Thanks joshopper,

That's what I noticed in the past, when I changed datastore location it would just create a new swap file. But since I got this error I reassessed that assumption thinking maybe vSphere copied the existing swap rather then creating a new one. Good to know that it is a fresh build on start up!

I've run through all possible swap file settings, and the new data stores have plenty of available space.

Here is the exact error I see when I set it to "Store with virtual machine"

Failed to create swap file '/vmfs/volumes/53c63036-4a12ebfc-c8d0-00221982bfe2/vmx-wwgen_VEEAMHost01-1525547079-1.vswp' : Not found

Could not start VMX: msg.vmk.status.VMK_NOT_FOUND

I even removed the VM, went back and added the VMX to inventory, and then removed the hard drive and pointed a new virtual hard drive to the proper VMDK file. So by all means I feel it should be working.

Something is probably not being addressed properly, as in it's looking for a directory that doesn't exist. I just don't know where that directory setting is and can be changed.

Thanks,

Peter

0 Kudos
Stampede
Contributor
Contributor
Jump to solution

Thank you joshopper for putting me down the right path (sorry didn't see your post jinuv, you were right!). Apparently my ESXi host did not have any settings for host swap file datastore.

Here is a link to the VMware manual that pointed me to where this should be set: VMware vSphere 5.1

Basically select the host in the inventory, goto the configuration tab, under Software select Virtual Machine Swapfile Location, then set to the datastore location of choice.

After that I was able to power on and bring my VM's back to life!

Thanks All!!

0 Kudos