VMware Cloud Community
daphnissov
Immortal
Immortal
Jump to solution

Way to script VMware tools status option

When a new VM is created, or a VM is registered to a vCenter for the first time, the VMware Tools status will display "not running, not installed". The "not running" part is obvious if it's powered off. But the "not installed" portion refers to vCenter's "memory" of the version of tools installed on the system. Normally, it will pick this up when the VM first boots and it observes VMtools is running, or when VMtools is installed it picks up the version and type (guest-managed or "official"). If a VM is powered off and this status says "not installed", then it will fail to be customized with a spec throwing the error message "customization of the guest operating system is not supported in this configuration".

Would it be possible to tell vCenter this information? Is there an API for this? I'm trying to avoid having to automate a power-on/power-off cycle just to get vCenter to pick this info up. Any help is appreciated here.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

I saw that in the past, not sure if it is still valid for 6.5.


Try tricking the system into believing it's a supported Windows OS.

It's only the Config.guestID property, you can put any of the VirtualMachineGuestOsIdentifier  values in there, and still install whatever guest OS you want.
The alternative is/was that you needed to power on the VM at least once (still the case for the open VMware Tools I think).


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
7 Replies
LucD
Leadership
Leadership
Jump to solution

Which GuestOS did you specify when you created the VM? Was that a *nix flavour OS?

Is the VM perhaps created from an image that contains the open VMware Tools?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

Hi, Luc, and thanks again for your help. I'm only testing one VM type right now, and it's "centos-64" and is using open-vm-tools. I haven't tested this behavior with Windows (yet) using the official VMware tools package. Do you think this makes a difference? Can you maybe supply any more info on this behavior?

0 Kudos
LucD
Leadership
Leadership
Jump to solution

I saw that in the past, not sure if it is still valid for 6.5.


Try tricking the system into believing it's a supported Windows OS.

It's only the Config.guestID property, you can put any of the VirtualMachineGuestOsIdentifier  values in there, and still install whatever guest OS you want.
The alternative is/was that you needed to power on the VM at least once (still the case for the open VMware Tools I think).


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

I'm testing on 6.5 currently, so it appears to be the same. I need to have that ID be accurate for other reasons, so I may not have any other choice but to power cycle it. Trick there is you cannot use the cmdlet Wait-VMTools if this is the case for the same reason, so I'm having to use a sleep statement.

Do you know of any other way to set this in vCenter? Any thing other than a power cycle?

0 Kudos
LucD
Leadership
Leadership
Jump to solution

No, I'm afraid not.

But why can't you change the guestId only temporary?
Once your customization is applied, you can set it back to the correct value.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

I see what you mean. That should work. However, I think I found another way around for now, but I'll test this and keep it in the back of my mind.

0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

I thought I'd just follow up after some testing with Linux VM types. Regardless if open-vm-tools or VMware's official Tools are installed, the resulting behavior is the same whereby vCenter thinks tools aren't installed. Only Windows systems, it seems, are immune to this deficiency.

0 Kudos