Finding out Guest OS Running on a Virtual Machine



Bothered by SLOW Web UI to manage vSphere? Want to manage ALL your VMware vCenters, AWS, Azure, Openstack, container behind a SINGLE pane of glass? Want to search, analyze, report, visualize VMs, hosts, networks, datastores, events as easily as Google the Web? Find out more about vSearch 3.0: the search engine for all your private and public clouds.

VMware ESX and ESXi (a.k.a. vSphere Hypervisor) support the most guest operating systems among all the hypervisors. From the vSphere API, you can determine what operating system is installed on a virtual machine.

The related managed object is the VirtualMachine and there are multiple ways to find out the guest OS information:

1.     config property (type: VirtualMachineConfigInfo). It has sub-properties like alternateGuestName, guestFullName, and guestId as xsd:string type.

2.     Guest property (type: GuestInfo). It has same sub-properties except the alternateGuestName.

3.     Summary.config property (type: VirtualMachineConfigSummary). It has the same sub-properties as #2.

Although duplicated, they are consistent in values. So you can pick any one of them. Note that #2 works only when VMware Tools is installed in the guest OS, which we always highly recommend.

The alternateGuestName is only useful when the guestId is other*.

The guestId is defined as string, but really the values are limited by an enumeration with limited set of values that depends on releases. The following table from vSphere API reference lists all the possible values in vSphere 4.1.  This is the most accurate and reliable way to determine the operating systems.

The guestFullName is mainly used for display purpose. Windows 7, for instance, has value like “Microsoft Windows 7 (32-bit)” if it’s 32 bits; Ubuntu, “Ubuntu Linux (32-bit)”; Redhat, “Red Hat Enterprise Linux 5 (32-bit)”.

asianux3_64Guest Asianux Server 3 (64 bit)Since vSphere API 4.0
asianux3Guest Asianux Server 3Since vSphere API 4.0
asianux4_64Guest Asianux Server 4 (64 bit)Since vSphere API 4.0
asianux4Guest Asianux Server 4Since vSphere API 4.0
centos64Guest CentOS 4/5 (64-bit)Since vSphere API 4.1
centosGuest CentOS 4/5Since vSphere API 4.1
darwin64Guest Mac OS 10.5 (64 bit)Since vSphere API 4.0
darwinGuest Mac OS 10.5
debian4_64Guest Debian GNU/Linux 4 (64 bit)Since vSphere API 4.0
debian4Guest Debian GNU/Linux 4Since vSphere API 4.0
debian5_64Guest Debian GNU/Linux 5 (64 bit)Since vSphere API 4.0
debian5Guest Debian GNU/Linux 5Since vSphere API 4.0
dosGuest MS-DOS.
eComStationGuest eComStationSince vSphere API 4.1
freebsd64Guest FreeBSD x64
freebsdGuest FreeBSD
mandriva64Guest Mandriva Linux (64 bit)Since vSphere API 4.0
mandrivaGuest Mandriva LinuxSince vSphere API 4.0
netware4Guest Novell NetWare 4
netware5Guest Novell NetWare 5.1
netware6Guest Novell NetWare 6.x
nld9Guest Novell Linux Desktop 9
oesGuest Open Enterprise Server
openServer5Guest SCO OpenServer 5Since vSphere API 4.0
openServer6Guest SCO OpenServer 6Since vSphere API 4.0
oracleLinux64Guest Oracle Linux 4/5 (64-bit)Since vSphere API 4.1
oracleLinuxGuest Oracle Linux 4/5Since vSphere API 4.1
os2Guest OS/2
other24xLinux64Guest Linux 2.4x Kernel (64 bit) (experimental)
other24xLinuxGuest Linux 2.4x Kernel
other26xLinux64Guest Linux 2.6x Kernel (64 bit) (experimental)
other26xLinuxGuest Linux 2.6x Kernel
otherGuest Other Operating System
otherGuest64 Other Operating System (64 bit) (experimental)
otherLinux64Guest Linux (64 bit) (experimental)
otherLinuxGuest Other Linux
redhatGuest Red Hat Linux 2.1
rhel2Guest Red Hat Enterprise Linux 2
rhel3_64Guest Red Hat Enterprise Linux 3 (64 bit)
rhel3Guest Red Hat Enterprise Linux 3
rhel4_64Guest Red Hat Enterprise Linux 4 (64 bit)
rhel4Guest Red Hat Enterprise Linux 4
rhel5_64Guest Red Hat Enterprise Linux 5 (64 bit) (experimental)Since VI API 2.5
rhel5Guest Red Hat Enterprise Linux 5Since VI API 2.5
rhel6_64Guest Red Hat Enterprise Linux 6 (64 bit)Since vSphere API 4.0
rhel6Guest Red Hat Enterprise Linux 6Since vSphere API 4.0
sjdsGuest Sun Java Desktop System
sles10_64Guest Suse Linux Enterprise Server 10 (64 bit) (experimental)Since VI API 2.5
sles10Guest Suse linux Enterprise Server 10Since VI API 2.5
sles11_64Guest Suse Linux Enterprise Server 11 (64 bit)Since vSphere API 4.0
sles11Guest Suse linux Enterprise Server 11Since vSphere API 4.0
sles64Guest Suse Linux Enterprise Server 9 (64 bit)
slesGuest Suse Linux Enterprise Server 9
solaris10_64Guest Solaris 10 (64 bit) (experimental)
solaris10Guest Solaris 10 (32 bit) (experimental)
solaris6Guest Solaris 6
solaris7Guest Solaris 7
solaris8Guest Solaris 8
solaris9Guest Solaris 9
suse64Guest Suse Linux (64 bit)
suseGuest Suse Linux
turboLinux64Guest Turbolinux (64 bit)Since vSphere API 4.0
turboLinuxGuest Turbolinux
ubuntu64Guest Ubuntu Linux (64 bit)
ubuntuGuest Ubuntu Linux
unixWare7Guest SCO UnixWare 7Since vSphere API 4.0
win2000AdvServGuest Windows 2000 Advanced Server
win2000ProGuest Windows 2000 Professional
win2000ServGuest Windows 2000 Server
win31Guest Windows 3.1
win95Guest Windows 95
win98Guest Windows 98
windows7_64Guest Windows 7 (64 bit)Since vSphere API 4.0
windows7Guest Windows 7Since vSphere API 4.0
windows7Server64Guest Windows Server 2008 R2 (64 bit)Since vSphere API 4.0
winLonghorn64Guest Windows Longhorn (64 bit) (experimental)Since VI API 2.5
winLonghornGuest Windows Longhorn (experimental)Since VI API 2.5
winMeGuest Windows Millenium Edition
winNetBusinessGuest Windows Small Business Server 2003
winNetDatacenter64Guest Windows Server 2003, Datacenter Edition (64 bit) (experimental)Since VI API 2.5
winNetDatacenterGuest Windows Server 2003, Datacenter EditionSince VI API 2.5
winNetEnterprise64Guest Windows Server 2003, Enterprise Edition (64 bit)
winNetEnterpriseGuest Windows Server 2003, Enterprise Edition
winNetStandard64Guest Windows Server 2003, Standard Edition (64 bit)
winNetStandardGuest Windows Server 2003, Standard Edition
winNetWebGuest Windows Server 2003, Web Edition
winNTGuest Windows NT 4
winVista64Guest Windows Vista (64 bit)
winVistaGuest Windows Vista
winXPHomeGuest Windows XP Home Edition
winXPPro64Guest Windows XP Professional Edition (64 bit)
winXPProGuest Windows XP Professional

Update: my colleague Christian Dickmann commented “@sjin2008 you should mention that the guest OS as reported by the #vSphere API is not authoritative and can be wrong.” Yes, there is slight possibility that you pick a OS while creating VM and install a different OS. Although possible, it’s not likely the case in real world projects.

This entry was posted in vSphere API and tagged , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.


  1. Christian DIckmann
    Posted March 19, 2011 at 11:40 pm | Permalink


    just to add to the question whether the information reported by vSphere is to be trusted: You are right, in traditional vSphere environment only human error would cause the OS info to be wrong, which is likely acceptable.

    But in a cloud/self-service environment the trust relationship gets redefined. You no longer have full trust in the guy deploying the VM, i.e. you have to assume he is not aware what he is doing or even malicious. So in a cloud environment, the guest OS info reported by vSphere is a hint, but shouldn’t be used for security policies or similar purposes.


  2. Posted March 20, 2011 at 2:47 am | Permalink

    Thanks for information. The guest OS information stored in the guest (type: GuestInfo) should be trustable because it’s reported by VMware Tools installed in a guest OS. If you don’t have VMware Tools installed, you don’t have it however. In a cloud/self-service environment as you suggested, a user may hack the VMware Tools to report wrong OS information. So you are right, there is no absolute trust.

  3. Dietrich Rebmann
    Posted September 17, 2014 at 6:56 am | Permalink


    on one of my VMs runs “Windows Server 2012 R2” but VirtualMachineConfigInfo#getGuestFullName() reports it as “Windows Server 2008 R2”.
    The VMWare Server itself displays the correct OS.
    I’m using “com.vmware:vijava:5.1”.
    Will this be fixed with vijava:5.5 or are there any plans to update the mentioned table?


  4. Posted September 17, 2014 at 10:40 am | Permalink

    I don’t think it’s related to the API itself. Most likely the VM was selected to Win2008 when it’s first created.


  5. sundeep
    Posted September 22, 2014 at 8:17 am | Permalink

    Hi Steve,

    I have imported ovf using VSphere java API, but after deployment and at the state of power on the VM execute a script which is already a part of ovf and ask few user input.
    Can you please share any code if you have to respond those inputs.
    1.Do you like to provide static ip [y/n]:
    2.Please select a desired option [1/2/3/4] from the list:

    I tried powerCLI script to handle but no success.

    I need it very urgent.


Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.