WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Hardware Options
    • Hardware Reviews
    • Lab Deployment Scripts
    • Nested Virtualization
    • Homelab Podcasts
  • VMware Nostalgia
  • Apple

Automated VMware Cloud Foundation (VCF) host commission using ESXi Kickstart

03.18.2024 by William Lam // 1 Comment

ESXi Scripted Installation (Kickstart) has been my go-to method for achieving zero-touch provisioning of ESXi hosts at scale, which I had started using back in the ESX 2.5 days when I was a customer! Having worked at some very larger enterprises, I got the opportunity to experience and manage a variety of environments for automated ESXi provisioning.

For more than a decade, I have written hundreds of articles about ESXi kickstart and how it can help solve a variety of use cases stemming from my own background to some of the unique requirements that have come up from some of our largest VMware customers. To date, some of my favorite ESXi kickstart solutions includes my 2014 blog post in automating VM deployments using a USB device which became the basis for my USB to SDDC project in 2017.

While playing with the latest VMware Cloud Foundation (VCF) 5.1 Holodeck release (currently in Beta), I was thinking about the current VCF host commissioning workflow, which is a multi-step process after an ESXi host has been provisioned where you need to manually (or using automation) to add the hosts to SDDC Manager before they can be consumed for either expanding and/or deploying a new workload domain.

I thought, why could we not just skip this step all together and that was when I had the idea of just incorporating the VCF host commissioning workflow automatically as part of an ESXi Kickstart installation! 😀

[Read more...]

Categories // Automation, ESXi, VMware Cloud Foundation Tags // ESXi, kickstart, VCF, VMware Cloud Foundation

Pre-release Microsoft OS/2 2.0 on ESXi

03.16.2024 by William Lam // 19 Comments

While catching up on my RSS news feed over the weekend, I came across an interesting article titled: Ancient pre-release version of OS/2 2.0 discovered, released in VM-friendly packages and of course the VM-friendly packages caught my attention but I had never heard of or used OS/2 before.

From the article, a software archaeologist known as Neozeed shared a pretty unique experience of installing a pre-release version of Microsoft and IBM OS/2 2.0 ...

A software archaeologist known as Neozeed recently shared a pre-release version of OS/2 2.0, an ambitious PC operating system that Microsoft and IBM were developing together in the 1990s before the former decided to pursue the Windows route.

and this was made possible with the use of the free version of VMware Workstation Player, where they had attributed to the speed of Workstation Player:

VMware is incredibly fast, it's the #1 reason why I had done this.

which I thought was a really cool shoutout for VMware Desktop Hypervisor team!

Neozeed also published a complete video for installing and configuring Microsoft OS/2 using Workstation Player for those intersted:

While I do use VMware Fusion for my macOS desktop, I was curious if the OS/2 VM could also run in ESXi (hint: it does) and wanted to see what the steps would be to run this piece of history on the latest ESXi 8.0 Update 2b release 🙂

Step 1 - Download the Internet Archive OS/2 Workstation VM image that was created by Neozeed

Step 2 - Create a new MSoS2-6.78 directory under your ESXi datastore and upload all files (except for the VMDK, it may fail if you are using vSAN storage like I am)

Step 3 - SCP the MSOS2-6.78.vmdk into the same directory where the rest of the configuration files

Step 4 - Next, we need convert the desktop hypervisor VMDK format to one that ESXi by running the following command in the ESXi Shell:

vmkfstools -i MSOS2-6.78.vmdk -d thin MSOS2-6.78-NEW.vmdk

Step 5 - Register the OS/2 VMX file and then attach the newly created VMDK and finally power on the VM!


Note: For the best desktop experience, connect to OS/2 VM using the Standalone VMRC Client.

Categories // ESXi, Workstation Tags // Microsoft, OS/2, workstation

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

  • « Previous Page
  • 1
  • …
  • 40
  • 41
  • 42
  • 43
  • 44
  • …
  • 565
  • 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

  • Is my NIC supported with Enhanced Data Path (EDP) with VCF 9.0 06/23/2025
  • PowerCLI remediation script for running NSX Edge on AMD Ryzen for VCF 9.0 06/20/2025
  • Failed to locate kickstart on Nested ESXi VM CD-ROM in VCF 9.0 06/20/2025
  • NVMe Tiering with Nested Virtualization in VCF 9.0 06/20/2025
  • VCF 9.0 Installer workaround for ESXi hosts with different vendor 06/19/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...