VMware Aria Automation 8.x: VMPSMasterWorkflow32 MachineProvisioned SysPrep
Bei der Migration von der vRA 7.6 zu vRa 8.10 musste ich feststellen das der Lebenszyklus eines Deployments und deren Ereignisse (Event topics) fundamental geändert haben. Was mich sehr geärgert hat, das bei "Compute Post Provision" zwar erst gestartet wird wenn die VM fertig geklont wurde, aber wartet nicht bis der Windows-Sysprep abgeschlossen wurde. So passierte es das der Deployment Prozess in der Regel crasht.
Im Transition-Guide von VMware wird im VMPSMasterWorkflow32 jeweils die Aktivierung und Prpvisionierung im gleichen Event Topic behandelt.
State | Events | Event Topic |
MachineActivated | OnCatalogRegistrationComplete (Provision) | Compute Post Provision |
MachineProvisioned | Compute Post Provision | |
BuildComplete | Compute Post Provision |
Mit einem Script aus der VMMware Community mit ein paar kleinen Anpassungen konnte ich eine Blocker bilden der den Sysprep abwartet. Dadurch laufen alle Deployment erfolgreich durch
Payload
Input:
- vmname => string (Name der VM)
Output:
- vm => VC:VirtualMachine
- vcConn => VC:SdkConnection
query = "xpath:name='" + vmname + "'";
var vms=Server.findAllForType("VC:VirtualMachine", query);
vm=vms[0];
allSdk = VcPlugin.allSdkConnections[0];
vcConn = allSdk
System.log(vcConn.eventManager)
Action: vimWaitCustomizFinished
Input:
- vm => VC:VirtualMachine
- vcConn => VC:SdkConnection
Output:
- boolean
var vcConn = vm.sdkConnection;
var evtMan = vcConn.eventManager;
timeout = 100;
var tmpComplete;
var succeed = "succeeded."
var actionResult;
timeout = timeout * 1000
var filterSpec = new VcEventFilterSpec();
filterSpec.eventTypeId = ['CustomizationSucceeded'];
filterSpec.entity = new VcEventFilterSpecByEntity();
filterSpec.entity.entity = vm;
filterSpec.entity.recursion = VcEventFilterSpecRecursionOption.self;
var events = evtMan.queryEvents(filterSpec);
if ( events == null) {
actionResult = false;
}
System.log(vm.name);
//System.log(events.length);
if (events != null) {
for (var i=0;i<#events.length;i++) {
System.log(JSON.stringify(events[i].fullFormattedMessage))
System.log(JSON.stringify(events[i].fullFormattedMessage).split(' ')[4]);
tmpComplete = JSON.stringify(events[i].fullFormattedMessage).split(' ')[4];
if (tmpComplete == succeed) {
actionResult = true;
break;
} else {
actionResult = false;
}
}
}
System.log(actionResult);
return actionResult;
System.log(vm.name);
System.log(events.length);
for (var i=0;i<#events.length;i++)
{ System.log(JSON.stringify(events[i].fullFormattedMessage))
System.log(JSON.stringify(events[i].fullFormattedMessage).split(' ')[4]);
tmpComplete = JSON.stringify(events[i].fullFormattedMessage).split(' ')[4];
if (tmpComplete == succeed)
{ actionResult = true;
break;
}
else
{ actionResult = false; }
}
System.log(actionResult);
return actionResult;
×
...auch noch interessant
- Windows // 31.10.2022Windows 2022 Disk Layout from Hell (update)
- Windows // 25.06.2020unable to resolve package source ‘https://www.powershellgallery.com/api/v2’
- VMware // 27.04.2019Vmware: Guest Introspection, Username Password (Engineering Mode)
- Windows // 27.03.2019Windows Active Directory: EventLog Login überwachen
Tippsammlung
Kleine Tippsammlung für mich und dijenige die sich auf meine Webseite verirrt haben.Archiv
Jahr
Tag(s):- Sep 2023 (1)
- Jul 2023 (1)
- Apr 2023 (1)
- Feb 2023 (1)
- Nov 2022 (2)
- Oct 2022 (1)
- Jul 2022 (1)
- Jun 2022 (2)
- May 2022 (2)
- Apr 2022 (6)
- Dec 2021 (3)
- Jun 2021 (2)
- May 2021 (1)
- Apr 2021 (2)
- tipps (30)
- synology (27)
- linux (22)
- Windows (19)
- Powershell (15)
- tool (14)
- Windows 10 (12)
- coding (9)
- csharp (c#) (8)
- security (6)
- ad (6)
- Windows 2012 R2 (5)
- vpn (5)
- Ubuntu (5)
- Pi (5)
- gitea (5)
- git (5)
- Windows 2012 (4)
- opnsense (4)
- openpgp.js (4)
- docker (4)
- Xubuntu (3)
- Windows 2016 (3)
- Ubuntu 22.04 (3)
- seo (3)
- Japanisch (3)
- ipkg (3)
- app (3)
- Android (3)
- Zertifizierungsstelle (2)
- wsus (2)
- Windows Updates (2)
- windows 2022 (2)
- Windows 2008 (2)
- web2 (2)
- VMware (2)
- verschlüsselung (2)
- Scripts (2)
- php (2)
- pgp (2)
- perl (2)
- mysql (2)
- LMS (2)
- Kanji (2)
- javascript (2)
- GnuPgP (2)
- Firewall (2)
- Excel (2)
- bash (2)
- assp (2)
Nichts gefunden
Es wurde zur Story VMware Aria Automation 8.x: VMPSMasterWorkflow32 MachineProvisioned SysPrep kein Kommentar gefundenInformation
Werbung oder Ähnliches sind nicht erlaubt, daher wird jeder Beitrag geprüft und freigegeben.Advertising, etc. are not allowed, so any contribution is reviewed and approved.
Facebook-Webadress are not allowed, Facebook als Webadresse ist nicht erlaubt
* Die E-Mail wird nicht veröffentlicht / The email will not be published
** Bitte Zahl eintragen / Please enter the number
Modal Header
Some text in the Modal Body
Some other text...
(c)2023 stastka.ch // help system