VMware Cloud Community
davidjerwood
Enthusiast
Enthusiast
Jump to solution

Upgrading Tools and Shutdown Scripts

Am after some help if possible.

I need my virtual machines to run "ipconfig /release" on shutdown, so I think the best option is to add this line to the "poweroff-vm-default.bat" script. but as I believe this file is overwritten each time vmware tools is upgraded. Which brings me on to my next question, we use Altiris for software deployment and would like to use this to upgrade our vmware tools but are having problem packaging it. How can I set the vmware tools options within the package such as time sync on/off etc etc. Can I use this to modify the shutdown script and roll it out?

0 Kudos
1 Solution

Accepted Solutions
Jasemccarty
Immortal
Immortal
Jump to solution

As far as the shutdown script goes... I think that you will have to manually fix the batch file every time you upgrade the tools.

I don't use any advanced Altiris features, so I can't comment on that side of things...

With over 300 VMs (on 6 Hosts), I have handled these types of tasks with things like PSEXEC from Sysinternals.com, and vmpref from VM Back ().

If you don't plan on using the builtin VMware Tools upgrade ability, I'd start by having a network share hosting the VMware Tools, then put VMPREF.EXE and the POWEROFFBAT that you created there.

Then I'd create a batch file that resembles something like this:

REM Install Tools Silently
server\share\setup.exe /s /v"/qn REINSTALLMODE=voums REINSTALL=ALL REBOOT=REALLYSUPPRESS"

REM Update the poweroff batch file copy
server\share\new-poweroff-vm-default.bat "C:\Program Files\VMware\VMware Tools\poweroff-vm-default.bat"

REM Sync the Guest's time with the host
server\share\vmpref.exe +t

Then I would push the above batch file to each of the guests I wanted to upgrade.

PSEXEC @GUESTLIST.TXT -c BATCHFILE.BAT

It will use your credentials to push the BATCHFILE.BAT to the remote system, and then it will execute it on the remote system.

Now all of this is off the top of my head, so you'll have to do some testing... And I'm not 100% on the switches for the silent install.

Also, given that VirtualCenter now handles VMware Tools upgrades, why not just omit the silent install piece, and after you upgrade the tools, then push the batch file.

That's what I would do.

Jase McCarty

http://www.jasemccarty.com

Co-Author of VMware ESX Essentials in the Virtual Data Center

(ISBN:1420070274) from Auerbach

Jase McCarty - @jasemccarty

View solution in original post

0 Kudos
4 Replies
Jasemccarty
Immortal
Immortal
Jump to solution

As far as the shutdown script goes... I think that you will have to manually fix the batch file every time you upgrade the tools.

I don't use any advanced Altiris features, so I can't comment on that side of things...

With over 300 VMs (on 6 Hosts), I have handled these types of tasks with things like PSEXEC from Sysinternals.com, and vmpref from VM Back ().

If you don't plan on using the builtin VMware Tools upgrade ability, I'd start by having a network share hosting the VMware Tools, then put VMPREF.EXE and the POWEROFFBAT that you created there.

Then I'd create a batch file that resembles something like this:

REM Install Tools Silently
server\share\setup.exe /s /v"/qn REINSTALLMODE=voums REINSTALL=ALL REBOOT=REALLYSUPPRESS"

REM Update the poweroff batch file copy
server\share\new-poweroff-vm-default.bat "C:\Program Files\VMware\VMware Tools\poweroff-vm-default.bat"

REM Sync the Guest's time with the host
server\share\vmpref.exe +t

Then I would push the above batch file to each of the guests I wanted to upgrade.

PSEXEC @GUESTLIST.TXT -c BATCHFILE.BAT

It will use your credentials to push the BATCHFILE.BAT to the remote system, and then it will execute it on the remote system.

Now all of this is off the top of my head, so you'll have to do some testing... And I'm not 100% on the switches for the silent install.

Also, given that VirtualCenter now handles VMware Tools upgrades, why not just omit the silent install piece, and after you upgrade the tools, then push the batch file.

That's what I would do.

Jase McCarty

http://www.jasemccarty.com

Co-Author of VMware ESX Essentials in the Virtual Data Center

(ISBN:1420070274) from Auerbach

Jase McCarty - @jasemccarty
0 Kudos
davidjerwood
Enthusiast
Enthusiast
Jump to solution

Thanks for all your suggestions they are very helpful. Just one more question though.

I have never managed to get the Automatic Tools Upgrade option working through virtual centre always have to do the Interactive Upgrade. If I try automatic the task says In Progress and eventually times out. What Advanced Options should I use.

David Jerwood

Microsoft Services Team

IG Group | Friars House | 157-168 Blackfriars Road

London  SE1 8EZ | www.iggroup.com

Switchboard: +44 20 7896 0011

Direct Line:  +44 20 7573 0070

david.jerwood@igindex.co.uk

0 Kudos
Jasemccarty
Immortal
Immortal
Jump to solution

Well, I haven't had to push tools to VM's in a while, so I would be very rusty with suggestions...

The last time I did a mass push like this, it was in the ESX 2.5 days...

If you search the forums, you should find plenty of posts on silently installing the tools.

Jase McCarty

http://www.jasemccarty.com

Co-Author of VMware ESX Essentials in the Virtual Data Center

(ISBN:1420070274) from Auerbach

Jase McCarty - @jasemccarty
0 Kudos
Texiwill
Leadership
Leadership
Jump to solution

Hello,

Moved to the VI: Virtual Machine and Guest OS forum.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

SearchVMware Blog: http://itknowledgeexchange.techtarget.com/virtualization-pro/

Blue Gears Blogs - http://www.itworld.com/ and http://www.networkworld.com/community/haletky

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos