VMware Cloud Community
meistermn
Expert
Expert

How to install VMware tools without a reboot?

On the following url the a script for updating vmware tools. What is the parameter for no reboot?

It must be in line 48 . Is the command update-tools by vmware with all there switches described?

Reply
0 Kudos
79 Replies
rcx_fr
Contributor
Contributor

Hello,

Do you know how to add the Vss driver when you automaticaliy update the tools ?

Regards,

Ronald

Reply
0 Kudos
meistermn
Expert
Expert

the update script vmtools-mn-2.ps1 works.

Now optimize and addons:

1.) ping vm

2.) check disk space on drive c:

3.) check version of vmware tools

4.) create log file for a vmware tools upgrade

5.) hardware acceleration: good job from peetersonline.nl

get function :

Getting Video Hardware Acceleration Level

Reply
0 Kudos
rcx_fr
Contributor
Contributor

Thanks for the job !

Does it add Vss driver ?

Regards,

Ronald

Reply
0 Kudos
AlexLudwig
Contributor
Contributor

So, got the next problem on that.

We updated to Version ESX 4 175625. Seems like the old batch script and/or the Power CLI Script doesn´t work at all. I think it´s not longer possible to directly pass through the arguments to the installerm or better to say: They do not work anymore. Does anybody got a solution on that!? I tried hours and hours... Smiley Sad Need to update 220 Servers without a reboot.

Reply
0 Kudos
VCPGuru
Contributor
Contributor

Nice

Best Regards Simon Ciglia
Reply
0 Kudos
AlexLudwig
Contributor
Contributor

*

Reply
0 Kudos
meistermn
Expert
Expert

Now it seems that vmware fixed it with update 1. -NoReboot Option

http://www.rack42.com/?p=361

http://get-admin.com/blog/?p=714

Reply
0 Kudos
AlexLudwig
Contributor
Contributor

At least they have integrated a NoReboot Switch in the PowerCLI. Easy to use. So Ißll install all Tools within the PowerCLI and a little Script.

Reply
0 Kudos
torpy
Contributor
Contributor

I tried the NoReboot switch on our ESX 3.5 / VC 2.5 environment and the VM still rebooted. Does this feature only work in vSphere4 environments?

Reply
0 Kudos
AlexLudwig
Contributor
Contributor

I did not test it. But I´ve written a little Script which works fine for me. The script does the following:

- Connect to the datacenter

- reads out the clusters and u can choose which to update

- get´s your credentials for the esx server in the cluster

- connects to all esx server

- reads all vms

- updates all vms, but creates logfiles for vms which could not be updated (for example PoweredOff), or are already up to date, or have no windows OS, or have no vm tools installed (if that the power cli cannot read any OS Infos), or other failures and at least a log for successfull update

We only work with cluster, so I said it´s fine for me. And you have to put in your datacenter servers at first in the script.

All written in german, if u don´t mind...

Regards

+ Ok, just tested it on Esx 3.5 / VC 4 ==> VM restarts

--> but for that you can use the batch script earlier in that thread

Reply
0 Kudos
wolficool
Contributor
Contributor

Great Script.

This Script dont function by Linux VM-Guests.

Can i change the Script so that he also installed the vmware tools by the Status Not Installed?

Thx

Reply
0 Kudos
AlexLudwig
Contributor
Contributor

At least you could change it, but 2 points to be aware of:

1) You´ll get problems with your Kernel on different Linux Versions by updating the Tools. Maybe you kill your server, so better way update in manually.

2) The installation routine of the power cli...hm...I don´t know if it supports the installation on Linux hosts.´

I´ll test it and post you the new script.....

Reply
0 Kudos
AlexLudwig
Contributor
Contributor

update_even_Linux_vms.ps1

- updates all Windows & Linux Servers

There will be no update if the OS informations is Solaris or Mandriva or anything else.....and the powered off VMs are still outsorted...

At least it´s only a elseif command to edit....

But: The update of No Windows Clients is not fully supported. You´ll get an extra hint of that when the script tries to update a Linux VM....

It is not possible to use the "update" function of the power cli if there are no tools installed. If u want to I can implement a routine to install the vm ware tools if there are no tools installed...

Reply
0 Kudos
bkboyer
Contributor
Contributor

After reading through this post and muddling through a solution for our environment, figured I'd post what I came up with. We're using vSphere 4.0, and as mentioned above, with PowerCLI 4.01 (not 4.0!!), you can use the -NoReboot parameter.

This script requires Powershell 2.0, PowerCLI 4.01, and DavCopy.exe. It emails the log and copies it to a Sharepoint server.

Reply
0 Kudos
AlexLudwig
Contributor
Contributor

*

Reply
0 Kudos
raghavendrats
Contributor
Contributor

I tried to use this script on my Vsphere 4 cluster. The script is not throwing any error in Power CLI but the Update in not happening in my VMs. It is dont even generating logs on Vms on Update initiation/completion.

Reply
0 Kudos
raghavendrats
Contributor
Contributor

You can use this script to update the VMware tools on your running VMs without reboot.

get-Cluster -name "testcluster"|get-vm | where-object {$_.powerstate -eq "PoweredON"}| Get-View `

| Where-Object { $_.Config.Tools.ToolsVersion -ne “8.0.1.11537" } `

| Get-VIObjectByVIView `

| Update-Tools -NoReboot

This Script will run only on PowerCLI 4.0 with Update 1. In the script you are require to mention the current VMware tolls version. Based on verifying this the Script will automatically update the VM into the next available version. It worked for me.

Reply
0 Kudos
AlexLudwig
Contributor
Contributor

Hm, I used this script at over 200 VMs at one time, VC 4, ESX 4 U1. Worked fine for me.

Any other failures or anything!?

Edit: Got the newest Power CLI Version?

Reply
0 Kudos
aryan14in
Enthusiast
Enthusiast

could someone please suggest how to install (not update) vmware tools on windows/linux VMs. I have been through this thread multiple times, but nothing seems to be working for me.

Thanks!

Vinod

Reply
0 Kudos
Mostafas_Salama
Contributor
Contributor

Here is what worked for me.  I am running vsphere 7 U3

$insParm = '/s /v "/qn REBOOT=ReallySuppress"'
$updList = get-cluster -name "CLUSTER_NAME"|get-vm | where-object {$_.powerstate -eq "PoweredON"} | % {get-view $_.ID} |where {$_.guest.toolsstatus -match "toolsOld" }
foreach ($uVM in $updList)
{
$uVM.name
$uVM.UpgradeTools_Task($insParm)
#Wait 30 seconds before starting another update task
Start-sleep -s 30
}

Reply
0 Kudos