VMware Cloud Community
niriwoing
Enthusiast
Enthusiast
Jump to solution

Changing Virtual Machine Swapfile Location and impact on vMotion?

Hi,

I have a DRS and HA enabled cluster of 2 ESXi 4.1 servers. We are having a problem with disk space issue on the LUN for which we are planning to change the virtual machine swapfile location to a different SAN LUN on each ESXi host. I will create 2 SAN LUNs, one for each host to store VM swap file. What I want to know is do I need to zone the SAN LUNs to both the servers or only one server? If I do not present these 2 LUNs to both the servers then will it impact the vMotion? Will vMotion be able to migrate VM from one host if SAN LUN on which swapfile resides is not accessible from another host?

Thanks in advance!!!!

0 Kudos
1 Solution

Accepted Solutions
Techstarts
Expert
Expert
Jump to solution

Please note when swap file is located on local datastore(unshared), when you vMotion the VM from one esx host to another esx host, vMotion time increases because during vMotion even swapfile is migrated as it has memory state of VM. So this explains why there is an impact.

Now coming to the point of storing VM Swap file on shared storage. In fact this is the best practises for two reasons.

1. You do not end up backuping the swap file

2. Your storage space is efficiently utilized

3. If you are replicating LUNS to remote site, you can exclude this LUN

If you need further details Please refer this white paper from netapps.

NetApp and VMware vSphere Storage Best Practices (TR-3749)

Hope it helps

Thank you,

Preetam Zare

With Great Regards,

View solution in original post

0 Kudos
4 Replies
MauroBonder
VMware Employee
VMware Employee
Jump to solution

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100408...

if

swap file not resides in shared storage, you will there problems with vmotion http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100765...

Please consider marking my answer as "helpful" or "correct"

*Please, don't forget the awarding points for "helpful" and/or "correct" answers. *Por favor, não esqueça de atribuir os pontos se a resposta foi útil ou resolveu o problema.* Thank you/Obrigado
niriwoing
Enthusiast
Enthusiast
Jump to solution

Hi MauroBonder,

Let me first explain you the scenario. There are 2 ESXi 4.1 servers, ESX1 and ESX2. Now, I will create LUN 10 and LUN11 then present LUN 10 to ESX1 and LUN 11 to ESX2. Now I am not sure if vMotion will perform normally with this setup because LUN 10 is presented only to ESX1 and LUN11 is presented only to ESX2?

Thanks!

0 Kudos
niriwoing
Enthusiast
Enthusiast
Jump to solution

We figured it out! If swapfile is not on a shared VMFS datastore then it will impact vMotion because destination host cannot access the swapfile.

All we needed was a little thinking instead of trying to simulate entire scenario.

0 Kudos
Techstarts
Expert
Expert
Jump to solution

Please note when swap file is located on local datastore(unshared), when you vMotion the VM from one esx host to another esx host, vMotion time increases because during vMotion even swapfile is migrated as it has memory state of VM. So this explains why there is an impact.

Now coming to the point of storing VM Swap file on shared storage. In fact this is the best practises for two reasons.

1. You do not end up backuping the swap file

2. Your storage space is efficiently utilized

3. If you are replicating LUNS to remote site, you can exclude this LUN

If you need further details Please refer this white paper from netapps.

NetApp and VMware vSphere Storage Best Practices (TR-3749)

Hope it helps

Thank you,

Preetam Zare

With Great Regards,
0 Kudos