Orchestrator Class Library: Orchestrator Plugin vCenter Guest Operations Manager Service

by Simon Sparks · 1 October 2025

Over the course of the next 12 months I will be adding functions to this page so bookmark it and come back regularly for new cool features and updates.

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

Filename: VcGuestOperationsManagerService.ts

import{MissingRequiredParameterError}from"../Extensions";
import{BaseService}from"../BaseService";

exportclassVcGuestOperationsManagerServiceextendsBaseService{
private objVcGuestInfo:VcGuestInfo;
private objVcVirtualMachine:VcVirtualMachine;
private objVcSdkConnection:VcSdkConnection;
private objVcGuestOperationsManager:VcGuestOperationsManager;
private objVcGuestAuthManager:VcGuestAuthManager;
private objVcGuestFileManager:VcGuestFileManager;
private objVcGuestProcessManager:VcGuestProcessManager;
private objVcGuestWindowsRegistryManager:VcGuestWindowsRegistryManager;
private objVcNamePasswordAuthentication:VcNamePasswordAuthentication;
private objVMareToolsImcLogDirectory:{ linux:string, windows:string}={
linux:"/var/log/vmware-imc",
windows:"c:\\Windows\\Temp\\vmware-imc"
};

constructor(strProjectID:string,objVcVirtualMachine:VcVirtualMachine,strUsername:string,strPassword:string){

if (!strProjectID){
thrownewMissingRequiredParameterError('strServiceName');
}

if (!objVcVirtualMachine){
thrownewMissingRequiredParameterError('objVcVirtualMachine');
}

if (!objVcVirtualMachine){
thrownewMissingRequiredParameterError('strUsername');
}

if (!objVcVirtualMachine){
thrownewMissingRequiredParameterError('strPassword');
}

super(strProjectID,"vCenterGuest");

this.objVcVirtualMachine=objVcVirtualMachine;

this.objVcSdkConnection=objVcVirtualMachine.sdkConnection;

this.objVcGuestInfo=objVcVirtualMachine.guest;

this.objVcGuestOperationsManager=this.objVcSdkConnection.guestOperationsManager;

this.objVcGuestAuthManager=this.objVcGuestOperationsManager.authManager;
this.objVcGuestFileManager=this.objVcGuestOperationsManager.fileManager;
this.objVcGuestProcessManager=this.objVcGuestOperationsManager.processManager;
this.objVcGuestWindowsRegistryManager=this.objVcGuestOperationsManager.guestWindowsRegistryManager;

this.objVcNamePasswordAuthentication=newVcNamePasswordAuthentication();
this.objVcNamePasswordAuthentication.username=strUsername;
this.objVcNamePasswordAuthentication.password=strPassword;
this.objVcNamePasswordAuthentication.interactiveSession=false;

this.objVcGuestAuthManager.validateCredentialsInGuest(this.objVcVirtualMachine,this.objVcNamePasswordAuthentication);

this.objLogger.info(`The Virtual Machine${objVcVirtualMachine.name} has a Crashed Guest Kernel${this.objVcGuestInfo.guestKernelCrashed}.`);
this.objLogger.info(`The Virtual Machine${objVcVirtualMachine.name} is Guest Operations Ready${this.objVcGuestInfo.guestOperationsReady}.`);
this.objLogger.info(`The Virtual Machine${objVcVirtualMachine.name} has an Interactive Guest Operations Ready of${this.objVcGuestInfo.interactiveGuestOperationsReady}.`);
this.objLogger.info(`The Virtual Machine${objVcVirtualMachine.name} has a Guest Heart Beat Status of${objVcVirtualMachine.guestHeartbeatStatus}.`);
this.objLogger.info(`The Virtual Machine${objVcVirtualMachine.name} has a Guest State of${this.objVcGuestInfo.guestState}.`);
this.objLogger.info(`The Virtual Machine${objVcVirtualMachine.name} has a Guest State Change Supported of${this.objVcGuestInfo.guestStateChangeSupported}.`);
this.objLogger.info(`The Virtual Machine${objVcVirtualMachine.name} has a Tools Running Status of${this.objVcGuestInfo.toolsRunningStatus}.`);
this.objLogger.info(`The Virtual Machine${objVcVirtualMachine.name} has a Tools Install Type of${this.objVcGuestInfo.toolsInstallType}.`);
this.objLogger.info(`The Virtual Machine${objVcVirtualMachine.name} has a Tools Status of${this.objVcGuestInfo.toolsStatus}.`);
this.objLogger.info(`The Virtual Machine${objVcVirtualMachine.name} has a Tools Update Status of${this.objVcGuestInfo.toolsUpdateStatus}.`);
this.objLogger.info(`The Virtual Machine${objVcVirtualMachine.name} has a Tools Version of${this.objVcGuestInfo.toolsVersion}.`);
this.objLogger.info(`The Virtual Machine${objVcVirtualMachine.name} has a Tools Version Status of${this.objVcGuestInfo.toolsVersionStatus}.`);
this.objLogger.info(`The Virtual Machine${objVcVirtualMachine.name} has a Tools Version Status 2 of${this.objVcGuestInfo.toolsVersionStatus2}.`);
}


}

Class Functions:


    Discover more from Cloud Build Tools

    Subscribe to get the latest posts sent to your email.

    You may also like