VMware Cloud Community
Kurt4049
Contributor
Contributor
Jump to solution

Memory capacity issues starting up VM's - VMK_NO_SPACE

Scenario:

Our customer has a VMWare ESXi 5.5 host with three Windows 7 Pro 64 bit VM's on it.  We did not set this up nor did the customer.  A previous IT company set it up for them and there's no way to get in touch with them as they have since dissolved.

Our customer just checked in on their VMWare environment and found that two of the three VM's will not power on.

I jumped into it and found that the first VM (the one that was powered on) has 20 GB of memory, the host itself has 60.  The other 2 VM's also had 20 GB set on them.

When I tried to turn them on, I got:

Failed to start the virtual machine.

Failed to power on VM.

Could not power on VM : msg.vmk.status.VMK_NO_SPACE.

Current swap file size is 0 KB.

Failed to extend swap file from 0 KB to 20971520 KB.

Troubleshooting:

I then kept reducing the memory in half (getting the same error every time with the appropriate number of KB at the end of the error) until I set them both to 2 GB of memory, then they were able to start up.

After further toying with it, it looks like I can only split 5 GB between the other two before I start getting the error again.

Question:

Don't ask me why the VM's need 20 GB of memory, the customer just told me that they used to work just fine with having all three VM's at 20 GB of memory, but why would these stop working all of a sudden until applying a much lower memory amount to them?

I did look at the article below, but it did not help:

VMware KB: Powering on a virtual machine fails with the error: Failed to extend swap file from 0 KB ...

1 Solution

Accepted Solutions
Alistar
Expert
Expert
Jump to solution

Adding to vuzzini's answer - if you happen to run out of space on the datastore, set a Memory Reservation for the VMs so that their significant part fit in the memory, or just enough so that a swap file can be created on your designated storage. The amount of reserved memory is subtracted from the .vswp file.

If the host has 60GB Memory in total, you will need 2,6 GB Mem free for the hypervisor, plus additional 1270MB - let's say 1,3GB RAM to avoid memory reclamation techniques from engaging. In total, leave at least 4GB free for the hypervisor and spread out the 56GB remaining memory as reservations. This would be 18GB reservation/VM.

Let us know how it turned out Smiley Happy

Stop by my blog if you'd like 🙂 I dabble in vSphere troubleshooting, PowerCLI scripting and NetApp storage - and I share my journeys at http://vmxp.wordpress.com/

View solution in original post

Reply
0 Kudos
7 Replies
vuzzini
Enthusiast
Enthusiast
Jump to solution

Hello Kurt4049,

Could you please first check what's the swap location of the VM ?

The error message msg.vmk.status.VMK_NO_SPACE would usually occur if the swap file directory is full and there is no sufficient space on the datastore to create a swap file for the VM while the VM is being powered on.


There might be only limited amount of free space left on the datastore where the swap file is being created. So when you assigned 5gb to each VM, it might have sufficed the swap file in the available free space and powered on the VM.

If you found this or any other answer useful please consider the use of the Helpful or Correct buttons to award points. Sandeep Vuzzini Sr. DevOps Engineer
Alistar
Expert
Expert
Jump to solution

Adding to vuzzini's answer - if you happen to run out of space on the datastore, set a Memory Reservation for the VMs so that their significant part fit in the memory, or just enough so that a swap file can be created on your designated storage. The amount of reserved memory is subtracted from the .vswp file.

If the host has 60GB Memory in total, you will need 2,6 GB Mem free for the hypervisor, plus additional 1270MB - let's say 1,3GB RAM to avoid memory reclamation techniques from engaging. In total, leave at least 4GB free for the hypervisor and spread out the 56GB remaining memory as reservations. This would be 18GB reservation/VM.

Let us know how it turned out Smiley Happy

Stop by my blog if you'd like 🙂 I dabble in vSphere troubleshooting, PowerCLI scripting and NetApp storage - and I share my journeys at http://vmxp.wordpress.com/
Reply
0 Kudos
Kurt4049
Contributor
Contributor
Jump to solution

Hey vuzzini,

Thanks for taking the time to reply and help.  Under the Configuration tab of the host, the Swapfile Location shows as Virtual machine directory.

Reply
0 Kudos
Kurt4049
Contributor
Contributor
Jump to solution

Hello Alistar,

Thanks for the reply and the help.  I'm not exactly sure how to check if I'm out of space on the datastore.  I don't see any place within the vSphere client to check that.  Am I looking in the wrong place?

Reply
0 Kudos
Wh33ly
Hot Shot
Hot Shot
Jump to solution

Previous answers are right, to check the datastore it might be easiest.

Not sure if you use the Webclient I guess you do, just select your VM, in the "VM Hardware section" you shoud have some harddisks., Expand these and you'll see the location where they are stored.

From that point you can click on them and will go the the datastore. Here you'll see your free disk space on that datastore.

Like mentioned before if you create 3x20 GB memory VM's without a reservation the amount of memory will be claimed as swap file.

In this example no extra disks are added.

So let's say you have a 50 GB of free disk space left on this datastore and all 3 VM's are placed on this datastore.

As soon as you power them on 3x20GB of diskspace will be claimed as a swap flle, in this example 2 machines will be powered on while the third will give an error about too less disk space.

If you use a memory reservation for these machines, the swap file isn't claimed and this will work. I guess that the machines have been running great but somehow the datastore got filled by snapshots, extending disks etc.

Hope this will get you a bit further

vuzzini
Enthusiast
Enthusiast
Jump to solution

Hello Kurt4049,

Now go ahead and check on which datastore the affected 2 VM's are running, Select the Host > Configuration > Datastores and see whether the datastore (on which affected 2 VM's are running) is having sufficient free space or not. If there is less than 90 GB free space, you need to increase the space.

If you found this or any other answer useful please consider the use of the Helpful or Correct buttons to award points. Sandeep Vuzzini Sr. DevOps Engineer
Reply
0 Kudos
Kurt4049
Contributor
Contributor
Jump to solution

Thanks to everyone for all of the help!  I ended up reserving 18 GB per VM and this fixed the issue.  They could all boot up at once again.

On a side note, I ended up also deleting the other 2 VM's and just cloning the one that was working as the customer told me to do this after your help.

But they are all working and I owe that to you guys, thank you!

Reply
0 Kudos