WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

Quick Tip - Automating cpuUniformityHardCheckPanic configuration for ESXi Kickstart with USB

05.09.2024 by William Lam // Leave a Comment

To prevent ESXi from PSOD'ing when an Intel Hybrid Consumer CPU is detected with non-uniform capabilities, a workaround can be applied to ignore the uniformity miss-match which is needed before the ESXi installer fully boots up and also after the initial reboot.

For those looking to fully automate this process using ESXi Kickstart using USB as an example, there are two places where the kernel boot option must be added:

1) The first is the EFI\boot\boot.cfg file on the ESXi installer media (e.g. USB) where you will append to the kernelopt line as shown in the snippet below:

bootstate=0
title=Loading ESXi installer
timeout=5
prefix=
kernel=/b.b00
kernelopt=ks=usb:/KS.CFG cpuUniformityHardCheckPanic=FALSE
.....

2) The second must be added to the %post section of your ESXi kickstart, which will update the first ESXi bootbank's boot.cfg and ensure the kernel option is passed to ESXi when it reboots after installation:

%post --interpreter=busybox

sed -i '/^kernelopt=/ s/$/ cpuUniformityHardCheckPanic=FALSE/' /vmfs/volumes/BOOTBANK1/boot.cfg

Categories // Automation, ESXi Tags // ESXi, kickstart, usb

Quick Tip - Audit vSphere VMs configured with USB Controllers

03.07.2024 by William Lam // 6 Comments

Automation scales Operations, that is a phrase that I have used several times today in various conversations with colleagues and customers. I truly believe organizations can scale more efficiently and consistently when leveraging Automation and not be afraid of it or worse, attempting to avoid it at all cost!

In fact, Automation is a super power when it comes to the various reporting and auditing needs of an organization such as this recent inquiry in auditing all vSphere VMs that have been configured with a USB controller. The following PowerCLI snippet leverages  the vSphere API to check whether there are any VMs that have been configured with either a USB 2.x controller (VirtualUSBController) or USB 3.x controller (VirtualUSBXHCIController) and outputs that in a simple table format, as shown in the example below.

# Retrieve all VMs and only include Name and Device data
$vms = Get-View -ViewType VirtualMachine -Property Name,Config.Hardware.Device

$results = @()
foreach ($vm in $vms) {
    $haveUSB2Controller = $false
    $haveUSB3Controller = $false

    # Filter out devices that have USB 2.x and 3.x controllers & USB Devices (for mapping purposes)
    $devices = $vm.Config.Hardware.Device | where {$_.getType().Name -eq "VirtualUSBController" -or $_.getType().Name -eq "VirtualUSBXHCIController" -or $_.getType().Name -eq "VirtualUSB"}

    $usb2devices = @()
    $usb3devices = @()
    foreach ($device in $devices) {
        # Check whether USB controller is 2.x
        if($device.getType().Name -eq "VirtualUSBController") {
            $haveUSB2Controller = $true

            # Collect any connected USB devices on this controller
            foreach ($deviceKey in $device.device) {
                $usbDevice = $devices | where {$_.key -eq $deviceKey}
                $usbVid = [String]::Format("{0:x}", $usbDevice.Vendor)
                $usbPid = [String]::Format("{0:x}", $usbDevice.Product)
                $usb2devices += "${usbVid}:${usbPid}"
            }
        }

        # Check whether USB controller is 3.x
        if($device.getType().Name -eq "VirtualUSBXHCIController") {
            $haveUSB3Controller = $true

            # Collect any connected USB devices on this controller
            foreach ($deviceKey in $device.device) {
                $usbDevice = $devices | where {$_.key -eq $deviceKey}
                $usbVid = [String]::Format("{0:x}", $usbDevice.Vendor)
                $usbPid = [String]::Format("{0:x}", $usbDevice.Product)
                $usb3devices += "${usbVid}:${usbPid}"
            }
        }
    }
    # Only output VMs that have USB controllers
    if($haveUSB2Controller -or $haveUSB3Controller) {
        $tmp = [pscustomobject] @{
            VM = $vm.Name
            USB2Controller = $haveUSB2Controller
            USB2Devices = $usb2devices
            USB3Controller = $haveUSB3Controller
            USB3Devices = $usb3devices
        }
        $results+=$tmp
    }
}

# Format output (can easily output to CSV/Excel)
$results | ft

Here is an example screenshot listing only the VMs that have a USB controller and you can easily pipe the output to CSV or Excel for further processing rather than displaying the results in the console.

UPDATE (03/11/24) - The script above has been updated to also included all connected USB devices for either USB 2.x or 3.x controller found for a given VM. The format of the connected USB devices are vendorId:productId, which you can then use sites like DeviceHunt to get the friendly vendor/product name.

Categories // Automation, PowerCLI Tags // usb

Google Coral USB Edge TPU Accelerator on ESXi

05.10.2023 by William Lam // 58 Comments

Several weeks back, I came across a really strange post on the VMTN communities asking how to change the Device ID (DID) and Vendor ID (VID) for a USB Device that has been passthrough to a VM from ESXi? The device in question is the Google Coral USB Edge TPU (Tensor Processing Unit) Accelerator, which is a relatively in-expensive device that can help accelerate machine learning (ML) inferencing. With all the buzz these days with Generative AI and ChatGPT, I can only imagine its popularity has grown even further but I did not realize how popular this device has been in the community, especially for those wanting to use it with ESXi.

The initial observation reported by this user and also by many others in the Coral community was that ESXi was showing the incorrect VID/DID for the Coral USB device and because of this, it was not working correctly when passthrough'ed to a VM and they were looking for a way to change the DID/VID value from 1a6e:089a (Global Unichip Corp.) to 18d1:9302 (Google Inc.).

Interestingly enough, a couple of weeks ago, my buddy Alan Renouf had also shared that he recently purchased the Coral USB device, so I figured I would check with him first to see if he was observing the same behavior that was being reported, which he was. I had been going through the Github reports to try better understand the issue and some of the previous workarounds that users had done including disabling the vmkusb module, which I definitely not recommended, especially for more recent releases of ESXi where that will simply disable all USB functionality to your ESXi host.

I still could not wrap my head around the issue as the reports did not make any sense in terms of the DID/VID not being claimed correctly or that it needed to change to properly function. This also did not make sense when speaking with our USB expert (Songtao who also developed our USB Network Native Driver for ESXi), so I decided to bite the bullet and purchase the Coral USB device, which apparently is difficult to obtain unless you overpay on Amazon, which I did.

[Read more...]

Categories // ESXi, vSphere 7.0, vSphere 8.0 Tags // AI, Coral, ESXi 7.0, ESXi 8.0, ESXi 8.0 Update 1, TPU, usb

  • 1
  • 2
  • 3
  • …
  • 8
  • Next Page »

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • VMware Flings is now available in Free Downloads of Broadcom Support Portal (BSP) 05/19/2025
  • VMUG Connect 2025 - Minimal VMware Cloud Foundation (VCF) 5.x in a Box  05/15/2025
  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...