Solved

How to move a virtual memory swap file on ESXi v4.1

Posted on 2014-07-31
8
317 Views
Last Modified: 2014-08-04
I have a VM that I need to add 2 GBs of RAM to.  The datastore it's on only has 18 GBs of RAM.  I'm about to migrate a VM off of it that will free up storage.  But that will be a few days from now.  With that said...  I need to add more RAM to this other VM later this evening.  That will reduce my storage even lower and it's already at a very sketch amount.  How can I only move the virtual memory  file?  As I understand that's the .vswp file.  Would I just move it to a different datastore and update the .VMX file?  Then power on the VM and make sure it works?  Then power it down and add more virtual RAM?
0
Comment
Question by:gopher_49
  • 3
  • 3
  • 2
8 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 40231779
You can make some 4GB or even more per VM reserved memory resource, that will free allocated storage.
0
 

Author Comment

by:gopher_49
ID: 40231800
I'm confused.  What exactly do you mean?
0
 
LVL 119

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 500 total points
ID: 40231807
You edit the VMX file, and use

sched.swap.dir = /vmfs/volumes/datastore/

for the new location, make sure you unregister the VM, make the changes with vi or WinSCP, and then re-register the VM.

also see this VMware KB

http://kb.vmware.com/kb/1004082
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 62

Expert Comment

by:gheist
ID: 40231823
I mean:
Edit vm settings
Resources
Memory
In reservation box type how much free space you need
Press OK
refresh storage and take back your disk space.
0
 
LVL 119
ID: 40231825
If you use memory reservations, it makes the SWAP file smaller, and the same size as the Reservation!

but you've then limited your size of SWAP file!

So you VM may not run as well with limited memory.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40231841
That you can see in performance view....
If system does not get minimum required RAM it swaps and storage goes too slow.
0
 

Author Closing Comment

by:gopher_49
ID: 40238851
Per Mr. Hancock's instructions I used WinSCP in conjunction with the VMware KB.  It was a simple process and accomplished my exact goal.  I simply wanted to move the memory swap file for a particular VM to a different datastore.  Once moved via the VMware KB and WinSCP (easier to download via WinSCP and edit the .VMX files with notepad and upload back) I powered up the VM to make sure the swap file was no longer in the old datastore and was in the new one.  I then powered the VM down again and added more RAM and powered it back up.  I then also verified that the swap file in the new datastore grew in size..  Which it did..  All is good.
0
 
LVL 119
ID: 40238865
Glad to be of assistance!

Thanks

Andy
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Get host nic mac address 19 83
unable to unmount datastore/ re-add host 7 38
False expiration dates in Linked Mode vCenters? 2 35
Citrix UPM Compatibility with XenApp 6.0 4 63
HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
Teach the user how to join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:
This video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question