VMware Cloud Community
bwinchell2
Contributor
Contributor
Jump to solution

VM Guest OS Report - Truly

Hello,

I am going to ask the community on this one but I have a feeling I know the answer.  Hopefully someone has a creative way.

In the API, there is a VirtaulMachineGuestSummary.FullGuestName.  I believe this pulls from the section under VM Options -> General Options -> Guest OS and Version.

For a corporate environment, that is fine.  You should set that correctly.  The problem I have is in a multi-tenant service provider environment, that is not the best solution.  Here are the reasons:

  1. In a Service provider model, any Windows based system within the vDC needs to be on a Microsoft SPLA license.  And the Service Provider is responsible for reporting this
  2. Customers have the ability to spin up or tear down VMs as they see fit within their vDC
  3. The can actually go manually set/change the Guest OS and Version

I have a workflow that pulls the Guest OS info but how do I audit that to ensure customers did not change the Guest OS filed to Linux to circumvent the Windows license?

I was thinking the only real way would be through VMtools but there is no API option to call through the VMtools to capture that information.

Any help or ideas?

0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

If I'm interpreting the documentation at https://code.vmware.com/doc/preview?id=4206#/doc/vim.VirtualMachine.html correctly, vm.guest.guestFullName should be pulling the information via the VMTools.

The documentation entry for guest property of the VirtualMachine type says: Information about VMware Tools and about the virtual machine from the perspective of VMware Tools. Information about the guest operating system is available in VirtualCenter. Guest operating system information reflects the last known state of the virtual machine. For powered on machines, this is current information. For powered off machines, this is the last recorded state before the virtual machine was powered off.

View solution in original post

5 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

There are several ways to retrieve guest name

System.log(vm.guest.guestFullName);

System.log(vm.config.guestFullName);

System.log(vm.summary.guest.guestFullName);

System.log(vm.summary.config.guestFullName);

I think the first and the third variants utilize information from VMware Tools.

0 Kudos
bwinchell2
Contributor
Contributor
Jump to solution

Just so I am clear.

If you pull the Guest Os information via "vm.summary.guest.guestFullName", this is pulling the information via the VMtools of the guest (no way for the client to modify this) or it pulls it via the config of the VM itself (the client could modify the guest OS claim).

Thanks

B

0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

If I'm interpreting the documentation at https://code.vmware.com/doc/preview?id=4206#/doc/vim.VirtualMachine.html correctly, vm.guest.guestFullName should be pulling the information via the VMTools.

The documentation entry for guest property of the VirtualMachine type says: Information about VMware Tools and about the virtual machine from the perspective of VMware Tools. Information about the guest operating system is available in VirtualCenter. Guest operating system information reflects the last known state of the virtual machine. For powered on machines, this is current information. For powered off machines, this is the last recorded state before the virtual machine was powered off.

bwinchell2
Contributor
Contributor
Jump to solution

I will run some tests today and report back.

Thanks

0 Kudos
bwinchell2
Contributor
Contributor
Jump to solution

After running some tests, the vm.guest.guestFullName will talk directly to the VMtools and pull the OS info. 

If VMtools is not installed or not running, no guest OS.

Thanks

0 Kudos