Orchestrator Functions: vCenter Cluster Compute Resource IPv6 Toggle

by Simon Sparks · 2 February 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

Public Function: VcClusterComputeResourceIPv6Enable

publicVcClusterComputeResourceIPv6Enable(objVcClusterComputeResource:VcClusterComputeResource):void{

this.VcClusterComputeResourceIPv6Toggle(objVcClusterComputeResource,true);
}

Public Function: VcClusterComputeResourceDisableIPv6

publicVcClusterComputeResourceDisableIPv6(objVcClusterComputeResource:VcClusterComputeResource):void{

this.VcClusterComputeResourceIPv6Toggle(objVcClusterComputeResource,false);
}

Private Function: VcClusterComputeResourceIPv6Toggle

privateVcClusterComputeResourceIPv6Toggle(objVcClusterComputeResource:VcClusterComputeResource,blnEnableIpV6:boolean=true):void{

letobjVcHostNetworkConfig:VcHostNetworkConfig=newVcHostNetworkConfig();
objVcHostNetworkConfig.ipV6Enabled=blnEnableIpV6;

letarrVcHostSystem:VcHostSystem[]=objVcClusterComputeResource.host;

arrVcHostSystem.forEach((objVcHostSystem:VcHostSystem):void=>{

letobjVcHostConfigManager:VcHostConfigManager=objVcHostSystem.configManager;

letobjVcHostNetworkSystem:VcHostNetworkSystem=objVcHostConfigManager.networkSystem;

letobjVcHostNetworkConfigCurrent:VcHostNetworkConfig=objVcHostNetworkSystem.networkConfig;

if (objVcHostNetworkConfigCurrent.ipV6Enabled===true){

this.VcHostSystemMaintenanceModeEnter(objVcHostSystem);

objVcHostNetworkSystem.updateNetworkConfig(objVcHostNetworkConfig,"modify");

this.VcHostSystemMaintenanceModeExit(objVcHostSystem);
}
});
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like