VMware vSphere

 View Only
  • 1.  Failed to extend swap file from 0kb to 16777216kb

    Posted Feb 25, 2015 04:32 PM

    I'm keep the following error below when trying to create a Debian Linux VM.  I can create a Windows VM on the same Datastore and I have no problem.  I have over 500GB of free space on the LUN.  I tried different LUNs also with the same result.

    The environment is ESXi5.5 current build version.

    An error was received from the ESX host while powering on VM <VM-Name>.

    Failed to start the virtual machine.

    Failed to power on VM.

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

    Current swap file size is 0 KB.

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

    Thanks



  • 2.  RE: Failed to extend swap file from 0kb to 16777216kb

    Posted Feb 25, 2015 07:55 PM

    I have been able to work around the problem by editing the settings of the VM and changing from the Default Swap location to either the Datastore/VM.  Is there a default location where swap files are created? Maybe it's possible considering I have some datastores that are near capacity and it can't extend because it doesn't have the space - although you would think the error would state that.

    Thanks



  • 3.  RE: Failed to extend swap file from 0kb to 16777216kb

    Posted Feb 25, 2015 09:07 PM


  • 4.  RE: Failed to extend swap file from 0kb to 16777216kb

    Posted Feb 25, 2015 09:26 PM

    In my case the swap file is being controlled by the cluster which is storing it in the same directory as the virtual machine.

    With that being said, I made changes to a windows box (adding more RAM) and received the same error as I stated in my original post.  Any help would be much appreciated.



  • 5.  RE: Failed to extend swap file from 0kb to 16777216kb
    Best Answer

    Posted Feb 25, 2015 09:42 PM

    The datastore where VM resides have sufficient space ? If not you may need change the swap file to a different datastore, here is how to do: Configure a Virtual Machine Swapfile Location for a Cluster in the vSphere Web Client

    One workaround is set the Memory Reservation to the same size of RAM, this way VMware will not create a swap file for the VM.



  • 6.  RE: Failed to extend swap file from 0kb to 16777216kb

    Posted Feb 25, 2015 09:53 PM

    So the test box I created to replicate the problem was also failing to expand the swap and change datastores.  This is most likely a space issue and I was able to find a datastore to migrate and expand swap file on successfully to.  The puzzling part is that all the VMs on that datastore are Thick provisioned and the Datastore is showing 400GB of free space remaining (and there are no snapshots lingering on that Datastore).

    Thanks again for the quick response.