WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Identifying vSphere with Tanzu Managed VMs

Identifying vSphere with Tanzu Managed VMs

04.25.2024 by William Lam // Leave a Comment

With an increasing number of customers enabling the vSphere with Tanzu capability, which is included in both VMware vSphere Foundation (VVF) and VMware Cloud Foundation (VCF), more and more Virtual Machines will be deployed using the more modern approach of declarative provisioning using the powerful VM Service feature.


When using the vSphere UI, you can easily distinguish between a vSphere with Tanzu managed VM from a traditional VM by checking whether it is provisioned within a vSphere Namespace or whether it contains the "Developer Managed" label as shown in the screenshot above.

However, how do you identify a vSphere with Tanzu managed VM when using the vSphere API for Automation purposes?

The fastest way to check whether a VM is associated with a vSphere Namespace can be accomplished by inspecting the parent Resource Pool of a VM, which is how a vSphere Namespace is implemented on the backend. There is a namespace property that is a part of the Resource Pool object and if this property is not empty, then it is a VM that is managed by vSphere with Tanzu and the namespace property will contain the name of the vSphere Namespace.

Using PowerCLI, we can easily demonstrate how to access this property using the vSphere API by running the following command for a particular VM:

(Get-VM "rocky9-02").ResourcePool.ExtensionData.Namespace


As you can see from the output, our VM named "rocky9-02" is a vSphere Managed VM because the namespace property is NOT empty AND we can see it has been provisioned under the "prod-02" vSphere Namespace, which matches what we see in the vSphere UI screenshot above.

If we attempt to run the command above for a non-vSphere with Tanzu VM, the output will simply be empty or null.

More from my site

  • Quick Tip - vCenter Server Advanced Settings Reference
  • Downgrading new VMware vSphere Foundation (VVF) or VMware Cloud Foundation (VCF) licenses to 7.x
  • Updating handshakeTimeoutMs setting for ESXi 7.x & 8.x using configstorecli
  • Quick Tip - New remote version of ESXCLI 8.x
  • vSphere with Tanzu using Intel Arc GPU

Categories // Automation, VMware Cloud Foundation, VMware Tanzu, vSphere 7.0, vSphere 8.0 Tags // VM Service, vSphere 7.0, vSphere 8.0, vSphere Kubernetes Service

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