WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / How to distinguish between classic vSphere VMs vs vSphere IaaS Pod VMs? 

How to distinguish between classic vSphere VMs vs vSphere IaaS Pod VMs? 

12.19.2024 by William Lam // Leave a Comment

Not all vSphere-based VMs are the same! This is especially true with the introduction of vSphere IaaS (formally known as vSphere Supervisor or vSphere with Tanzu or Project Pacific) which includes a modern way of provisioning a traditional/classic VM but also a new VM-based form factor known as vSphere Pod VMs.


There was a recent question internally about how you could you distinguish between traditional/classic VMs built from vSphere UI or API versus the vSphere Pod VMs using PowerCLI and specifically using the default Get-VM cmdlet?

As you can see from the screenshot above, there are a few types of VMs that vSphere can provision and manage from the traditional/classic VMs we all know and love for the past two decades to specialized "Service/Agent" VMs that are managed by various VMware or 3rd party solutions to the new vSphere IaaS VMs and vSphere Pod VMs (which I refer to as Supervisor VM and Supervisor Pod VM).

While the Get-VM cmdlet does not distinguish between the various types, there are various properties that can be used within the vSphere API to help us distinguish between the different types of VMs. I will not bore you with the details, but you see the code snippet I wrote below on how to identify between the different VMs types, which can helpful for automation and/or reporting purposes.

$vms = Get-Vm

$results = @()
foreach ($vm in $vms) {
    if($vm.GuestId -eq "crxPod1Guest" -or $vm.GuestId -eq "crxSys1Guest") {
        $vmType = "Supervisor Pod VM"
    } elseif($vm.ExtensionData.Config.ManagedBy -ne $null) {
        switch($vm.ExtensionData.Config.ManagedBy.ExtensionKey) {
            "com.vmware.vim.eam" {$vmType = "EAM Managed VM"}
            "com.vmware.vcenter.wcp" {$vmType = "Supervisor VM"}
            "default" {$vmType = "Other 2nd/3rd Party Managed Classic VM"}
        }
    } else {
        $vmType = "Classic VM"
    }

    $tmp = [pscustomobject] @{
        Name = $vm.Name
        Type = $vmType
    }
    $results+=$tmp
}

$results | FT | Sort-Object -Property Types

Here is an example output from the script for the exact same environment as the vSphere UI screenshot but now you have a way to distinguish between the various types of VMs managed by vSphere.

More from my site

  • Customizing vCenter Alarm Email Subject and Body
  • Automatically Remediating SvMotion / VDS Issue Using vCenter Alarms
  • Quick Tip - Install kube-vip as service load balancer with Tanzu Community Edition (TCE)
  • Direct playback & download URLs for all VMworld 2019 EU Sessions
  • Hiking Trails

Categories // Automation

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

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

  • 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
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/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...