Automation

Find Guest OS Type ID using PowerCLI

Have you needed to find the Guest OS type IDs that are used in Terraform or other automation in provisioning VMware vSphere virtual machines? There is a really easy way to find the Guest OS ID descriptions that are used when provisioning virtual machines in code, etc. Let’s see how to do this using PowerCLI to find the Guest OS Type ID descriptors.

Guest OS Type ID Descriptions to use in PowerCLI

You may be like me and in a situation where you are updating some scripts to provision virtual machines in Terraform, Packer, or other code and wanted to know the exact name of the Guest OS ID. To find the ID to use, we can use PowerCLI to come up with the list of values supported.

The simple PowerCLI code to do this is:

$osDesc = $viewObjEnvBrowser.QueryConfigOption($vmxVer,$viObjVmHost.ExtensionData.MoRef).GuestOSDescriptor
$osDesc | select ID
Find guest os type id using powercli
Find guest os type id using powercli

For my VMware vSphere 7.0 update 2a environment, the above code returns the following:

amazonlinux3_64Guest
amazonlinux2_64Guest
windows2019srvNext_64Guest
windows2019srv_64Guest
windows9Server64Guest
windows8Server64Guest
windows7Server64Guest
winLonghorn64Guest
winLonghornGuest
winNetEnterprise64Guest
winNetEnterpriseGuest
winNetDatacenter64Guest
winNetDatacenterGuest
winNetStandard64Guest
winNetStandardGuest
winNetWebGuest
winNetBusinessGuest
windows9_64Guest
windows9Guest
windows8_64Guest
windows8Guest
windows7_64Guest
windows7Guest
winVista64Guest
winVistaGuest
winXPPro64Guest
winXPProGuest
win2000AdvServGuest
win2000ServGuest
win2000ProGuest
winNTGuest
win98Guest
win95Guest
win31Guest
dosGuest
vmwarePhoton64Guest
crxPod1Guest
rhel9_64Guest
rhel8_64Guest
rhel7_64Guest
rhel6_64Guest
rhel6Guest
rhel5_64Guest
rhel5Guest
rhel4_64Guest
rhel4Guest
rhel3_64Guest
rhel3Guest
rhel2Guest
sles16_64Guest
sles15_64Guest
sles12_64Guest
sles11_64Guest
sles11Guest
sles10_64Guest
sles10Guest
sles64Guest
slesGuest
centos9_64Guest
centos8_64Guest
centos7_64Guest
centos6_64Guest
centos6Guest
centos64Guest
centosGuest
debian11_64Guest
debian11Guest
debian10_64Guest
debian10Guest
debian9_64Guest
debian9Guest
debian8_64Guest
debian8Guest
debian7_64Guest
debian7Guest
debian6_64Guest
debian6Guest
debian5_64Guest
debian5Guest
debian4_64Guest
debian4Guest
opensuse64Guest
opensuseGuest
asianux9_64Guest
asianux8_64Guest
asianux7_64Guest
asianux4_64Guest
asianux4Guest
asianux3_64Guest
asianux3Guest
fedora64Guest
fedoraGuest
oesGuest
oracleLinux9_64Guest
oracleLinux8_64Guest
oracleLinux7_64Guest
oracleLinux6_64Guest
oracleLinux6Guest
oracleLinux64Guest
oracleLinuxGuest
ubuntu64Guest
ubuntuGuest
coreos64Guest
other5xLinux64Guest
other5xLinuxGuest
other4xLinux64Guest
other4xLinuxGuest
other3xLinux64Guest
other3xLinuxGuest
other26xLinux64Guest
other26xLinuxGuest
other24xLinux64Guest
other24xLinuxGuest
otherLinux64Guest
otherLinuxGuest
darwin21_64Guest
darwin20_64Guest
darwin19_64Guest
darwin18_64Guest
darwin17_64Guest
darwin16_64Guest
darwin15_64Guest
darwin14_64Guest
darwin13_64Guest
darwin12_64Guest
darwin11_64Guest
darwin11Guest
darwin10_64Guest
darwin10Guest
darwin64Guest
darwinGuest
freebsd13_64Guest
freebsd13Guest
freebsd12_64Guest
freebsd12Guest
freebsd11_64Guest
freebsd11Guest
freebsd64Guest
freebsdGuest
os2Guest
netware6Guest
netware5Guest
solaris11_64Guest
solaris10_64Guest
solaris10Guest
solaris9Guest
solaris8Guest
openServer6Guest
openServer5Guest
unixWare7Guest
eComStation2Guest
eComStationGuest
otherGuest64
otherGuest
vmkernel65Guest
vmkernel7Guest
vmkernel6Guest
vmkernel5Guest
vmkernelGuest

So, if you are in doubt as to what these are in your VMware vSphere environment when putting together code for various operating systems, you can run this quick PowerCLI snippet and see the list of available values for use in automating your vSphere environment.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

One Comment

  1. Hi there, Thanks for sharing this, could you give me a steer on our you defined the variables you show in your code snippet?

Leave a Reply

Your email address will not be published. Required fields are marked *

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