VMware vSphere

 View Only
  • 1.  Swap File Datastore unmount question

    Posted May 14, 2015 08:09 PM

    Hello,

    I'm currently moving VMs to newly created datastore as well the swap file datastore. I already change on all ESXi hosts the datastore were swap file will reside however, I still have some VMs on the old datastore. I know if I vMotion the VMs from one host to the other it will change the location for the swapfile. My question is, Can I just unmount the old datastore without affecting production of does VMs were the swapfile still on the old location? Just trying to look for a faster option than vMotion each single one of the VMs.

    Thanks for any suggestion or feedback!

    Chris



  • 2.  RE: Swap File Datastore unmount question

    Posted May 15, 2015 08:32 AM

    if some of the VMs swap files are still located on old swap datastore, you won't be able to unmount it anyway.

    I think vMotion is the best way out from this situation to empty up swap datastore.



  • 3.  RE: Swap File Datastore unmount question
    Best Answer

    Posted May 15, 2015 11:10 AM

    Hi,

    As long as all the hosts are no longer using the data store and the cluster is not set to be using host swapfile volume (rather than store with VMs) then you should be able to unmount the old swap volume.

    Bare in mind, vMotion/svMotion a VM you will have to make sure all the files move and the VM is set to store its swap with virtual machine files. Check that the old swap volume is no longer in use and unmount it then. The quickest way in theory is to make sure all VM's are set to store swap with virutal machine files and power them off and on again, forcing a new .vswp file in the same locaiton. But this would of course affect your VM uptime.

    I have seen in the past that even though the volume was no longer used by any hosts, that all hosts needed a reboot before I was able to unmount the old swap data store, just in case you experience that!