VMware Cloud Community
ganapa2000
Hot Shot
Hot Shot

Mass Upgrade Of VMware Tools for Linux Hosts

Hi,

Is there a way to upgrade VMware Tools on multiple linux VMs using powercli

As per the VMware document, I see we can right click on the VM and click on upgrade vmware tools by passing --default parameter to linux VM.

Is this can be achieved by PowerCLI ?

Please help

pastedImage_0.png

5 Replies
LucD
Leadership
Leadership

You have two options nowadays.

  1. A lot of recent Linux distributions come with the open-vm-tools installed. Since these packages are present on their repositories, you can use the normal package update procedure for the Linux distribution. For example on Ubuntu you could do an 'apt-get -y update'.

  2. If you want to upgrade with the VMware ISO, you can mount the ISO and then do a './vmware-install.pl -d default' inside the guest OS

The commands for 1) and 2) can be run inside the guest OS via the Invoke-VMScript cmdlet.


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

ykzhang
Enthusiast
Enthusiast

Yes, we do provided powerCLI script to achieve that, regardless of OS type, see "Invoke-VMToolsUpgradeInVMs “ in PowerCLI-Example-Scripts/VMToolsManagement.psm1 at master · vmware/PowerCLI-Example-Scripts · GitHub

Be aware that LinuxOS should have tartools preinstalled.

Br
Yike

LucD
Leadership
Leadership

Afaik that will not work for the open VMware Tools (open-vm-tools)


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

0 Kudos
AlbertWT
Virtuoso
Virtuoso

So I guess the Option #2 can be automated in this script: PowerCLI-Example-Scripts/VMToolsManagement.psm1 at master · vmware/PowerCLI-Example-Scripts · GitHub  ?

/* Please feel free to provide any comments or input you may have. */
0 Kudos
LucD
Leadership
Leadership

Although I have not a lot of practical experience with that module, the Invoke-VMToolsUpgradeInVMs function in that module should do the trick.


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

0 Kudos