在Ubuntu 26.04 LTS,但我在22.04 LTS上也可以执行安装
sudo apt-get install -y default-jdk python3-pip sshpass unzip pip3 install --break-system-packages cryptography paramiko zstandard mkdir -p ~/jdk && curl -L -o /tmp/jdk.tgz https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz
脚本参数
–esx-root-pw ESXi主机root的密码 --vc-root-pw vCenter root的密码 -–sso-password vCenter SSO账户密码 -–sso-user administrator@vsphere.lab is the SSO domain administrator 默认为 administrator@vsphere.local
执行脚本
python3 scripts/standalone_91.py --phase pre-reboot --vc-host vcsa.lab.lab --esx-host esx1.lab.lab --sso-user administrator@vsphere.lab --vc-root-pw 'password' --esx-root-pw 'Password' --sso-password 'Password$'
输出如下
ubuntu@ubuntu-virtual-machine:~/Desktop$ python3 scripts/standalone_91.py --phase pre-reboot --vc-host 172.20.118.16 --esx-host 172.20.118.15 --sso-user administrator@vsphere.local --vc-root-pw 'Windows1@#' --esx-root-pw 'Windows1@#' --sso-password 'Windows1@#'
=== standalone_91.py - VCF 9.1 ESXi + vCenter license patch (no Ops) ===
[*] phase : pre-reboot
[*] vCenter : 172.20.118.16
[*] ESXi : 172.20.118.15
[OK] vCenter 172.20.118.16 advertises a 9.1+ API version
=== PHASE pre-reboot: prereq -> license -> vcenter -> vc-apply -> esxi ===
[*] + /usr/bin/python3 /home/ubuntu/Desktop/scripts/patch_all.py --stage prereq --vc-host 172.20.118.16 --esx-host 172.20.118.15 --root-pw 'Windows1@#' --vc-version 9.1.0 --jdk /home/ubuntu/jdk --asm-dir /home/ubuntu
=== Stage 0: prerequisite check ===
[OK] Running inside WSL already — skipping wsl-reachability check
[*] $ bash -lc for t in sshpass python3 java javac unzip scp ssh; do which $t || echo MISSING:$t; done
[OK] CLI tools present (sshpass, python3, java, javac, unzip, ssh, scp)
[*] $ bash -lc python3 -c 'import cryptography,paramiko,zstandard;print("py-ok")'
[OK] Python libs present (cryptography, paramiko, zstandard)
[*] $ bash -lc test -x /home/ubuntu/jdk/bin/javac && /home/ubuntu/jdk/bin/javac --version || echo MISSING
[!] JDK not at /home/ubuntu/jdk; falling back to system javac
[*] $ bash -lc ls /home/ubuntu/asm-9.6.jar /home/ubuntu/asm-tree-9.6.jar
[OK] ASM jars in /home/ubuntu
[OK] Required scripts present in scripts/
[OK] Jars dir: /home/ubuntu/Desktop/jars
[OK] patch_all.py finished
[*] + /usr/bin/python3 /home/ubuntu/Desktop/scripts/patch_all.py --stage license --vc-host 172.20.118.16 --esx-host 172.20.118.15 --root-pw 'Windows1@#' --vc-version 9.1.0 --jdk /home/ubuntu/jdk --asm-dir /home/ubuntu
=== Stage 1: generate license + RSA key + cert chain ===
[*] --registration-file not supplied and no ops-host given; generating standalone JWT with synthetic identity UUIDs.
[*] $ bash -lc python3 /home/ubuntu/Desktop/scripts/gen_license.py
[*] Setting up RSA key + CA-signed cert chain (CN=vcf.broadcom.com)...
Loaded existing key from /home/ubuntu/.vcf_license.key.pem
Public key (SPKI b64) → /home/ubuntu/.vcf_license.pub.pem
Loaded CA-signed cert chain from /home/ubuntu/.vcf_signing_cert.pem
x5c[0] CN: vcf.broadcom.com
x5c[1] CN: vcf-offline-ca
[*] no --asset-id given; generated synthetic asset_id=620cb501-c3ea-4568-a11b-20bdcd1120b9
[*] no --registration-id given; generated synthetic registration_id=90880ddd-31cf-4fac-b48b-ec5ef5ebd7fd
[*] Building jws_asset_identity...
[*] Building jws_entitlements[0] (VCF BASE)...
[*] Building jws_entitlements[1] (VMware Aria Suite ADDON)...
[*] Building jws_entitlements[2] (BASE VMware Aria Operations)...
[*] Building jws_entitlements[3] (ADDON VMware Live Recovery)...
[*] Building jws_entitlements[4] (ADDON VMware vDefend Distributed Firewall)...
[*] Building jws_entitlements[5] (ADDON VMware HCX)...
[*] Building jws_entitlements[6] (ADDON VMware Avi Load Balancer)...
[*] Building jws_entitlements[7] (ADDON VMware Private AI Foundation with NVIDIA)...
[*] Building jws_entitlements[8] (ADDON VMware vSAN Add-on for VCF)...
[*] Building jws_entitlements[9] (ADDON VMware vDefend Distributed Firewall Add-on)...
[*] Building jws_entitlements[10] (ADDON VMware vDefend Advanced Threat Prevention)...
[*] Building jws_entitlements[11] (ADDON VMware Aria Suite Add-on for VCF)...
[*] Building outer JWS (AssetEntitlementFileContent)...
============================================================
License file : /home/ubuntu/Desktop/sample_license.jwt
File size : 130,672 bytes
Asset ID : 620cb501-c3ea-4568-a11b-20bdcd1120b9
Reg ID : 90880ddd-31cf-4fac-b48b-ec5ef5ebd7fd
Valid : 2026-01-01T00:00:00Z → 2099-12-31T00:00:00Z
Quantity : 99999 CORES
Entitlements : 12 (full v9+ catalog)
============================================================
Cert subject : CN=vcf.broadcom.com (self-signed, 10yr)
All JWS tokens signed with the same generated private key.
Public key file : /home/ubuntu/.vcf_license.pub.pem
If new key was generated, re-patch vROps JAR:
python3 edit_jar_property.py token.provider.public.key $(cat /home/ubuntu/.vcf_license.pub.pem)
Then restart: systemctl restart vmware-vcops-controller.service
Upload via the vROps UI: Administration → Licensing → Upload License File
[*] $ bash -lc ls -la ~/.vcf_license.key.pem ~/.vcf_license.pub.pem ~/.vcf_signing_cert.pem ~/.vcf_ca_cert.pem ~/sample_license.jwt
-rw-r--r-- 1 ubuntu ubuntu 130672 8月 26 15:27 /home/ubuntu/sample_license.jwt
-rw-rw-r-- 1 ubuntu ubuntu 1968 8月 26 15:26 /home/ubuntu/.vcf_ca_cert.pem
-rw-rw-r-- 1 ubuntu ubuntu 1675 8月 26 15:26 /home/ubuntu/.vcf_license.key.pem
-rw-rw-r-- 1 ubuntu ubuntu 392 8月 27 13:59 /home/ubuntu/.vcf_license.pub.pem
-rw-rw-r-- 1 ubuntu ubuntu 1659 8月 26 15:26 /home/ubuntu/.vcf_signing_cert.pem
[*] $ bash -lc cp ~/sample_license.jwt /home/ubuntu/Desktop/sample_license.jwt
[OK] License written to /home/ubuntu/Desktop/sample_license.jwt
[OK] Keys/cert in WSL home: ~/.vcf_license.{key,pub}.pem ~/.vcf_signing_cert.pem ~/.vcf_ca_cert.pem
[OK] patch_all.py finished
[*] + /usr/bin/python3 /home/ubuntu/Desktop/scripts/patch_all.py --stage vcenter --vc-host 172.20.118.16 --esx-host 172.20.118.15 --root-pw 'Windows1@#' --vc-version 9.1.0 --jdk /home/ubuntu/jdk --asm-dir /home/ubuntu
=== Stage 3: vCenter patch ===
[*] target entitlement-protection-common jar: license-entitlement-protection-common-9.1.0.jar
[OK] pristine jar already cached: /home/ubuntu/Desktop/jars/license-entitlement-protection-common-9.1.0.jar
[*] building PatchVcLicense (X509CertificationPathVerifier.verify → RETURN)
[*] $ bash -lc test -x /home/ubuntu/jdk/bin/javac && echo HAS || echo NO
[*] $ bash -lc test -x /home/ubuntu/jdk/bin/javac && echo OK
[*] $ bash -lc cd /home/ubuntu/Desktop/scripts && javac -cp '/home/ubuntu/asm-9.6.jar:/home/ubuntu/asm-tree-9.6.jar' PatchVcLicense.java
[*] $ bash -lc cd /home/ubuntu/Desktop/scripts && java -cp '.:/home/ubuntu/asm-9.6.jar:/home/ubuntu/asm-tree-9.6.jar' PatchVcLicense /home/ubuntu/Desktop/jars/license-entitlement-protection-common-9.1.0.jar /home/ubuntu/Desktop/jars/license-entitlement-protection-common-9.1.0-patched.jar
Patching com/vmware/cis/license/entitlement/security/cert/X509CertificationPathVerifier.class - verify(...) -> no-op
Replaced verify(X509Certificate,List,Set,Date)V body with RETURN
Done -> /home/ubuntu/Desktop/jars/license-entitlement-protection-common-9.1.0-patched.jar
[OK] Built patched jar: license-entitlement-protection-common-9.1.0-patched.jar
[*] backing up + deploying patched jar to 172.20.118.16
[*] $ python3 /home/ubuntu/Desktop/vc_ssh.py cp -n /usr/lib/vmware-cis-license/lib/license-entitlement-protection-common-9.1.0.jar /usr/lib/vmware-cis-license/lib/license-entitlement-protection-common-9.1.0.jar.orig || true
[vc_ssh] running on 172.20.118.16: cp -n /usr/lib/vmware-cis-license/lib/license-entitlement-protection-common-9.1....
cp -n /usr/lib/vmware-cis-license/lib/license-entitlement-protection-common-9.1.0.jar /usr/lib/vmware-cis-license/lib/license-entitlement-protection-common-9.1.0.jar.orig || true
root@localhost [ ~ ]# echo ---DONE---
---DONE---
root@localhost [ ~ ]# [*] $ python3 /home/ubuntu/Desktop/vc_put_b64.py /home/ubuntu/Desktop/jars/license-entitlement-protection-common-9.1.0-patched.jar /tmp/lep-patched.jar
[vc_put] /home/ubuntu/Desktop/jars/license-entitlement-protection-common-9.1.0-patched.jar (74372 bytes) -> 172.20.118.16:/tmp/lep-patched.jar
base64 -d /tmp/upload.b64 > /tmp/lep-patched.jar && rm /tmp/upload.b64 && echo OK-$(wc -c < /tmp/lep-patched.jar)-bytes ; echo ---END---
OK-74372-bytes
---END---
root@localhost [ ~ ]#
[*] $ python3 /home/ubuntu/Desktop/vc_ssh.py cp /tmp/lep-patched.jar /usr/lib/vmware-cis-license/lib/license-entitlement-protection-common-9.1.0.jar && chmod 644 /usr/lib/vmware-cis-license/lib/license-entitlement-protection-common-9.1.0.jar
[vc_ssh] running on 172.20.118.16: cp /tmp/lep-patched.jar /usr/lib/vmware-cis-license/lib/license-entitlement-prot...
cp /tmp/lep-patched.jar /usr/lib/vmware-cis-license/lib/license-entitlement-protection-common-9.1.0.jar && chmod 644 /usr/lib/vmware-cis-license/lib/license-entitlement-protection-common-9.1.0.jar
root@localhost [ ~ ]# echo ---DONE---
---DONE---
root@localhost [ ~ ]# [OK] pristine jar already cached: /home/ubuntu/Desktop/jars/license-common-9.1.0.jar
[*] building PatchFeatureState (VcfLicenseServerSupport -> false)
[*] $ bash -lc test -x /home/ubuntu/jdk/bin/javac && echo HAS || echo NO
[*] $ bash -lc test -x /home/ubuntu/jdk/bin/javac && echo OK
[*] $ bash -lc cd /home/ubuntu/Desktop/scripts && javac -cp '/home/ubuntu/asm-9.6.jar:/home/ubuntu/asm-tree-9.6.jar' PatchFeatureState.java
[*] $ bash -lc cd /home/ubuntu/Desktop/scripts && java -cp '.:/home/ubuntu/asm-9.6.jar:/home/ubuntu/asm-tree-9.6.jar' PatchFeatureState /home/ubuntu/Desktop/jars/license-common-9.1.0.jar /home/ubuntu/Desktop/jars/license-common-9.1.0-patched.jar
Patching com/vmware/cis/license/common/featurestate/FeatureStateSwitchWrapper.class - getVcfLicenseServerSupportFeatureState() -> false
Replaced getVcfLicenseServerSupportFeatureState()Z body with ICONST_0; IRETURN (return false)
Done -> /home/ubuntu/Desktop/jars/license-common-9.1.0-patched.jar
[OK] Built patched jar: license-common-9.1.0-patched.jar
[*] $ python3 /home/ubuntu/Desktop/vc_ssh.py cp -n /usr/lib/vmware-cis-license/lib/license-common-9.1.0.jar /usr/lib/vmware-cis-license/lib/license-common-9.1.0.jar.orig || true
[vc_ssh] running on 172.20.118.16: cp -n /usr/lib/vmware-cis-license/lib/license-common-9.1.0.jar /usr/lib/vmware-c...
cp -n /usr/lib/vmware-cis-license/lib/license-common-9.1.0.jar /usr/lib/vmware-cis-license/lib/license-common-9.1.0.jar.orig || true
root@localhost [ ~ ]# echo ---DONE---
---DONE---
root@localhost [ ~ ]# [*] $ python3 /home/ubuntu/Desktop/vc_put_b64.py /home/ubuntu/Desktop/jars/license-common-9.1.0-patched.jar /tmp/lc-patched.jar
[vc_put] /home/ubuntu/Desktop/jars/license-common-9.1.0-patched.jar (84137 bytes) -> 172.20.118.16:/tmp/lc-patched.jar
vZGwvVm1vZGxPYmplY3REdW1wLmNsYXNzUEsBAhQAFAAICAgAdm8bXZLGHpQ9EQAAlSwAADMAAAAAAAAAAAAAAAAAkRwBAGNvbS92bXdhcmUvY2lzL2xpY2Vuc2UvY29tbW9uL3Ztb2RsL1Ztb2RsVXRpbC5jbGFzc1BLBQYAAAAARQBFAGQaAAAvLgEAAAA=' >> /tmp/upload.b64
root@localhost [ ~ ]# base64 -d /tmp/upload.b64 > /tmp/lc-patched.jar && rm /tmp/upload.b64 && echo OK-$(wc -c < /tmp/lc-patched.jar)-bytes ; echo ---END---
OK-84137-bytes
---END---
root@localhost [ ~ ]#
[*] $ python3 /home/ubuntu/Desktop/vc_ssh.py cp /tmp/lc-patched.jar /usr/lib/vmware-cis-license/lib/license-common-9.1.0.jar && chmod 644 /usr/lib/vmware-cis-license/lib/license-common-9.1.0.jar && rm /tmp/lc-patched.jar
[vc_ssh] running on 172.20.118.16: cp /tmp/lc-patched.jar /usr/lib/vmware-cis-license/lib/license-common-9.1.0.jar ...
cp /tmp/lc-patched.jar /usr/lib/vmware-cis-license/lib/license-common-9.1.0.jar && chmod 644 /usr/lib/vmware-cis-license/lib/license-common-9.1.0.jar && rm /tmp/lc-patched.jar
root@localhost [ ~ ]# echo ---DONE---
---DONE---
root@localhost [ ~ ]# [*] $ python3 /home/ubuntu/Desktop/vc_ssh.py service-control --restart vmware-cis-license
[vc_ssh] running on 172.20.118.16: service-control --restart vmware-cis-license
service-control --restart vmware-cis-license
Successfully restarted service cis-license
root@localhost [ ~ ]# echo ---DONE---
---DONE---
root@localhost [ ~ ]# [*] waiting for cis-license to become ready (polling local REST)...
[*] $ python3 /home/ubuntu/Desktop/vc_ssh.py for i in $(seq 1 30); do code=$(curl -sk -o /dev/null -w %{http_code} https://localhost/api/cis/license/subscription/entitlement/asset-assignments) ; if [ "$code" = "401" ] || [ "$code" = "200" ] ; then echo cis-license READY (HTTP $code after ${i}s) ; exit 0 ; fi ; sleep 3 ; done ; echo cis-license did NOT become ready within ~90s ; exit 1
[vc_ssh] running on 172.20.118.16: for i in $(seq 1 30); do code=$(curl -sk -o /dev/null -w %{http_code} ...
for i in $(seq 1 30); do code=$(curl -sk -o /dev/null -w %{http_code} https://localhost/api/cis/license/subscription/entitlement/asset-assignments) ; if [ "$code" = "401" ] || [ "$code" = "200" ] ; then echo cis-license READY (HTTP $code after ${i}s) ; exit 0 ; fi ; sleep 3 ; done ; echo cis-license did NOT become ready within ~90s ; exit 1
bash: syntax error near unexpected token `('
root@localhost [ ~ ]# echo ---DONE---
---DONE---
root@localhost [ ~ ]# [*] $ python3 /home/ubuntu/Desktop/vc_ssh.py tail -30 /var/log/vmware/cis-license/license.log
[vc_ssh] running on 172.20.118.16: tail -30 /var/log/vmware/cis-license/license.log
tail -30 /var/log/vmware/cis-license/license.log
2026-08-27T06:00:31.297Z INFO CISLicense 1 [vc@4413 threadName="main" logger="vmomi.server.http.impl.TcServer"] Configure servlet class com.vmware.cis.license.server.core.resourcebundle.servlet.ResourceBundleServlet with path /ls/resourcebundle
2026-08-27T06:00:31.297Z INFO CISLicense 1 [vc@4413 threadName="main" logger="vmomi.server.http.impl.TcServer"] Configure servlet class com.vmware.vim.vmomi.server.mob.impl.AsyncMob30Servlet with path /ls/old/mob
2026-08-27T06:00:31.297Z INFO CISLicense 1 [vc@4413 threadName="main" logger="vmomi.server.http.impl.TcServer"] Configure servlet class com.vmware.vim.vmomi.server.http.impl.AsyncVmomi30Servlet with path /ls/ph/sdk
2026-08-27T06:00:31.297Z INFO CISLicense 1 [vc@4413 threadName="main" logger="vmomi.server.http.impl.TcServer"] Configure servlet class com.vmware.vim.vmomi.server.mob.impl.AsyncMob30Servlet with path /ls/ph/mob
2026-08-27T06:00:31.298Z INFO CISLicense 1 [vc@4413 threadName="main" logger="vmomi.server.http.impl.TcServer"] Configure servlet class com.vmware.vapi.protocol.server.rpc.http.impl.HttpStreamingServlet with path /ls/slms
2026-08-27T06:00:31.429Z INFO CISLicense 1 [vc@4413 threadName="main" logger="vmomi.server.http.impl.TcServer"] Starting server on [HTTP:0.0.0.0:12080, maxIdleTime: 120000 ms, maxKeepAliveRequests: 100]
2026-08-27T06:00:31.489Z INFO CISLicense 24 [vc@4413 threadName="Timer-3" logger="com.vmware.identity.interop.NativeLibraryPreloader"] jna.library.path: /usr/lib/vmware-vmafd/lib64:/opt/likewise/lib64:/opt/vmware/lib64:/opt/vmware/lib:/usr/lib/vmware-vmdir/lib64:/usr/lib/vmware-vmafd/lib64:/opt/likewise/lib64:/usr/lib64
2026-08-27T06:00:31.515Z INFO CISLicense 24 [vc@4413 threadName="Timer-3" logger="vmware.identity.interop.ldap.OpenLdapClientLibrary"] isPhoton4Version: true
2026-08-27T06:00:31.548Z INFO CISLicense 24 [vc@4413 threadName="Timer-3" logger="vmware.identity.interop.ldap.OpenLdapClientLibrary"] SSL library initialized successfully
2026-08-27T06:00:31.587Z INFO CISLicense 23 [vc@4413 threadName="Timer-2" logger="server.common.service.impl.TimerTaskImpl"] Health Status Update performed one cycle at: 2026-08-27T06:00:31+00:00. Cycle successful: true
2026-08-27T06:00:31.720Z INFO CISLicense 24 [vc@4413 threadName="Timer-3" logger="server.common.lookup.impl.LookupServiceInfoProviderImpl"] Searching for all services in all sites
2026-08-27T06:00:32.982Z INFO CISLicense 1 [vc@4413 threadName="main" logger="cis.license.server.core.Main"] Service successfully started
2026-08-27T06:00:33.522Z INFO CISLicense 30 [vc@4413 threadName="http-nio-0.0.0.0-12080-exec-1" logger="vim.vmomi.core.tracing.TracingFeature"] VLSI tracing is on.
2026-08-27T06:00:33.917Z WARNING CISLicense 48 [vc@4413 threadName="vmomi-executor-1" logger="common.vmomi.authn.impl.SsoAuthenticatorImpl"] authenticate: Session auth data not set in request: sessionNonce: 'ed9caf6a-a185-4484-95b6-b87590095846' sessionUser: '' requestUri: '/ls/sdk' requestContext: '{operationID=b2130d94-9a36-444f-89d4-65291bb6bb05}'
2026-08-27T06:00:33.918Z INFO CISLicense 48 [vc@4413 threadName="vmomi-executor-1" logger="vim.vmomi.server.impl.ValidatorFutureImpl"] Validation failed for 0: Authentication result: Missing session auth data (com.vmware.vim.binding.cis.license.fault.NotAuthenticatedFault)
2026-08-27T06:00:33.966Z WARNING CISLicense 48 [vc@4413 threadName="vmomi-executor-1" logger="common.vmomi.authn.impl.SsoAuthenticatorImpl"] authenticate: Session auth data not set in request: sessionNonce: 'ed9caf6a-a185-4484-95b6-b87590095846' sessionUser: '' requestUri: '/ls/sdk' requestContext: '{operationID=ad4f9c70-d944-4810-acfa-a156a9d2763e}'
2026-08-27T06:00:33.966Z INFO CISLicense 48 [vc@4413 threadName="vmomi-executor-1" logger="vim.vmomi.server.impl.ValidatorFutureImpl"] Validation failed for 1: Authentication result: Missing session auth data (com.vmware.vim.binding.cis.license.fault.NotAuthenticatedFault)
2026-08-27T06:00:34.018Z INFO CISLicense 51 [vc@4413 threadName="invocation-vmomi-executor-1" logger="server.common.provider.impl.EnvoyEndpointsProviderImpl" opId="b2374fe2-c474-4f40-88a3-81104a216aa3"] Retrieved endpoint: http://localhost:1080/sso-adminserver/system-sdk
2026-08-27T06:00:34.407Z INFO CISLicense 22 [vc@4413 threadName="Timer-1" logger="server.common.lookup.impl.LookupClientPoolableObjectFactoryImpl"] Existing Lookup Service connection valid: true
2026-08-27T06:00:34.410Z INFO CISLicense 22 [vc@4413 threadName="Timer-1" logger="server.common.service.impl.TimerTaskImpl"] Common Services Reachability Checking task performed one cycle at: 2026-08-27T06:00:34+00:00. Cycle successful: true
2026-08-27T06:00:34.416Z INFO CISLicense 24 [vc@4413 threadName="Timer-3" logger="server.common.lookup.impl.LookupClientPoolableObjectFactoryImpl"] Existing Lookup Service connection valid: true
2026-08-27T06:00:35.380Z INFO CISLicense 51 [vc@4413 threadName="invocation-vmomi-executor-1" logger="vmware.identity.token.impl.Util" opId="b2374fe2-c474-4f40-88a3-81104a216aa3"] Reading resources from zip file path=[/usr/lib/vmware/common-jars/internal/libsamltoken.jar]
2026-08-27T06:00:35.380Z INFO CISLicense 51 [vc@4413 threadName="invocation-vmomi-executor-1" logger="vmware.identity.token.impl.Util" opId="b2374fe2-c474-4f40-88a3-81104a216aa3"] Reading resources from decoded zip file path=[/usr/lib/vmware/common-jars/internal/libsamltoken.jar]
2026-08-27T06:00:35.474Z INFO CISLicense 24 [vc@4413 threadName="Timer-3" logger="server.common.lookup.impl.LookupServiceInfoProviderImpl"] 40 services found
2026-08-27T06:00:36.080Z INFO CISLicense 51 [vc@4413 threadName="invocation-vmomi-executor-1" logger="common.vmomi.authn.impl.SsoLoginHelperImpl" opId="b2374fe2-c474-4f40-88a3-81104a216aa3"] login: Successfully authenticated 'vpxd-svc-acct-8c34cf4a-d555-4140-b575-9ddde11a72c2@VSPHERE.LOCAL' on session ed9caf6a-a185-4484-95b6-b87590095846
2026-08-27T06:00:36.096Z INFO CISLicense 24 [vc@4413 threadName="Timer-3" logger="core.management.maint.service.AssetInventoryMaintainerTimerTaskImpl"] Maintenance of the asset inventory completed successfully
2026-08-27T06:00:36.096Z INFO CISLicense 24 [vc@4413 threadName="Timer-3" logger="server.common.service.impl.TimerTaskImpl"] Asset Inventory Maintainer task performed one cycle at: 2026-08-27T06:00:36+00:00. Cycle successful: true
2026-08-27T06:00:40.885Z INFO CISLicense 23 [vc@4413 threadName="Timer-2" logger="server.common.service.impl.TimerTaskImpl"] Afd Heartbeat running one cycle at: 2026-08-27T06:00:40+00:00 with timestamp: 2026-08-27T06:00:40+00:00
2026-08-27T06:00:40.887Z INFO CISLicense 23 [vc@4413 threadName="Timer-2" logger="server.core.healthstatus.impl.AfdHeartbeatManagerImpl"] Started heartbeat for License Service
2026-08-27T06:00:40.887Z INFO CISLicense 23 [vc@4413 threadName="Timer-2" logger="server.common.service.impl.TimerTaskImpl"] Afd Heartbeat performed one cycle at: 2026-08-27T06:00:40+00:00. Cycle successful: true
root@localhost [ ~ ]# echo ---DONE---
---DONE---
root@localhost [ ~ ]# [OK] vCenter cis-license validator jar deployed
[OK] patch_all.py finished
[*] + /usr/bin/python3 /home/ubuntu/Desktop/scripts/patch_all.py --stage vc-apply --vc-host 172.20.118.16 --esx-host 172.20.118.15 --root-pw 'Windows1@#' --vc-version 9.1.0 --jdk /home/ubuntu/jdk --asm-dir /home/ubuntu --sso-user administrator@vsphere.local --sso-password 'Windows1@#'
=== Stage 3b: push entitlement JWT to vCenter via REST API ===
[*] $ python3 /home/ubuntu/Desktop/scripts/apply_vc_license.py --host 172.20.118.16 --root-password Windows1@# --sso-user administrator@vsphere.local --sso-password Windows1@# --license /home/ubuntu/Desktop/sample_license.jwt
[*] [1/6] Reading license JWT: /home/ubuntu/Desktop/sample_license.jwt
[OK] License JWT: 130672 chars, 3 parts
[*] Outer JWS contains 12 inner entitlement(s)
[*] Push order (last wins the vC asset 'primary' slot):
[*] [1] VMware Cloud Foundation / VCF-Aria-Addon (ADDON)
[*] [2] VMware Cloud Foundation / VCF-NSX-ATP-Addon (ADDON)
[*] [3] VMware Cloud Foundation / VCF-NSX-DFW-Addon (ADDON)
[*] [4] VMware Cloud Foundation / VCF-PrivateAI-Addon (ADDON)
[*] [5] VMware Cloud Foundation / VCF-vSAN-Addon (ADDON)
[*] [6] VMware Avi Load Balancer / VMware Avi Load Balancer (ADDON)
[*] [7] VMware HCX / VMware HCX (ADDON)
[*] [8] VMware Live Recovery / VMware Live Recovery (ADDON)
[*] [9] VMware vDefend / VMware vDefend (ADDON)
[*] [10] VMware Aria Suite / VMware Aria Operations (BASE)
[*] [11] VMware Aria Suite / VMware Aria Suite (BASE)
[*] [12] VMware Cloud Foundation / VCF (BASE)
[*] [2/6] Jar deployment check on 172.20.118.16
[*] SSH 172.20.118.16: checking deployed patched jars…
[*] Live jar: command: `md5sum' → md5=Unknown
[OK] Jar present (md5=Unknown)
[*] Live jar: command: `md5sum' → md5=Unknown
[OK] Jar present (md5=Unknown)
[*] [3/6] Acquiring REST session token from 172.20.118.16
[*] REST session → https://172.20.118.16/api/session (user=administrator@vsphere.local)
[*] Session token obtained (32 chars)
[*] [4/6] Submitting 12 entitlement(s) to 172.20.118.16
[*] [1/12] VMware Cloud Foundation ADDON alloc=57ed1005
[*] REST PATCH (VMware Cloud Foundation ADDON alloc=57ed1005) → https://172.20.118.16/api/cis/license/subscription/entitlement/entitlements?vmw-task=true
[*] jwt_size=7394 chars other_vc_usages=[]
[*] HTTP 202 (99 bytes)
[*] Task created: 472703df-d097-4b9f-b086-2fe348f1f340:com.vmware.cis.license.subscription.entitlement.entitlements
[*] [5/6] Polling task 472703df-d097-4b9f-b086-2fe348f1f340:com.vmware.cis.license.subscription.entitlement.entitlements
[*] Polling task 472703df-d097-4b9f-b086-2fe348f1f340:com.vmware.cis.license.subscription.entitlement.entitlements…
[*] Task status: FAILED
[!] Task FAILED: {"error_type": "INVALID_ARGUMENT", "messages": [{"args": [], "default_message": "Add-on license VMware Aria Suite Add-on for VCF cannot be assigned, vCenter must be assigned a license first.", "localized": "Add-on license VMware Aria Suite Add-on for VCF cannot be assigned, vCenter must be assigned a license first.", "id": "unused.id"}]}
[!] Entitlement VMware Cloud Foundation ADDON alloc=57ed1005 FAILED — continuing with remaining entitlements
[*] [2/12] VMware Cloud Foundation ADDON alloc=0c8dd231
[*] REST PATCH (VMware Cloud Foundation ADDON alloc=0c8dd231) → https://172.20.118.16/api/cis/license/subscription/entitlement/entitlements?vmw-task=true
[*] jwt_size=7416 chars other_vc_usages=[]
[*] HTTP 202 (99 bytes)
[*] Task created: 70bdba55-b01f-4557-aebe-63a48797f674:com.vmware.cis.license.subscription.entitlement.entitlements
[*] [5/6] Polling task 70bdba55-b01f-4557-aebe-63a48797f674:com.vmware.cis.license.subscription.entitlement.entitlements
[*] Polling task 70bdba55-b01f-4557-aebe-63a48797f674:com.vmware.cis.license.subscription.entitlement.entitlements…
[*] Task status: FAILED
[!] Task FAILED: {"error_type": "INVALID_ARGUMENT", "messages": [{"args": [], "default_message": "Add-on license VMware vDefend Advanced Threat Prevention cannot be assigned, vCenter must be assigned a license first.", "localized": "Add-on license VMware vDefend Advanced Threat Prevention cannot be assigned, vCenter must be assigned a license first.", "id": "unused.id"}]}
[!] Entitlement VMware Cloud Foundation ADDON alloc=0c8dd231 FAILED — continuing with remaining entitlements
[*] [3/12] VMware Cloud Foundation ADDON alloc=31f3fa2f
[*] REST PATCH (VMware Cloud Foundation ADDON alloc=31f3fa2f) → https://172.20.118.16/api/cis/license/subscription/entitlement/entitlements?vmw-task=true
[*] jwt_size=7360 chars other_vc_usages=[]
[*] HTTP 202 (99 bytes)
[*] Task created: 8474a21f-eab0-4ad0-803e-8921a7e4370d:com.vmware.cis.license.subscription.entitlement.entitlements
[*] [5/6] Polling task 8474a21f-eab0-4ad0-803e-8921a7e4370d:com.vmware.cis.license.subscription.entitlement.entitlements
[*] Polling task 8474a21f-eab0-4ad0-803e-8921a7e4370d:com.vmware.cis.license.subscription.entitlement.entitlements…
[*] Task status: FAILED
[!] Task FAILED: {"error_type": "INVALID_ARGUMENT", "messages": [{"args": [], "default_message": "Add-on license VMware vDefend Distributed Firewall Add-on cannot be assigned, vCenter must be assigned a license first.", "localized": "Add-on license VMware vDefend Distributed Firewall Add-on cannot be assigned, vCenter must be assigned a license first.", "id": "unused.id"}]}
[!] Entitlement VMware Cloud Foundation ADDON alloc=31f3fa2f FAILED — continuing with remaining entitlements
[*] [4/12] VMware Cloud Foundation ADDON alloc=940b2153
[*] REST PATCH (VMware Cloud Foundation ADDON alloc=940b2153) → https://172.20.118.16/api/cis/license/subscription/entitlement/entitlements?vmw-task=true
[*] jwt_size=7328 chars other_vc_usages=[]
[*] HTTP 202 (99 bytes)
[*] Task created: 481bcb36-dcda-4e17-9d75-07d04eeff150:com.vmware.cis.license.subscription.entitlement.entitlements
[*] [5/6] Polling task 481bcb36-dcda-4e17-9d75-07d04eeff150:com.vmware.cis.license.subscription.entitlement.entitlements
[*] Polling task 481bcb36-dcda-4e17-9d75-07d04eeff150:com.vmware.cis.license.subscription.entitlement.entitlements…
[*] Task status: FAILED
[!] Task FAILED: {"error_type": "INVALID_ARGUMENT", "messages": [{"args": [], "default_message": "Add-on license VMware Private AI Foundation with NVIDIA cannot be assigned, vCenter must be assigned a license first.", "localized": "Add-on license VMware Private AI Foundation with NVIDIA cannot be assigned, vCenter must be assigned a license first.", "id": "unused.id"}]}
[!] Entitlement VMware Cloud Foundation ADDON alloc=940b2153 FAILED — continuing with remaining entitlements
[*] [5/12] VMware Cloud Foundation ADDON alloc=6e09a31c
[*] REST PATCH (VMware Cloud Foundation ADDON alloc=6e09a31c) → https://172.20.118.16/api/cis/license/subscription/entitlement/entitlements?vmw-task=true
[*] jwt_size=7340 chars other_vc_usages=[]
[*] HTTP 202 (99 bytes)
[*] Task created: 0b048af4-d664-4f2d-a898-6760aaae7c16:com.vmware.cis.license.subscription.entitlement.entitlements
[*] [5/6] Polling task 0b048af4-d664-4f2d-a898-6760aaae7c16:com.vmware.cis.license.subscription.entitlement.entitlements
[*] Polling task 0b048af4-d664-4f2d-a898-6760aaae7c16:com.vmware.cis.license.subscription.entitlement.entitlements…
[*] Task status: FAILED
[!] Task FAILED: {"error_type": "INVALID_ARGUMENT", "messages": [{"args": [], "default_message": "Add-on license VMware vSAN Add-on for VCF cannot be assigned, vCenter must be assigned a license first.", "localized": "Add-on license VMware vSAN Add-on for VCF cannot be assigned, vCenter must be assigned a license first.", "id": "unused.id"}]}
[!] Entitlement VMware Cloud Foundation ADDON alloc=6e09a31c FAILED — continuing with remaining entitlements
[*] [6/12] VMware Avi Load Balancer ADDON alloc=c087d88b
[*] REST PATCH (VMware Avi Load Balancer ADDON alloc=c087d88b) → https://172.20.118.16/api/cis/license/subscription/entitlement/entitlements?vmw-task=true
[*] jwt_size=6914 chars other_vc_usages=[]
[*] HTTP 202 (99 bytes)
[*] Task created: 2c574971-18ba-44e5-919b-dc677901bd8a:com.vmware.cis.license.subscription.entitlement.entitlements
[*] [5/6] Polling task 2c574971-18ba-44e5-919b-dc677901bd8a:com.vmware.cis.license.subscription.entitlement.entitlements
[*] Polling task 2c574971-18ba-44e5-919b-dc677901bd8a:com.vmware.cis.license.subscription.entitlement.entitlements…
[*] Task status: FAILED
[!] Task FAILED: {"error_type": "INVALID_ARGUMENT", "messages": [{"args": [], "default_message": "Add-on license VMware Avi Load Balancer cannot be assigned, vCenter must be assigned a license first.", "localized": "Add-on license VMware Avi Load Balancer cannot be assigned, vCenter must be assigned a license first.", "id": "unused.id"}]}
[!] Entitlement VMware Avi Load Balancer ADDON alloc=c087d88b FAILED — continuing with remaining entitlements
[*] [7/12] VMware HCX ADDON alloc=1122d141
[*] REST PATCH (VMware HCX ADDON alloc=1122d141) → https://172.20.118.16/api/cis/license/subscription/entitlement/entitlements?vmw-task=true
[*] jwt_size=6850 chars other_vc_usages=[]
[*] HTTP 202 (99 bytes)
[*] Task created: 29908718-7a83-4e2b-9e6e-7703c9295522:com.vmware.cis.license.subscription.entitlement.entitlements
[*] [5/6] Polling task 29908718-7a83-4e2b-9e6e-7703c9295522:com.vmware.cis.license.subscription.entitlement.entitlements
[*] Polling task 29908718-7a83-4e2b-9e6e-7703c9295522:com.vmware.cis.license.subscription.entitlement.entitlements…
[*] Task status: FAILED
[!] Task FAILED: {"error_type": "INVALID_ARGUMENT", "messages": [{"args": [], "default_message": "Add-on license VMware HCX cannot be assigned, vCenter must be assigned a license first.", "localized": "Add-on license VMware HCX cannot be assigned, vCenter must be assigned a license first.", "id": "unused.id"}]}
[!] Entitlement VMware HCX ADDON alloc=1122d141 FAILED — continuing with remaining entitlements
[*] [8/12] VMware Live Recovery ADDON alloc=cfdf6f09
[*] REST PATCH (VMware Live Recovery ADDON alloc=cfdf6f09) → https://172.20.118.16/api/cis/license/subscription/entitlement/entitlements?vmw-task=true
[*] jwt_size=6884 chars other_vc_usages=[]
[*] HTTP 202 (99 bytes)
[*] Task created: 6bb28d05-4fa5-4a25-99c4-285cf3e5b63e:com.vmware.cis.license.subscription.entitlement.entitlements
[*] [5/6] Polling task 6bb28d05-4fa5-4a25-99c4-285cf3e5b63e:com.vmware.cis.license.subscription.entitlement.entitlements
[*] Polling task 6bb28d05-4fa5-4a25-99c4-285cf3e5b63e:com.vmware.cis.license.subscription.entitlement.entitlements…
[*] Task status: FAILED
[!] Task FAILED: {"error_type": "INVALID_ARGUMENT", "messages": [{"args": [], "default_message": "Add-on license VMware Live Recovery cannot be assigned, vCenter must be assigned a license first.", "localized": "Add-on license VMware Live Recovery cannot be assigned, vCenter must be assigned a license first.", "id": "unused.id"}]}
[!] Entitlement VMware Live Recovery ADDON alloc=cfdf6f09 FAILED — continuing with remaining entitlements
[*] [9/12] VMware vDefend ADDON alloc=ed36d9ff
[*] REST PATCH (VMware vDefend ADDON alloc=ed36d9ff) → https://172.20.118.16/api/cis/license/subscription/entitlement/entitlements?vmw-task=true
[*] jwt_size=7407 chars other_vc_usages=[]
[*] HTTP 202 (99 bytes)
[*] Task created: f657c09a-ff03-45ed-be98-12c8682cbbb8:com.vmware.cis.license.subscription.entitlement.entitlements
[*] [5/6] Polling task f657c09a-ff03-45ed-be98-12c8682cbbb8:com.vmware.cis.license.subscription.entitlement.entitlements
[*] Polling task f657c09a-ff03-45ed-be98-12c8682cbbb8:com.vmware.cis.license.subscription.entitlement.entitlements…
[*] Task status: FAILED
[!] Task FAILED: {"error_type": "INVALID_ARGUMENT", "messages": [{"args": [], "default_message": "Add-on license VMware vDefend Distributed Firewall cannot be assigned, vCenter must be assigned a license first.", "localized": "Add-on license VMware vDefend Distributed Firewall cannot be assigned, vCenter must be assigned a license first.", "id": "unused.id"}]}
[!] Entitlement VMware vDefend ADDON alloc=ed36d9ff FAILED — continuing with remaining entitlements
[*] [10/12] VMware Aria Suite BASE alloc=7e85b1fb
[*] REST PATCH (VMware Aria Suite BASE alloc=7e85b1fb) → https://172.20.118.16/api/cis/license/subscription/entitlement/entitlements?vmw-task=true
[*] jwt_size=7175 chars other_vc_usages=[]
[*] HTTP 202 (99 bytes)
[*] Task created: c5cea337-4361-49b6-96e6-bb6c8f4c84ed:com.vmware.cis.license.subscription.entitlement.entitlements
[*] [5/6] Polling task c5cea337-4361-49b6-96e6-bb6c8f4c84ed:com.vmware.cis.license.subscription.entitlement.entitlements
[*] Polling task c5cea337-4361-49b6-96e6-bb6c8f4c84ed:com.vmware.cis.license.subscription.entitlement.entitlements…
[*] Task status: SUCCEEDED
[OK] Task SUCCEEDED
[*] [11/12] VMware Aria Suite BASE alloc=b84ff79a
[*] REST PATCH (VMware Aria Suite BASE alloc=b84ff79a) → https://172.20.118.16/api/cis/license/subscription/entitlement/entitlements?vmw-task=true
[*] jwt_size=6822 chars other_vc_usages=[]
[*] HTTP 202 (99 bytes)
[*] Task created: c31fdbd5-bddd-4c97-874b-83b5839129b0:com.vmware.cis.license.subscription.entitlement.entitlements
[*] [5/6] Polling task c31fdbd5-bddd-4c97-874b-83b5839129b0:com.vmware.cis.license.subscription.entitlement.entitlements
[*] Polling task c31fdbd5-bddd-4c97-874b-83b5839129b0:com.vmware.cis.license.subscription.entitlement.entitlements…
[*] Task status: SUCCEEDED
[OK] Task SUCCEEDED
[*] [12/12] VMware Cloud Foundation BASE alloc=aea2a3e0
[*] REST PATCH (VMware Cloud Foundation BASE alloc=aea2a3e0) → https://172.20.118.16/api/cis/license/subscription/entitlement/entitlements?vmw-task=true
[*] jwt_size=8915 chars other_vc_usages=[]
[*] HTTP 202 (99 bytes)
[*] Task created: 36294e42-0943-4e26-9dc3-4ba4f534fbe5:com.vmware.cis.license.subscription.entitlement.entitlements
[*] [5/6] Polling task 36294e42-0943-4e26-9dc3-4ba4f534fbe5:com.vmware.cis.license.subscription.entitlement.entitlements
[*] Polling task 36294e42-0943-4e26-9dc3-4ba4f534fbe5:com.vmware.cis.license.subscription.entitlement.entitlements…
[*] Task status: SUCCEEDED
[OK] Task SUCCEEDED
[OK] Pushed 3/12 entitlements successfully
[!] Failed entitlements: ['VMware Cloud Foundation ADDON alloc=57ed1005', 'VMware Cloud Foundation ADDON alloc=0c8dd231', 'VMware Cloud Foundation ADDON alloc=31f3fa2f', 'VMware Cloud Foundation ADDON alloc=940b2153', 'VMware Cloud Foundation ADDON alloc=6e09a31c', 'VMware Avi Load Balancer ADDON alloc=c087d88b', 'VMware HCX ADDON alloc=1122d141', 'VMware Live Recovery ADDON alloc=cfdf6f09', 'VMware vDefend ADDON alloc=ed36d9ff']
[*] [6/6] Post-call log verification on 172.20.118.16
[*] Post-call log check on 172.20.118.16…
Unknown command: `sh'
[*] [7/7] Binding override entitlement to managed ESXi host assets
[*] discovered 1 ESXi-host asset(s) in vCenter inventory (total assets: 2)
[*] - 172.20.118.15 urn:vri:com.vmware.license.asset:host-9-cfc4af4a-887d-46a5-8528-f41a1018efa2
[*] POST (VCF BASE override) -> https://172.20.118.16/api/cis/license/subscription/entitlement/override-entitlements?action=assign&vmw-task=true
[*] asset_ids = ['urn:vri:com.vmware.license.asset:host-9-cfc4af4a-887d-46a5-8528-f41a1018efa2']
[*] HTTP 202 (108 bytes)
[*] Task created: 3d7ad7da-3d26-4977-a43b-d5bf7bc68b71:com.vmware.cis.license.subscription.entitlement.override_entitlements
[*] Task status: SUCCEEDED
[OK] Override entitlement bound to all requested host assets
[OK] apply_vc_license.py complete — entitlements pushed to vCenter
[OK] Run `patch_all.py --stage verify` for full environment status
[OK] Entitlement JWT pushed to vCenter
[OK] patch_all.py finished
[*] + /usr/bin/python3 /home/ubuntu/Desktop/scripts/patch_all.py --stage esxi --vc-host 172.20.118.16 --esx-host 172.20.118.15 --root-pw 'Windows1@#' --vc-version 9.1.0 --jdk /home/ubuntu/jdk --asm-dir /home/ubuntu --esx-reboot
=== Stage 4: ESXi libentitlement.so 3-patch (chain + sig + ret-value) ===
[*] $ python3 /home/ubuntu/Desktop/scripts/esx_libent_patch_full.py --host 172.20.118.15 --password Windows1@# --verify
Working directory: /tmp/esx_libent_patch_uu290ksy
[1/9] Host sanity check
Build: VMware ESXi 9.1.0 build-25370933
Encryption: Mode: NONE
Require Executables Only From Installed VIBs: false
Require Secure Boot: false
PASS: Secure Boot OFF (or assumed off via boot.cfg)
Already patched (md5 c36239c336eb91e3dcd7b10b452121aa = 9.1 U1 sig+null-key)
/bootbank/licpatch.v00 present and boot.cfg references it.
Skipping rebuild. No reboot required.
[OK] ESXi sb.v00 deploy complete
[OK] patch_all.py finished
[OK] standalone_91.py --phase pre-reboot finished
[*] ESXi has been rebooted. Once it is back online, run:
[*] python3 standalone_91.py --phase post-reboot --vc-host 172.20.118.16 --esx-host 172.20.118.15 ...
完成后再执行脚本
python3 scripts/standalone_91.py --phase post-reboot --vc-host vcsa.lab.lab --esx-host esx1.lab.lab --sso-user administrator@vsphere.lab --vc-root-pw 'password' --esx-root-pw 'Password' --sso-password 'Password$'
输出如下
ubuntu@ubuntu-virtual-machine:~/Desktop$ python3 scripts/standalone_91.py --phase post-reboot --vc-host 172.20.118.16 --esx-host 172.20.118.15 --sso-user administrator@vsphere.local --vc-root-pw 'Windows1@#' --esx-root-pw 'Windows1@#' --sso-password 'Windows1@#'
=== standalone_91.py - VCF 9.1 ESXi + vCenter license patch (no Ops) ===
[*] phase : post-reboot
[*] vCenter : 172.20.118.16
[*] ESXi : 172.20.118.15
=== PHASE post-reboot: esxi-apply -> verify ===
=== Waiting for ESXi 172.20.118.15 to come back online (deadline 600s) ===
[OK] ESXi 172.20.118.15 responded to SSH after 0s
[*] + /usr/bin/python3 /home/ubuntu/Desktop/scripts/patch_all.py --stage esxi-apply --vc-host 172.20.118.16 --esx-host 172.20.118.15 --root-pw 'Windows1@#' --vc-version 9.1.0 --jdk /home/ubuntu/jdk --asm-dir /home/ubuntu
=== Stage 4b: apply ESXi entitlement (run AFTER reboot) ===
[*] checking live libentitlement.so md5 on host…
[*] $ bash -lc sshpass -p 'Windows1@#' ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@172.20.118.15 "md5sum /lib64/libentitlement.so | awk '{print $1}'"
[!] live libentitlement.so md5 = c36239c336eb91e3dcd7b10b452121aa /lib64/libentitlement.so
[!] expected one of (3-patch md5s): ['f64add1a4a200337350ff20026e459dd', 'c36239c336eb91e3dcd7b10b452121aa']
[!] Host is NOT running the patched libentitlement.so yet.
[!] This is normal on fresh ESXi installs -- BootBankInstaller rebuilds
[!] sb.v00 from the VIB cache during first boot, reverting the boot-image patch.
[!] Run --stage esxi (which deploys the tardisk overlay licpatch.v00
[!] and reboots) BEFORE --stage esxi-apply. Continuing best-effort.
[*] proceeding with apply_esx_license.py (may warn but not fail)...
[*] $ python3 /home/ubuntu/Desktop/scripts/apply_esx_license.py --host 172.20.118.15 --password Windows1@#
[1/5] Connecting to 172.20.118.15
/usr/lib/python3/dist-packages/paramiko/client.py:837: UserWarning: Unknown ecdsa-sha2-nistp256 host key for 172.20.118.15: b'61a72625b3772d7c4c71a88c70ae8f25'
warnings.warn(
[1.5/5] Verifying /lib64/libentitlement.so is patched (read-only check)
live md5: c36239c336eb91e3dcd7b10b452121aa
[OK] live binary is fully patched
[2/5] Discovering hardware UUID and Host ID
hardware UUID : 39b94d56-f218-9eda-d827-b7d9025e2d76
host scope ID : 50f95631-3ad7-c7a0-988b-b80e1a3974cb
[3/5] Generating ESXi-mode JWT via gen_license.py
JWT generated: /tmp/tmpobs55mq1.jwt (20,602 bytes)
[4/5] Deploying JWT to host /tmp/lic_esx.jwt
[5/5] Applying entitlement via esxcli
esxcli output: 52ffba34-ff61-2eee-422d-fb718dc5e5c7
[OK] entitlement add succeeded
[Persistence] Setting up boot-time license persistence
/lib64/libentitlement.so -> /scratch/vcflicense/libentitlement_patched.so
/tmp/lic_esx.jwt -> /scratch/vcflicense/lic_esx.jwt
persistence local.sh -> /etc/rc.local.d/local.sh
/sbin/backup.sh 0 -> state.tgz updated
[OK] Persistence configured. On every boot:
1. /lib64/libentitlement.so <- /scratch/vcflicense/ (VMFS)
2. JWT re-applied via esxcli licensing entitlement add
3. hostd restarted if entitlement not active after step 2
--- Final entitlement list ---
ID Entitlement ID Entitlement Type Name Asset Type
------------------------------------ ------------------------------------ ---------------- ------------------------------ ----------
evaluation 3dec4c99-e9b9-4b88-b991-591c9cb2a51f Evaluation Evaluation ESXI
52ffba34-ff61-2eee-422d-fb718dc5e5c7 f8a9aef7-3296-5f93-8a29-f81280f7a6f1 Subscription VMware Cloud Foundation (ESXi) ESXI
[OK] VCF ESXi Subscription entitlement is active.
Done.
[OK] ESXi entitlement applied
[OK] patch_all.py finished
[*] + /usr/bin/python3 /home/ubuntu/Desktop/scripts/patch_all.py --stage verify --vc-host 172.20.118.16 --esx-host 172.20.118.15 --root-pw 'Windows1@#' --vc-version 9.1.0 --jdk /home/ubuntu/jdk --asm-dir /home/ubuntu --ops-host -
=== Stage 5: end-to-end verification ===
[!] ops-host not provided (standalone mode); skipping vROps verification
[*] vCenter (172.20.118.16) — vmware-cis-license + license.log
[*] $ python3 /home/ubuntu/Desktop/vc_ssh.py service-control --status vmware-cis-license ; tail -40 /var/log/vmware/cis-license/license.log
[vc_ssh] running on 172.20.118.16: service-control --status vmware-cis-license ; tail -40 /var/log/vmware/cis-licen...
service-control --status vmware-cis-license ; tail -40 /var/log/vmware/cis-license/license.log
Running:
vmware-cis-license
2026-08-27T06:05:28.676Z INFO CISLicense 55 [vc@4413 threadName="pool-3-thread-1" logger="ph.sharedcfg.server.impl.ConsentConfigurationServiceImpl" opId="8683de2c-7460-44cd-891f-b6639a788da1"] Call to 'ConsentConfigurationService.get' return value is '(phonehome.data.ConsentConfigurationData) {
dynamicType = null,
dynamicProperty = null,
consentConfigurations = (phonehome.data.ConsentConfiguration) [
(phonehome.data.ConsentConfiguration) {
dynamicType = null,
dynamicProperty = null,
consentAccepted = false,
consentId = 2,
owner = null
},
(phonehome.data.ConsentConfiguration) {
dynamicType = null,
dynamicProperty = null,
consentAccepted = false,
consentId = 1,
owner = null
}
],
version = 2
}'
2026-08-27T06:05:30.880Z INFO CISLicense 22 [vc@4413 threadName="Timer-1" logger="server.common.service.impl.TimerTaskImpl"] Common Services Reachability Checking task running one cycle at: 2026-08-27T06:05:30+00:00 with timestamp: 2026-08-27T06:05:30+00:00
2026-08-27T06:05:30.889Z INFO CISLicense 22 [vc@4413 threadName="Timer-1" logger="server.common.lookup.impl.LookupClientPoolableObjectFactoryImpl"] Existing Lookup Service connection valid: true
2026-08-27T06:05:30.918Z INFO CISLicense 22 [vc@4413 threadName="Timer-1" logger="server.common.service.impl.TimerTaskImpl"] Common Services Reachability Checking task performed one cycle at: 2026-08-27T06:05:30+00:00. Cycle successful: true
2026-08-27T06:05:32.992Z INFO CISLicense 57 [vc@4413 threadName="remaining-time-task-executor-1" logger="cis.license.entitlement.management.ExpirationDataManager"] Decrement remaining time.
2026-08-27T06:05:33.009Z INFO CISLicense 57 [vc@4413 threadName="remaining-time-task-executor-1" logger="cis.license.entitlement.management.ExpirationDataManager"] There is expiration data to update.
2026-08-27T06:05:33.009Z INFO CISLicense 57 [vc@4413 threadName="remaining-time-task-executor-1" logger="cis.license.entitlement.management.ExpirationDataManager"] Updating expiration data on schedule.
2026-08-27T06:06:30.887Z INFO CISLicense 23 [vc@4413 threadName="Timer-2" logger="server.common.service.impl.TimerTaskImpl"] Health Status Update running one cycle at: 2026-08-27T06:06:30+00:00 with timestamp: 2026-08-27T06:06:30+00:00
2026-08-27T06:06:30.893Z INFO CISLicense 23 [vc@4413 threadName="Timer-2" logger="server.common.service.impl.TimerTaskImpl"] Health Status Update performed one cycle at: 2026-08-27T06:06:30+00:00. Cycle successful: true
2026-08-27T06:08:30.887Z INFO CISLicense 23 [vc@4413 threadName="Timer-2" logger="server.common.service.impl.TimerTaskImpl"] Health Status Update running one cycle at: 2026-08-27T06:08:30+00:00 with timestamp: 2026-08-27T06:08:30+00:00
2026-08-27T06:08:30.897Z INFO CISLicense 23 [vc@4413 threadName="Timer-2" logger="server.common.service.impl.TimerTaskImpl"] Health Status Update performed one cycle at: 2026-08-27T06:08:30+00:00. Cycle successful: true
2026-08-27T06:10:30.888Z INFO CISLicense 23 [vc@4413 threadName="Timer-2" logger="server.common.service.impl.TimerTaskImpl"] Health Status Update running one cycle at: 2026-08-27T06:10:30+00:00 with timestamp: 2026-08-27T06:10:30+00:00
2026-08-27T06:10:30.883Z INFO CISLicense 22 [vc@4413 threadName="Timer-1" logger="server.common.service.impl.TimerTaskImpl"] Common Services Reachability Checking task running one cycle at: 2026-08-27T06:10:30+00:00 with timestamp: 2026-08-27T06:10:30+00:00
2026-08-27T06:10:30.933Z INFO CISLicense 22 [vc@4413 threadName="Timer-1" logger="server.common.lookup.impl.LookupClientPoolableObjectFactoryImpl"] Existing Lookup Service connection valid: true
2026-08-27T06:10:30.945Z INFO CISLicense 23 [vc@4413 threadName="Timer-2" logger="server.common.service.impl.TimerTaskImpl"] Health Status Update performed one cycle at: 2026-08-27T06:10:30+00:00. Cycle successful: true
2026-08-27T06:10:30.991Z INFO CISLicense 22 [vc@4413 threadName="Timer-1" logger="server.common.service.impl.TimerTaskImpl"] Common Services Reachability Checking task performed one cycle at: 2026-08-27T06:10:30+00:00. Cycle successful: true
2026-08-27T06:10:32.985Z INFO CISLicense 57 [vc@4413 threadName="remaining-time-task-executor-1" logger="cis.license.entitlement.management.ExpirationDataManager"] Decrement remaining time.
2026-08-27T06:10:33.010Z INFO CISLicense 57 [vc@4413 threadName="remaining-time-task-executor-1" logger="cis.license.entitlement.management.ExpirationDataManager"] There is expiration data to update.
2026-08-27T06:10:33.014Z INFO CISLicense 57 [vc@4413 threadName="remaining-time-task-executor-1" logger="cis.license.entitlement.management.ExpirationDataManager"] Updating expiration data on schedule.
2026-08-27T06:11:18.162Z INFO CISLicense 40 [vc@4413 threadName="http-nio-0.0.0.0-12080-exec-10" logger="server.common.provider.impl.EnvoyEndpointsProviderImpl"] Retrieved endpoint: http://localhost:1080/sso-adminserver/system-sdk
root@localhost [ ~ ]# echo ---DONE---
---DONE---
root@localhost [ ~ ]# [*] ESXi (172.20.118.15) — entitlement list + hostd chain-error tail
[*] $ bash -lc sshpass -p 'Windows1@#' ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@172.20.118.15 "esxcli licensing entitlement list 2>&1 | head -20 ; echo --- ; grep 'Invalid certificate chain' /var/log/hostd.log | tail -3"
Warning: Permanently added '172.20.118.15' (ECDSA) to the list of known hosts.
ID Entitlement ID Entitlement Type Name Asset Type
------------------------------------ ------------------------------------ ---------------- ------------------------------ ----------
evaluation 3dec4c99-e9b9-4b88-b991-591c9cb2a51f Evaluation Evaluation ESXI
52ffba34-ff61-2eee-422d-fb718dc5e5c7 f8a9aef7-3296-5f93-8a29-f81280f7a6f1 Subscription VMware Cloud Foundation (ESXi) ESXI
---
[OK] Verification snapshot complete. Manual UI steps:
1. (standalone) vCenter UI: https://172.20.118.16/ui/ → Administration → Licensing.
Upload: /home/ubuntu/Desktop/sample_license.jwt
2. After upload completes, go to Entitlements / vCenters page,
select the entitlement(s), assign to vCenter Server (172.20.118.16).
3. Watch:
ssh root@- 'tail -F /usr/lib/vmware-vcops/user/log/vcf-licensing-plugin.log'
ssh root@172.20.118.16 'tail -F /var/log/vmware/cis-license/license.log'
Look for status=SUCCESS / no JwsSecurityException.
4. (standalone) ESXi host (172.20.118.15) does NOT auto-license off the
vCenter assignment. After adding the host to vCenter inventory
(UI or POST /api/vcenter/host), run:
python3 scripts/assign_vc_override.py \
--host 172.20.118.16 --license /home/ubuntu/Desktop/sample_license.jwt \
--sso-password '<sso_pw>'
This binds the VCF BASE override entitlement to the host's
asset URN. Without it, the host stays on the 60-day Eval clock.
[OK] patch_all.py finished
=== Binding override entitlement to ESXi host(s) in vC inventory ===
[!] no --license-file supplied; skipping host override assignment
[OK] standalone_91.py --phase post-reboot finished
如果环境中只有ESXi 没有VCSA的话则参照如下步骤执行,IP地址和账户信息替换实际的。
python3 -u scripts/patch_all.py --stage esxi --vc-host dummy --esx-host 172.20.118.15 --root-pw 'Windows1@#' --vc-version 9.1.0 && sshpass -p 'Windows1@#' ssh -o StrictHostKeyChecking=no root@172.20.118.15 reboot 服务器重启完成后再执行 python3 -u scripts/patch_all.py --stage esxi-apply --vc-host dummy --esx-host 172.20.118.15 --root-pw 'Windows1@#' --vc-version 9.1.0
看下最终激活情况。



3
我发现及时记录是个不错的习惯。好多操作就是因为不熟练又没记录,然后过后需要的时候又要继续找答案。
哈哈 是的呢
技术日志,写的很简洁,又很详尽。