Orchestrator Function: vCenter Virtual Machine Configure Hardware Upgrade

by Simon Sparks · 5 January 2026

To use this function add it to the class library file named vCenterServerService.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: vCenterServerService.ts

publicVcVirtualMachineConfigureHardwareUpgrade(objVcVirtualMachine:VcVirtualMachine):void{
letstrMaxHardwareVersion:string=this.VcVirtualMachineGetMaxHardwareVersion(objVcVirtualMachine);

letobjVcVirtualMachineConfigInfo:VcVirtualMachineConfigInfo=objVcVirtualMachine.config;

letstrCurrenHardwareVersion:string=objVcVirtualMachineConfigInfo.version;

letobjVcVirtualMachineRuntimeInfo:VcVirtualMachineRuntimeInfo=objVcVirtualMachine.runtime;

letobjVcHostSystem:VcHostSystem=objVcVirtualMachineRuntimeInfo.host;

this.objLogger.info("Maximum supported hardware version on host"+objVcHostSystem.name+" is:"+strMaxHardwareVersion);
this.objLogger.info("Current hardware version is:"+objVcVirtualMachineConfigInfo.version);

if (strMaxHardwareVersion>strCurrenHardwareVersion){
this.objLogger.info("Configuring VM hardware upgrade on next reboot...");

this.VcVirtualMachineScheduleHardwareUpgrade(objVcVirtualMachine,strMaxHardwareVersion);
}
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like