I need a script to upgrade VMware Tools without rebooting.
Please give me a script to upgrade one VM only, so that I can test first
To upgrade the VMware Tools of a virtual machine named VM1 without rebooting you can use the Update-Tools cmdlet:
Update-Tools -VM VM1 -NoReboot
The -NoReboot parameter is supported only for Windows operating systems.
Regards, Robert
To upgrade the VMware Tools of a virtual machine named VM1 without rebooting you can use the Update-Tools cmdlet:
Update-Tools -VM VM1 -NoReboot
The -NoReboot parameter is supported only for Windows operating systems.
Regards, Robert
Tried that but got the error below
Does the VM have a CD-ROM or ISO file connected?
Here is a great article that goes more in depth on the command, especially when using 2008 R2 as a guest.
http://www.theselights.com/2011/02/avoid-server-2008-vmtools-and-vum-woes.html
Update-Tools -VM VM1 -NoReboot, works very well for Windows 2003, is there someting like this for Windows 2008?
Does not work for Windows 2008, how can i run this on a single Windows 2008 VM?
Well, the command works fine with 2008 guests (I've used it on several occasions).
The VM is powered on with an available CD-ROM drive, correct? The tools is installed via an ISO that is inserted into the virtual CD-ROM drive of a powered on VM.
Hm.. how is that possible ?
From my understanding, ESX/ESXi host upgrade must be followed by major VM restart since the Vmware tools need to be upgraded eventhough the upgrade is minor eg. from ESX 4.0 into u1
so does this method applies for any VMware tools install from VUM or manually initiated or powerCLI based upgrade with script "Get
-VM
| Update
-Tools"
Afaik you have to reboot a virtual machine after a VMware Tools upgrade. The -NoReboot parameter of the Update-Tools cmdlet is a way to upgrade the tools now and suspend the reboot to a later moment. The -NoReboot parameter help says:
Indicate that you don't want to reboot the system after updating VMware Tools. This parameter is supported only for Windows operating systems. NoReboot passes the following set of options to the VMware Tools installer on the guest OS:/s /v"/qn REBOOT=ReallySuppress"
However, the virtual machine might still reboot after updating VMware Tools, depending on the currently installed VMware Tools version, the VMware Tools version to which you want to upgrade, and the vCenter Center/ESX versions.
yes, that does make sense Robert 🙂
many thanks for the clarification because VMwareTools upgrade after upgrading Host OS must be followed by guest OS update.
I'm writing a PowerCLI script to do this for 80 VMs (Must deploy & suppress the reboot).
Is there a way to write the script so it executes the command Update-Tools command on all the VMs at once?
This should do the trick
Get-VM | Update-Tools -NoReboot
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD, sorry I should have been more specific.
I only want to do it on a specific set of VMs. I have thousands of VMs, and I only want to update the tools (at this time) on 80 of them and w/o rebooting.
My intent is to time this so that the tools get upgraded (w/o reboot) about 30 minutes before my scheduled Windows OS Patch reboot cycle.
And how do you select those 80 VMs ?
Or are they just 80 random VMs ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I have a specific list with specific names. They're part of an application system that has a unique downtime window.
I'm thinking of creating a custom attribute just for these 80, then in my powershell run something like:
Get-VM {Where custom attribute eq xxx) | Update-Tools -NoReboot
Syntax notwithstanding-- something like that, if it would work. Am I on the right track, or is there a better idea?
Sure, assume the Custom Attribute is called "Application" and the value for the 80 VMs is "app1", then you can do
Get-VM | where{(Get-Annotation Entity $_ -CustomAttribute "Application").Value -eq "app1"} | Update-Tools -NoReboot
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Sweet- Thanks for the syntax too! Save a guy from google.
So then would this allow the Update-Tools to run asynchronously on those 80 VMs, or will it still hit them one at a time?
You can add the RunASync parameter on the Update-Tools cmdlet.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
OMG I feel silly I never noticed that the 10 times I did the Get-Help Update-Tool -full....
As always, you're the best. Thanks again!