WilliamLam.com

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

Search Results for: vsphere MOB

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

What's in the new VMware vSphere Foundation (VVF) and VMware Cloud Foundation (VCF) offers?

01.08.2024 by William Lam // 152 Comments

Since the announcement of the two new VMware offerings: VMware vSphere Foundation (VVF) and VMware Cloud Foundation (VCF) at the end of 2023, I have been trying to wrap my head around the new offers and to better help me understand the next level of details, I have put together several diagrams across the various offers and applicable add-ons that can be purchased.

After sharing these diagrams internally, the feedback was extremely positive and I thought I would also share these diagrams with our users and partners who might still have questions around the new offers. I have also created a short URL which you can access by going to vmwa.re/skus

In addition, we have also published a VMware KB 95927 (Inventory Script) and VMware KB 96426 (Calculator Script) that can be used to help our users understand the new licensing model which uses both CPU cores and TiB (for vSAN storage sizing), please refer to the KB articles for more details.

Changelog:

  • 11/08/24 - Updated with new SKU offers (vSphere Enterprise Plus & VCF Edge)
  • 03/20/24 - Updated with VMware Live Recovery (VLR includes LSR & LCR) and Private AI Foundation Add-On
  • 02/16/24 - Updated VCF w/CSP + new VMware by Broadcom theme colors
  • 02/13/24 - Removed 8TiB minimal purchase per new VMware KBs & updated VCF w/VMware Data Services Manager (DSM)
  • 01/12/24 - Updated VCF w/TAM, PSO and Learning Service Add-On
  • 01/09/24 - Updated VCF w/CSP Add-On and VCDR/RWR/SRM Add-On for VVS/VVEP

VMware Cloud Foundation (VCF)


Products & Support Services includes:

  • SDDC Manager
  • vSphere Enterprise Plus
    • vCenter Server Standard
    • vSphere with Tanzu (includes TKG Runtime)
    • vSphere ESXi
  • vSAN Enterprise (includes 1TiB per CPU Core)
  • NSX Enterprise Plus
  • Aria Suite Enterprise
    • Aria Automation
    • Aria Automation Orchestrator
    • Aria Operations
    • Aria Operations for Logs
  • Aria Operations for Networks Enterprise
  • HCX Enterprise
  • VMware Data Services Manager (DSM)
  • Activation & Upgrade Support Service
  • Broadcom Software Maintenance
    • Support Account Manager (SAM) Support Services (highly recommended)

[Read more...]

Categories // VMware Cloud Foundation, VMware vSphere Foundation Tags // VCF, VMware Cloud Foundation, VMware Cloud Foundation Edge, VMware Validated Solutions, VMware vSphere Enterprise Plus, VMware vSphere Foundation, VMware vSphere Standard, VVF

New detailed GuestOS data in vSphere 8.0 Update 2

11.02.2023 by William Lam // 5 Comments

Your workloads are constantly changing both from an application standpoint but also the underlying guest operating system (GuestOS) including patches and upgrades. While many organizations have a change management database (CMDB), it can still be a challenge to true up that information from when the workload was first deployed to what it is currently running.

Back in 2019, VMware enhanced VMware Tools to make it easier to identify applications and processes that was running within a VM and this also provided a programmatic way for retrieving this inventory information which could then be fed back into their CMDB.

Applications are not the only things that change inside of a VM, the GuestOS probably receives the most updates (patches/upgrades) and being able to accurately inventory this information without relying on an in-guest agent is still a challenge for many.

In vSphere 8.0 Update 2, we have enhanced the available GuestOS data using VMware Tools and we have also made it easier to inventory and collect this information even when the VM has been powered off.

[Read more...]

Categories // Automation, vSphere 8.0 Tags // vmware tools, vSphere 8.0 Update 2

  • « Previous Page
  • 1
  • …
  • 3
  • 4
  • 5
  • 6
  • 7
  • …
  • 36
  • 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

  • Ultimate Lab Resource for VCF 9.0 06/25/2025
  • VMware Cloud Foundation (VCF) on ASUS NUC 15 Pro (Cyber Canyon) 06/25/2025
  • VMware Cloud Foundation (VCF) on Minisforum MS-A2 06/25/2025
  • VCF 9.0 Offline Depot using Synology 06/25/2025
  • Deploying VCF 9.0 on a single ESXi host? 06/24/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...