VMware Cloud Community
MrVmware9423
Expert
Expert
Jump to solution

Swap on local storage will i able to perform a vMotion

Dear team,

I want to migrate vm1 from esxi1 to esxi2 , VM files are stored on shared storage except swap file stored on local storage . just want to confirm will i able to migrate this VM sucessfully if VM is poweredon.

regards

mr VMware

Reply
0 Kudos
1 Solution

Accepted Solutions
abhilashhb
VMware Employee
VMware Employee
Jump to solution

Yes.

Let me explain how this works. When you vmotion, the machines files are on shared storage and only the memory bitmap is moved from a host to another host right?

Now in your case all other files are available on shared storage for both hosts which are involved in the migration but the swap is present on a local storage of one of the hosts which has the VM now. once this VM migrates it needs to have access to swap or it will not work.

So what the new host will do is, it will create a swap file for the VM on the shared datastore so that nothing gets affected.

Abhilash B
LinkedIn : https://www.linkedin.com/in/abhilashhb/

View solution in original post

Reply
0 Kudos
8 Replies
abhilashhb
VMware Employee
VMware Employee
Jump to solution

You can migrate the machine if the storage where the .vswp is, is shared to other hosts in cluster. Since this can't happen in your case,

vMotion the virtual machines to another ESX/ESXi host in your cluster. This recreates the .vswp files on the destination datastore.

Abhilash B
LinkedIn : https://www.linkedin.com/in/abhilashhb/

MrVmware9423
Expert
Expert
Jump to solution

thanks abilash for update.

i din't understand what u r trying to say

SAN is shared on both esxi host, but vswap file of VM is stored on local storage, will i able to vmotion a VM to toher host if VM is poweredon

Reply
0 Kudos
abhilashhb
VMware Employee
VMware Employee
Jump to solution

Yes. It will create a new swap file.

Abhilash B
LinkedIn : https://www.linkedin.com/in/abhilashhb/

MrVmware9423
Expert
Expert
Jump to solution

u mean to say that, if swap stored on local we will be able to do vmotion but it will create a new swap file on datastore. plz correct me if i m wrong.

Reply
0 Kudos
abhilashhb
VMware Employee
VMware Employee
Jump to solution

Yes.

Let me explain how this works. When you vmotion, the machines files are on shared storage and only the memory bitmap is moved from a host to another host right?

Now in your case all other files are available on shared storage for both hosts which are involved in the migration but the swap is present on a local storage of one of the hosts which has the VM now. once this VM migrates it needs to have access to swap or it will not work.

So what the new host will do is, it will create a swap file for the VM on the shared datastore so that nothing gets affected.

Abhilash B
LinkedIn : https://www.linkedin.com/in/abhilashhb/

Reply
0 Kudos
MrVmware9423
Expert
Expert
Jump to solution

thanks Abhi,

If host create a new swap file then the swap file stores on local storage will be marked as zombie or orphan .

do we need to delete this file manually from local storage??

regards

Mr Vmware

Reply
0 Kudos
abhilashhb
VMware Employee
VMware Employee
Jump to solution

You can delete it.

Make sure the files are not associated with any machine.

Abhilash B
LinkedIn : https://www.linkedin.com/in/abhilashhb/

Reply
0 Kudos
Integr8
Contributor
Contributor
Jump to solution

Hi there,

I am also looking at putting some local storage into our hosts for vSWP.

You mention that the original vswp file becomes an orphan, does the host not delete the file or does this 'have' to be done manually.

Thanks in advance.

"I'll never turn to the Dark Side..."
Reply
0 Kudos