vCert.py execution fails with SyntaxError
search cancel

vCert.py execution fails with SyntaxError

book

Article ID: 418736

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Executing vCert.py to renew the certificate fails with the following error:

root@vcsa [ /vCert-6.1.0-20250910 ]# ./vCert.py
Traceback (most recent call last):
File "./vCert.py", line 20, in
from lib.menu import Menu, MenuInput
File "/vCert-6.1.0-20250910/lib/menu.py", line 17, in
from lib.vmdir import get_identity_sources
File "/vCert-6.1.0-20250910/lib/vmdir.py", line 554
args = [DIR_CLI, 'service', 'update', '--name', f"{soluser}-{machine_id}", '--cert',
^
SyntaxError: invalid syntax

Environment

VMware vCenter Server 

Cause

This error occurs because the Python version is older rather than 3.6 and does not support f-strings.
vCenter.py cannot be run on vCenter Server appliance 6.7 or earlier.

Resolution

vCert.py is supported on vCenter Server 7.0 or later, and is not supported on vCenter Server 6.7 or earlier.
You can execute vCert.py on vCenter Server 7.0 or later.

 

 

Additional Information

"vCert.py is a menu-driven tool that provides management capability for most certificate-related operations on vCenter versions 7.0 to 9.0." 
* vCert - Scripted vCenter Expired Certificate Replacement

vCert.py が SyntaxError を伴って実行失敗する