VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts)
1 2 3 4 5 Previous Next 65 Replies Last post: Sep 20, 2009 11:49 AM by AlexLudwig   Go to original post

Re: How to install VMware tools without a reboot?

15. Dec 2, 2008 2:12 PM in response to: Rajeev S
Click to view FIISupport's profile Lurker 1 posts since
Dec 2, 2008
Hi there,

I would like to modify JP1960's script to only apply to a folder
or alternately a specific host (vs the entire cluster) . Can anyone shed some light
on how to do this?


Cheers

Click to view justin.emerson's profile Enthusiast 77 posts since
Jan 4, 2008
Replace get-cluster -name "DMZ-AMD-CLUSTER" with get-folder -name "FOLDER NAME" or get-host -name "HOSTNAME"
Click to view justin.emerson's profile Enthusiast 77 posts since
Jan 4, 2008

As a follow up to this - the command used will only work for Windows VMs. How can you modify the command to only affect windows virtual machines? I'm just learning powershell, and I'm trying to figure out how (without sticking if statements into the large for each block) to limit it to only VMGuests whose OSFullName -like "Windows"

Any quick help?

Click to view moosethumbs's profile Novice 10 posts since
Aug 13, 2008
I think you've pretty much answered your own question. I think you can just add where-object {$_.osfullname -like "Windows"} | to the second line:

$updList = get-cluster -name "DMZ-AMD-CLUSTER"|get-vm | where-object {$_.powerstate -eq "PoweredON"} | where-object {$_.osfullname -like "Windows"} |% {get-view $_.ID} |where {$_.guest.toolsstatus -match "toolsOld" }
Click to view Freefall13's profile Novice 22 posts since
Sep 14, 2005
I can't get the tools to install without rebooting the VM either. I've tried jp1960's script and while it upgrades the VMware tools the VMs still reboot. If I log into the VM and run the setup command I can get it to install without rebooting, e.g.:

setup /s /v"/qn REBOOT="ReallySuppress" REINSTALLMODE=vamus REINSTALL=ALL"

The upgradetools_task method isn't passing through the no reboot to the msiexec.
Click to view justin.emerson's profile Enthusiast 77 posts since
Jan 4, 2008

freefall: that was the problem I was having too. Still can't make it work, dunno why it works for some but not us. =(

moose: The problem is, that osfullname is not a property of the VM object, I have to Get-VMGuest after the Get-VM in order to check the OS type. That's why I need help - how can I look inside the Guest object, check if its windows, then pop back out to the VM object, since Get-View needs to be piped a VM object (not a VMGuest object)?

Click to view moosethumbs's profile Novice 10 posts since
Aug 13, 2008
I see now. I didn't test it out before, I just assumed. How about this one, though? This worked for me.

$updList = get-cluster -name "DMZ-AMD-CLUSTER"|get-vm | where-object {$_.powerstate -eq "PoweredON"} | % {get-view $_.ID} |where {$_.guest.toolsstatus -match "toolsOld" } | where {$_.guest.guestfamily -match "windowsGuest"}

I am wondering if the problem with the script not always working has to do with the version of Windows Installer on the VM. JP1690's script arguments should work for the newest version, but I think old versions of installer use /reboot=reallysuppress
Click to view Adidas6's profile Novice 8 posts since
Jan 28, 2008
I had run into similar issues with trying to update tools with Powershell, so I came up with a version that uses more of a batch script and then psexec to execute it on remote machines. It requiers a little bit of setup but is very easy to pull of once its all set.

First, you'll want to put the list of VM's you want to upgrade (Windows only) in a text file. (*list.txt*)

===== list.txt =====
VM1
VM2
VM3
etc...
===== /list.txt =====

You'll want to copy the VMtools install files to a network share that all computers can access. You can get these by mounting the VMTools in the VM and copy all the files off the mounted cdrom.

Now, you'll want to create the batch file that will run on each computer. (*vmtools.bat*)

===== vmtools.bat =====
\\location_of_tools\setup.exe /s /v"/qn REINSTALLMODE=voums REINSTALL=ALL REBOOT=REALLYSUPRESS"
===== /vmtools.bat =====

Make sure list.txt and vmtools.bat are in the same directory and run the following command from that directory:

===== CMD =====
psexec @list.txt -d -u <domain\account> -p <password> -c vmtools.bat
===== /CMD =====

This will copy the vmtools.bat to the remote computer and then run it. Make sure you run this from a DOS/CMD window and not a Powershell prompt. Powershell will attempt to interpret the @ and will prevent the command from running properly.

Re: How to install VMware tools without a reboot?

25. Dec 21, 2008 5:36 PM in response to: meistermn
Click to view halr9000's profile Master 813 posts since
Jun 7, 2007
meistermn wrote:
Automated VMware Tools upgrades using your VC and Perl
http://blog.laspina.ca/roller/Ubiquitous/entry/automated_vmware_tools_upgrades_using
This does the same thing as the PowerShell examples shown.

PowerShell MVP, VI Toolkit forum moderator
Author of the upcoming book: Managing VMware Infrastructure with PowerShell
Co-Host, PowerScripting Podcast (http://powerscripting.net)
Need general, non-VMware-related PowerShell Help? Try the forums at PowerShellCommunity.org

Re: How to install VMware tools without a reboot?

28. Dec 30, 2008 10:15 AM in response to: meistermn
Click to view c_shanklin's profile Master 754 posts since
Dec 3, 2007
I've logged it.

Re: How to install VMware tools without a reboot?

29. Dec 31, 2008 12:41 AM in response to: meistermn
Click to view ftempel's profile Novice 21 posts since
Dec 15, 2005
I've used the standard MSI method to supress a VMware Tools reboot (REBOOT=ReallySupress) for a while now since I use Altiris to schedule the install and reboot. Beware though, the upgrade of VMware Tools will still do a NIC reset inside the VM causing a possible service failure!

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Incoming Links

Communities