Orchestrator Function: vCenter Host System Change Advanced Settings

by Simon Sparks · 24 April 2014

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

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

Filename: vCenterServerService.ts

Description: Orchestrator Function to Change Advanced Settings on an ESXi Host.

Function: VcHostSystemChangeAdvancedSettingsNetwork

publicVcHostSystemChangeAdvancedSettingsNetwork(objVcHostSystem:VcHostSystem):void{
letarrVcOptionValue:VcOptionValue[]= [];

letobjVcOptionValue:VcOptionValue;

objVcOptionValue=this.VcOptionValueBuild("Syslog.global.logHost","udp://logs.cloudbuildtools.com:514");

arrVcOptionValue.push(objVcOptionValue);

objVcOptionValue=this.VcOptionValueBuild("Net.NetSchedInFlightMaxBytesDefault","100000");// 1Gbps = 20000

arrVcOptionValue.push(objVcOptionValue);

objVcOptionValue=this.VcOptionValueBuild("Net.NetSchedInFlightMaxBytesHigh","500000");// 10Gbps = 66000

arrVcOptionValue.push(objVcOptionValue);

objVcOptionValue=this.VcOptionValueBuild("Net.NetSchedInFlightMaxPktsDefault","200");// 1Gbps = 20

arrVcOptionValue.push(objVcOptionValue);

objVcOptionValue=this.VcOptionValueBuild("Net.NetSchedInFlightMaxPktsHigh","800");// 10Gbps = 50

arrVcOptionValue.push(objVcOptionValue);

this.MaintenanceModeEnter(objVcHostSystem);
this.ApplyAdvancedSettings(objVcHostSystem,arrVcOptionValue);
this.MaintenanceModeExit(objVcHostSystem);
}

Function: VcOptionValueBuild

privateVcOptionValueBuild(strKey:string,strValue:string):VcOptionValue{
letobjVcOptionValue: VcOptionValue=newVcOptionValue();
objVcOptionValue.key=strKey;
objVcOptionValue.value_AnyValue=strValue;

returnobjVcOptionValue;
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like