Skip to content


Patch ESXi to a Specific Version with the Command-line

This post describes how to patch an ESXi host to a specific version with the command-line. It is highly recommended to use the vSphere Update Manager (VUM) for patch management, but there are some cases where you need an alternative. It's probably noting you would do in production, but you might need a specific version to reproduce problems or to comply with policies.

In this example, I am going to patch a standalone ESXi 5.5 host with internet access to build number 2068190. The host is currently running ESXi 5.5.0 Build 2302651. (It's a downgrade)

Read More »Patch ESXi to a Specific Version with the Command-line

ESXi 5.5 - ESXCLI Command Mindmap

In vSphere 5.5 the command line interface esxcli has 3 new namespaces. The esxcli is a complete set of commands that you can use for troubleshooting, configuration or kickstart files. I have created and printed a mindmap to navigate through the namespaces more quickly. This post covers only basic namespaces, available on all ESXi 5.5 hosts. If you've installed additional software you might see more namespaces. I've also created a Mindmap for ESXi 5.1 some time ago.

ESXCLI in version 5.5 has 13 namespaces:Read More »ESXi 5.5 - ESXCLI Command Mindmap

Identify Virtual Machine Locks & Find ESXi Hosts by its MAC Address

I recently had an issues where a virtual machine crashed. VM Monitoring (VM HA) tried to restart it, but did not succeed. The virtual machine was greyed out in the inventory and could not be started because it was locked. Unfortunately, it was not possible to identify which ESXi host holds the lock. This post explains how to quickly identify which server is blocking the Virtual Machine.

Read More »Identify Virtual Machine Locks & Find ESXi Hosts by its MAC Address

Howto Shrink a Thin Provisioned Virtual Disk (VMDK)

Thin provisioned disks are a great feature to save capacity as you virtual machines filesystem will never use the full capacity. I do not know a single system where you do not have at least 10GB of free space for OS disks. I am not considering databases, applications or fileservers which will grow constantly. Having thin provisioned disk is usually no longer a performance problem so it is a valid design choice even in production.

A common issue with thin disks is that the size will grow when required, but never shrink. When you require the capacity only once you might want to get it back from the virtual machine. This post describes how to reclaim unused space from the virtual machine.

Read More »Howto Shrink a Thin Provisioned Virtual Disk (VMDK)

Disable Virtual Machine Swap File (.vswp)

For each powered-on virtual machine, a .vswp file is placed in the virtual machines directory on the datastore. This file is required by VMkernel to swap virtual machine memory to the disk in case of excessive overprovisioning. The swap file size can be calculated with the formula (.vswp File = Allocated Memory - Memory Reservation). As per default, the reservation is set to 0, so the .vswp file size is equal to the amount of virtual memory.

Read More »Disable Virtual Machine Swap File (.vswp)

Howto: ESXi SSH Public Key Authentication

Shell access to an ESXi host provides essential maintenance, configuration and troubleshooting commands. It can be used in cases that cannot be handled through the standard vSphere Client. In my case, I tend to have SSH activated by default. From a security perspective it is recommended to keep SSH disabled, but with the management network behind a firewall I feel secure.

If you are using SSH daily I am sure that you are familiar with the public key authentication. PKI is an authentication method that relies on a generated public/private keypair and enables the login without entering a password. This method is faster and more secure than entering a password manually because every administrator can have his own public/private keypair.

This post explains the methods how to enable and automate public key authentication with ESXi Hosts.


Read More »Howto: ESXi SSH Public Key Authentication