VMware Cloud Community
wamatha
Contributor
Contributor
Jump to solution

Upgrading VMware tools without rebooting

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

Reply
0 Kudos
25 Replies
CPRAO
Contributor
Contributor
Jump to solution

could you please post the full script , i am also want to update the vmtools with out reboot on 50 VM systems

Reply
0 Kudos
OsburnM
Hot Shot
Hot Shot
Jump to solution

Here's everything I did...

1)  Created the NoRebootToolsUpdate.ps1 script.

2)  Created my norebootserverlist.txt that contained the VM names I wanted to update.

3)  Created a Windows Scheduled Task to execute the script on a set time/date.

Thanks to everyone's advice!

================================
Sample 'NoRebootToolsUpdate.PS1'
================================

# Set Virtual Center Servername
$VIServer = "VISERVERNAME"

# Add VMware PowerShell Snapin
Add-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue

# Connect to Virtual Center
connect-viserver $VIServer

# Pulls server names from NoRebootServerList.txt & for each name in the list, execute the Update-Tools with noreboot line.
Get-Content .\NoRebootServerList.txt | ForEach-Object { Update-Tools -VM $_ -NoReboot -RunAsync }

# Disconnect from Virtual Center
$VIServer | Disconnect-VIServer -Confirm:$false

===================================================================
Sample 'NoRebootServerList.txt'
Note, servername is the VC Object Name of the VM you wish to update
===================================================================

servername1
servername2
servername3
servername4


========================================================
Sample 'UpdateTools.CMD'
Use this command to execute the above PowerCLI code from
a Windows Scheduled Task
========================================================

powershell -command "& .\noreboottoolsupdate.ps1"

Reply
0 Kudos
Ganapathy
Contributor
Contributor
Jump to solution

Team,

Is it recommended to upgrade a VMtool without restart ? As it will upgrade the drivers, it's always recommended to restart the Server from Microsoft perspective... AM i right ?

Please suggest....

Reply
0 Kudos
RR9
Enthusiast
Enthusiast
Jump to solution

i use this command to update tools but for 64 bit guest its fails ..

is there a way to update guests having 64 bit windows?

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Yes, ultimately you will need a reboot.

We let those coincide with the monthly security patches reboot.


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

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Any error messages ?


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

Reply
0 Kudos