MatthewFB
Contributor
Contributor

Guest OS Version - Update to match OS according to VMware Tools - with out an immediate power down?

Hello everyone,

Trying to clean up our environment we have numerous VMs to which the Guest OS Version choosen differs from the installed OS version. Now, i know this is purely cosmetic and updating the Guest OS Version will not change anything relating to the installed VM, or give it access to any newer features/options a new OS version would have on a clean installed VM.

Aside from the GUI method, which with the volume of VM's, would take some time to schedule an outage for them all, to power down and change, is there a way to do it via PowerCLI, but the catch...

My thought being, is there a method to Get-VM where Guest OS Version (configuration file) is not equal to VMware tools detected OS then update VM. Then, hold that config until the next time the VM is rebooted to change it?

Hope being that we could tie this into a windows update period to minimize reboots and outage windows versus shutdown a single VM, change in GUI, power on VM over about 100+ times..

3 Replies
scott28tt
VMware Employee
VMware Employee

Moderator: Moved to PowerCLI

LucD
Leadership
Leadership

I would suggest to first get a lay of the field with

Get-VM |

Select Name,

    @{N='OSFullName';E={$_.Guest.OSFullName}},

    @{N='GuestID';E={$_.Guest.ConfiguredGuestId}}

The reason being that you will need to have some logic to select the correct GuestId.

Once that is available, could be a hash table, you can use the Set-VM cmdlet with the GuestId parameter to change the value.

Afaik, this does not force a reboot.


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

MatthewFB
Contributor
Contributor

Thank you LucD​ for getting me in the right direction, I will go from here and see how far I make it, I will likely be back asking some simple questions I am sure!

0 Kudos