A ways back I wrote an article about how to utilize vRealize Orchestrator to deploy and install Update 2 for Veeam v8 to any of your virtualized Veeam Backup & Replication servers. This has worked well for me as I normally have the vSphere Web Client open anyways – why not just do my updates with this.
Well, with v9 Update 1 there have been a few changes to how you go about silently deploying a Veeam update. First up there is no need to extract the update file – we can simply pass our install parameters directly to the update package – therefore we no longer need the setup.bat file that orchestrates the unpacking and installing! We can simply copy the file out and and pass the /silent, /noreboot, and /log arguments to it – as shown below…
c:\downloads\VeeamBackup&Replication_9.0.0.1491_Update1.exe /silent /noreboot /log c:\downloads\patch.log VBR_AUTO_UPGRADE=1
So, if you had followed along with the previous post and want to update your vRO workflows to be compatible with v9U1 you may need to change a few things. For those starting fresh, I’ll go over the whole process again below.
The Workflow
The vRO workflow is pretty simple (especially now with silent installation improvements) – It really needs to do only two things; 1 – copy out our update file, 2 – run the executable. In order to support these two functions we to first setup a few arguments and input parameters to our workflow
Arguments
- vroPathToVeeam (string) – this will contain the path to the Veeam update file that we place on the vRO server (i.e. /var/log/vco/VeeamBackup&Replication_9.0.0.1491_Update1.exe )
- guestPathToVeeam (string) – this will contain the path on the target server in which we would like to copy the file (i.e. c:\downloads\VeeamBackup&Replication_9.0.0.1491_Update1.exe )
- vmUsername (string) – the username with permissions to copy/run files on the Veeam Backup and Replication server (i.e. administrator@domain.local)
- vmPassword (SecureString) – the above users password 🙂
Input Parameters
- vm (VC:VirtualMachine) – this will be the virtualized Veeam Backup & Replication server name. We’ve set this up as an input parameter instead of an attribute so we can automatically pass the VM’s name from the right-click context menu inside the vSphere Web Client.
The Schema
As you can see below we basically mimic the two functions mentioned previously with Scriptable Tasks within vRO; Copying the files and Executing the update.
As far as copying the files go it’s a pretty simple script
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
// establish connection var host = vm.sdkConnection; var guestOperationsManager = host.guestOperationsManager; // create authentication var guestAuth = new VcNamePasswordAuthentication(); guestAuth.username = vmUsername; guestAuth.password = vmPassword; // construct fileManager var fileManager = guestOperationsManager.fileManager; result = false; var attr = new VcGuestFileAttributes(); var srcFile = new File(vroPathToVeeam); var uri = fileManager.initiateFileTransferToGuest(vm , guestAuth ,guestPathToVeeam, attr, srcFile.length, true); // Copy File result = fileManager.putFile(vroPathToVeeam, uri); asdfa asdf |
And to execute the actual file once it has been copied (The Execute Update scriptable task)…
1 2 3 4 5 6 7 8 9 10 11 12 |
var host = vm.sdkConnection; var guestOperationsManager = host.guestOperationsManager; var guestAuth = new VcNamePasswordAuthentication(); guestAuth.username = vmUsername; guestAuth.password = vmPassword; guestAuth.interactiveSession = false; var guestProgramSpec = new VcGuestProgramSpec(); guestProgramSpec.programPath = guestPathToVeeam; guestProgramSpec.arguments = "/silent /noreboot /log c:\downloads\patch.log VBR_AUTO_UPGRADE=1"; guestProgramSpec.workingDirectory = ""; var processManager = guestOperationsManager.processManager; result = processManager.startProgramInGuest(vm , guestAuth , guestProgramSpec); |
And with that we are done – don’t forget to map the relevant input parameters from the global workflow to those inside the individual scriptable tasks…
We can now run this workflow from within the vRO client, select a virtualized Veeam B&R server and have v9 Update 1 automatically deployed and installed to it. To go one step forward you can also go and associate this workflow with the right-click context menu within the vSphere Web Client if you like, then you never have to even open up vRO 🙂
Keep in mind this workflow does nothing to ensure that you have no active jobs – this is something I’d love to add someday, check for running jobs and if there is, wait or cancel them before running the update…
Thanks for reading!
1 thought on “A few updates to the Veeam silent install!”