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:
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?
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.
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.
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
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.
I will run some tests today and report back.
Thanks
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