PowerCLI

Installing or removing packages fails with "BOOTx64.EFI not found" error - ESXi 7.0

While preparing my ESXi Hosts for the recently released ESXi 7.0 Update 3, I came across a strange issue. When I try to install or remove any packages using esxcli, the update failed with the following error message:

[KeyError]
"filename 'var/db/payloads/boot_loader_efi/BOOTx64.EFI' not found"
Please refer to the log file for more details.

Any updates using Update Manager / Lifecycle Manager did also fail. ESXi was running at 7.0.2 build-17867351, which correlates to ESXi 7.0 Update 2a. Using "esxcli software profile list" reveals that this was a fresh installation and no packages have been updated yet. The image was customized by adding the vmkusb-nic-fling using PowerCLI Image Builder. After some troubleshooting, I was able to reproduce the Issue which helped me to identify the root cause and I also found a solution to make updates functional again.

Read More »Installing or removing packages fails with "BOOTx64.EFI not found" error - ESXi 7.0

How to add the USB NIC Fling to ESXi 7.0 Base Image

Many people are using the USB NIC Fling by William Lam and Songtao Zheng in homelabs. To make a fresh installation or upgrade as simple as possible, I've created a new Image Profile that contains the USB NIC driver.

This article explains how to create a custom ESXi 7.0 Image including the NIC driver to either upgrade previous versions of ESXi or make a fresh  ESXi installation with USB NIC support.

Read More »How to add the USB NIC Fling to ESXi 7.0 Base Image

Export-ESXImageProfile fails with WinError 10054

When creating an ESXi ISO Image from VMware's Online Depot by using the PowerCLI command Export-ESXImageProfile -ExportToISO, the creation might fail with the following error message:

Export-ESXImageProfile : [WinError 10054] An existing connection was forcibly closed by the remote host

Creating an offline .zip bundle (-ExportToBundle) works without any problems. To work around this issue, create the .zip bundle first and then create the .iso file from the local software depot.Read More »Export-ESXImageProfile fails with WinError 10054

How to check NVMe Drives TBW in ESXi with PowerCLI

When working with SSDs, you have to keep an eye on its TBW ("Total Bytes Written" or "Terabytes Written"). A maximum TBW guarantee is typically provided by the vendor in their specifications. This value describes how data can be written to the entire device until the warranty expires. The current value can be checked with S.M.A.R.T.

This article explains how to check the TBW value on NVMe based drives running in an ESXi host with PowerShell or from the command line. If you have a SATA based SSD drive, check this article.

Read More »How to check NVMe Drives TBW in ESXi with PowerCLI

Get- and Set-VMLatencySensitivity PowerShell Function

The Get-VMLatencySensitivity, Get-VMLatencySensitivityBulk and Set-VMLatencySensitivity PowerShell functions configure can return and set the latency sensitivity level of a virtual machine. You can adjust the latency sensitivity of a virtual machine to optimize the scheduling delay for latency sensitive applications.

The function is part of my Virten.net.VimAutomation module, which is a set of PowerShell function built for managing, troubleshooting and automating VMware based platforms. The module can be easily obtained from the PowerShell Gallery and is available on GitHub.

Read More »Get- and Set-VMLatencySensitivity PowerShell Function

Get-VMHostVersion and Get-VMHostLatestVersion PowerShell Function

The Get-VMHostVersion and Get-VMHostLatestVersion PowerShell functions are aimed at helping you to identify the version at which your ESXi is currently running, and whether updates are available. Both are using a JSON based ESXi Build database which is also the backend for the ESXi Build Number History provided by virten.net.

The function is part of my Virten.net.VimAutomation module, which is a set of PowerShell function built for managing, troubleshooting and automating VMware based platforms. The module can be easily obtained from the PowerShell Gallery and is available on GitHub.

Read More »Get-VMHostVersion and Get-VMHostLatestVersion PowerShell Function

Convert-ScsiCode PowerShell Function

The Convert-ScsiCode PowerShell function decodes SCSI sense codes found in the vmkernel.log from ESXi hosts. It uses a JSON based SCSI Code database provided by virten.net. The function works just like my web-based SCSI Sense Code Decoder but allows you to integrate it in your automation scripts.

The function is part of my Virten.net.VimAutomation module, which is a set of PowerShell function built for managing, troubleshooting and automating VMware based platforms. The module can be easily obtained from the PowerShell Gallery and is available on GitHub.

Read More »Convert-ScsiCode PowerShell Function

How to use ESXCLI v2 Commands in PowerCLI

PowerCLI, a set of PowerShell extensions for vSphere, is a great tool for automating VMware configuration and management tasks. It allows you to change a lot of ESXi host and vCenter settings. A powerful cmdlet is Get-EsxCli which allows you to run ESXCLI tasks from your PowerCLI console. ESXCLI is the main configuration command on an ESXi host.

This post explains how to use the Get-EsxCli cmdlet with the new V2 interface, which is much more intuitive than the old method.

get-esxcli

Read More »How to use ESXCLI v2 Commands in PowerCLI

Getting Started with PowerCLI for Linux (PowerCLI Core)

powerclicoreBased on Microsoft PowerShell Core which enables users to use PowerShell on Linux, Mac and Docker, VMware has started to make PowerCLI compatible with the new PowerShell. This allows to run scripts that were previously only available for Windows on Linux or Mac based systems.

In this post I am going to give a quick startup guide to the installation and configuration of PowerCLI Core.

Read More »Getting Started with PowerCLI for Linux (PowerCLI Core)