WilliamLam.com

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

How to create a customized ESXi ISO without vCenter Server?

02.01.2022 by William Lam // 28 Comments

Historically, if you needed to create a customized ESXi ISO that included additional ESXi drivers, your only supported option was to use the vSphere Image Builder service, which has a dependency on vCenter Server. If you have an existing vCenter Server, this was not a problem and you could easily create a customized ESXi ISO using either the vSphere UI (example here) or the CLI with PowerCLI (example here).

Where this becomes a real challenge is for a greenfield or brand new deployment, where the default ESXi ISO can not be used as it does not contain the required networking and/or storage drivers for the desired hardware platform. Although this affects some customers who use hardware from the VMware HCL but it definitely has a bigger impact on the VMware Homelab community or anyone just getting started for the very first time.

While discussing this topic with a colleague recently, I actually came to learn about an alternative solution for creating a customized ESXi ISO without the need of vCenter Server! Thanks to fellow team member Blair Fritz, who now works in the VMware Cloud Product Management team, for the awesome tip.

[Read more...]

Categories // Automation, ESXi, Home Lab, PowerCLI, vSphere Tags // image builder, New-IsoImage, PowerCLI

Retrieving VM DRS Score using vSphere API and PowerCLI

01.27.2022 by William Lam // 2 Comments

VM DRS Score is a new feature that was introduced with the release of vSphere 7.0, check out this blog post by Niels for a closer look at how this feature can benefit your environment.


In the vSphere UI, this information is expressed as both a Cluster DRS Score and a VM DRS Score as shown in the screenshot above.

This information can also be retrieved programmatically using the vSphere API, as alluded in the title of this blog post. Using the vSphere API, there is a new property called SummaryEx under the ClusterComputeResource object which represents a vSphere Cluster from an API point of view. Here, you will find two new properties: drsScore and numVmsPerDrsScoreBucket which maps to the respective information found within the vSphere UI.

To demonstrate how to access these two new properties, below is a small PowerCLI function called Get-DRSScore which uses the vSphere API to retrieve this information and accepts a single parameter which is a vSphere Cluster object by using the Get-Cluster cmdlet.

Function Get-DRSScore {
    param(
        [Parameter(Mandatory=$true)][VMware.VimAutomation.ViCore.Impl.V1.Inventory.ComputeResourceImpl]$Cluster
    )

    $drsScoreBuckets = @("0%-20%","21%-40%","41%-60%","61%-80%","81%-100%")

    $drsScoreResults = $Cluster.ExtensionData.SummaryEx | select DrsScore, NumVmsPerDrsScoreBucket

    Write-Host "Cluster DRS Score: $(${drsScoreResults}.DrsScore)`n"

    Write-Host "VM DRS Score"
    $count = 0
    foreach($i in ${drsScoreBuckets}) {
        Write-Host "${i} - $(${drsScoreResults}.NumVmsPerDrsScoreBucket[$count]) VMs"
        $count++
    }
    Write-Host
}

Here is an example of using the function and the output matches what is shown in the vSphere UI.

Get-DRSScore -Cluster (Get-Cluster Cluster-1)

Categories // Automation, vSphere 7.0 Tags // drs, PowerCLI, vSphere 7.0

Quick Tip - Retrieving vSphere Distributed Switch (VDS) DVPort ID & Stats using PowerCLI

07.14.2021 by William Lam // Leave a Comment

I have seen several variations of this question get asked internally on how how to retrieve the DVPort ID and/or Stats on a vSphere Distributed Switch (VDS). Usually the question is prefaced with an example output from an ESXi host like the one show below using a classic CLI called esxcfg-vswitch. As you can see, there are a number of DVPort IDs which are either mapped to a physical NIC on the ESXi host or to a specific VM and its network adapter, if there is more than one.


My usual response for these sort of questions is that yes, it can be programmatically and automatically retrieved without going directly to an ESXi host. The answer is by using the vSphere API and specifically the set of methods provided by the VirtualDistributedSwitch managed object, which will allow users to retrieve all things related to the VDS.

Note: Although PowerCLI does provide some higher level cmdlets for managing VDS and Distributed Virtual Portgroups (DVPG), not everything that is available in VDS API is available through these higher level cmdlets, but that does not mean you can not use PowerCLI to easily retrieve all this additional information.

[Read more...]

Categories // Automation, PowerCLI, vSphere Tags // distributed virtual switch, PowerCLI, vds

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

  • Automating the vSAN Data Migration Pre-check using vSAN API 06/04/2025
  • VCF 9.0 Hardware Considerations 05/30/2025
  • 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

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...