VMware Cloud Community
TheZealous1
Contributor
Contributor

Accidentally Edit the VM setting and increase the virtual hard disk size more than available space.

Hello all,

I am new to VMware and seeking for help here. I am running in a single server with 2 x 1TB hark disk, runing on Vmware ESXi 5.5. One of the VM I had installed is running on a Windows 7 client. When I created this Windows 7, I assigned the hard disk for this VM is 250GB. I was messing around and accidentally increased the hard disk space to 700GB, which is more than the available disk space on the datasource  allow.

The Vm has Thick provision Lazy Zeroed. Now when I edit the setting again and try to down grade the virtual hard disk size back to 250GB, The status said configuration completed. But when I try to power on the VM, I got this error message:

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 4194304 KB.

Is there a solution to fix this problem? I learned my lesson and will be careful next time Smiley Happy. Any help would be very appreciated.

I have also attached a screenshot of the error for you to take a look.

Thanks,

TZ

Tags (4)
0 Kudos
6 Replies
rcporto
Leadership
Leadership

If you make a memory reservation of 4GB of RAM to this VM you will be able to Power On this VM (of course if there is free RAM on host), cause a memory reservation of 4GB will eliminate the use of .vswp file.

But to reclaim allocated space without free space to backup the actual vmdk or vCenter to make a Storage vMotion and convert to thin provisioning, I can't recommend a safe way 😞

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto
0 Kudos
TheZealous1
Contributor
Contributor

Richardson,

Thanks for the reply. There is currently 4GB of RAM assigned to this VM when I first created it (see screen shot from previous post). I just make the change and upgraded the RAM from  4GB to 8Gb . Then tried to power on this VM but still cannot get it to work. I still get the same message. Not sure what I am doing here is wrong though.

All I need to do is to boot this Vm up to Windows, login, backup the data in it, then I can wipe it clean.

Any other suggestions?

Thanks,

TZ

0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee

Hi Friend,

Try below KBs:

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

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

Rodrigo Tuval: VMWare Powering on a virtual machine fails with the error: Failed to extend swap file...


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

0 Kudos
Wh33ly
Hot Shot
Hot Shot

The fastest is to create a memory reservation equal to the size you have now (say 4 GB), no swap file will be created then. This hopefully will let your VM start so you can do some cleaning Smiley Wink

- edit settings -> resources -> memory

- change the Reservation to 4096 MB

- Start VM

0 Kudos
bayupw
Leadership
Leadership

Agree with above posts

You can edit settings of the VM and set a memory reservation to 4096MB, see below screenshot.

Creating a memory reservation with the same size as the memory assigned to the virtual machine will prevents the creation of a swap file as described in KB articles posted by vickyvision.

reservememory.jpg

If you want to shrink/resize the disk back, one way you can use vCenter Converter to resize VMware vCenter Converter: P2V Virtual Machine Converter | United States

Bayu Wibowo | VCIX6-DCV/NV
Author of VMware NSX Cookbook http://bit.ly/NSXCookbook
https://github.com/bayupw/PowerNSX-Scripts
https://nz.linkedin.com/in/bayupw | twitter @bayupw
0 Kudos
markdjones82
Expert
Expert

I would suggest doing a Vmware Converter on the disk and you can resize the disk that way as well.

http://www.twitter.com/markdjones82 | http://nutzandbolts.wordpress.com
0 Kudos