VMware {code} Community
fordian
Hot Shot
Hot Shot

UpgradeTools_Task

Hello,

I am looking for the installerOptions for UpgradeTools_Task.

ex. found but don't want the VM be rebooted after the upgrade :

my $vm_views = Vim::find_entity_views(view_type => 'VirtualMachine', filter => { 'guest.toolsStatus' => 'toolsOld' });

foreach (@$vm_views) {

my $nameVM = $_->name;

open FILE, "<", "VMToolsUpgradeList.txt" or die $!;

my @lines = <FILE>;

foreach my $vmname (@lines) {

chomp($vmname);

if ($nameVM eq $vmname) {

$_->UpgradeTools_Task();

print "Issued VMware Tools upgrade task on " . $nameVM . "\n";

}

}

}

Thank you

Dominic

Reply
0 Kudos
6 Replies
lamw
Community Manager
Community Manager

So with the UpgradeTools_Task() there is an optional param installerOptions (http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.VirtualMachine.html#upgradeTools) which allows you to provide a slew of prams to the installer, of which you can specify no reboot. Note that for the updates to take place, you really need to reboot the VM eventually, so probably best to reboot as you're upgrading.

Take a look at this thread on the params: , I haven't played with additional CLI params to the installer so I can't help you there

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

fordian
Hot Shot
Hot Shot

Hello,

I don't find the options for the InstallerOptions in the first link, in fact I am looking for the NoReboot option.

The solution with msiexec works but I would like to use the firt one. There is also another way by using PowerCli.

Thank you

Dominic

Reply
0 Kudos
lamw
Community Manager
Community Manager

Please find the method in the SDK docs, you'll see that param as an optional input. I know its possible with PowerCLI, perhaps you might want to see how its implemented there and translates that to your implementation.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
fordian
Hot Shot
Hot Shot

Hello,

From VI SDK 2.5 Programming Guide : "installerOptions-Command line options passed to the installer. This parameter is not used in the current release."

I am going to do this using PowerCli or MSIexec.

Thank you

Dominic

Reply
0 Kudos
ymnick
Enthusiast
Enthusiast

Hi William,

My understanding is that after UpgradeTools_Task method has been called, a user needs to log into VM and to complete the installation process, and I am looking how it can be completely silenced so no additional action will be required. Is there something in the 'installerOptions' param to allow that functionality? Unfortunately the API doesn't have a very good explanation of this parameter.

http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vim.VirtualMachine.html#upgr...

Thanks,

Ymnick

Reply
0 Kudos
ymnick
Enthusiast
Enthusiast

This thread answers my question - Install VMware Tools with VMware Sphere SDK.

Thanks,

Yuri

Reply
0 Kudos