vSphere fails to extend swap file from 0 KB to 134217728 KB

One of the clients in vSphere crashes, try to start the message: cannot extend swap file from 0 KB to 134217728 KB

 

The answers online are as follows:

There is not enough disk space for the virtual machine Server1 to start. So it shows that power on failed.

It is enough to migrate the data storage of the virtual machine to a storage with space.

 Checking the disk space did, and the problem was solved by migrating too. It's just that the migration took a long time.

 

So what is this "swap file"? The official documentation doesn't speak human words. Fortunately, I can find an explanation here:

https://www.vpsee.com/2012/03/how-to-reduce-vswp-size-by-using-memory-reservation/

 

vSphere will create a swap file of the same size according to the guest memory size. The guest memory is 128G, so a 128G swap file needs to be created at startup.

The article mentions that there are two solutions:

A. Move the swap file to a separate storage space
B. Modify the client memory reservation to the maximum value

 

It should be noted that the guest memory reservation value defaults to 0, and vSphere will create a swap file of the same size as the memory when starting the guest. The maximum value of the guest memory reservation is the guest memory size, and vSphere should not create a swap file at this time (to be verified).

 

Conclusion: Swap file space requirements should be considered when allocating memory to clients; memory reservations should be set when allocating large memory to clients.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325977265&siteId=291194637