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 VcVirtualMachineReconfigureForCoreOS(objVcVirtualMachine: VcVirtualMachine, strNodeIgnition: string): void {
let objVcVAppPropertyInfo1: VcVAppPropertyInfo = this.VcVAppPropertyInfoCreate(0, "guestinfo.ignition.config.data", strNodeIgnition);
let objVcVAppPropertyInfo2: VcVAppPropertyInfo = this.VcVAppPropertyInfoCreate(1, "guestinfo.ignition.config.data.encoding", "base64");
let objVcVAppPropertySpec1: VcVAppPropertySpec = new VcVAppPropertySpec();
objVcVAppPropertySpec1.operation = VcArrayUpdateOperation.add;
objVcVAppPropertySpec1.info = objVcVAppPropertyInfo1;
let objVcVAppPropertySpec2: VcVAppPropertySpec = new VcVAppPropertySpec();
objVcVAppPropertySpec2.operation = VcArrayUpdateOperation.add;
objVcVAppPropertySpec2.info = objVcVAppPropertyInfo2;
let arrVcVAppPropertySpec: VcVAppPropertySpec[] = [];
arrVcVAppPropertySpec.push(objVcVAppPropertySpec1);
arrVcVAppPropertySpec.push(objVcVAppPropertySpec2);
let objVcVmConfigSpec: VcVmConfigSpec = new VcVmConfigSpec();
objVcVmConfigSpec.property = arrVcVAppPropertySpec;
this.VcVirtualMachineReconfigureVAppConfig(objVcVirtualMachine, objVcVmConfigSpec);
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
