1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-01 04:38:12 +00:00

Prevent TPM to run on Windows

This commit is contained in:
grossmj 2023-01-04 12:57:48 +08:00
parent ae200d9add
commit 297ada529c

View File

@ -2027,6 +2027,8 @@ class QemuVM(BaseNode):
Start swtpm (TPM emulator) Start swtpm (TPM emulator)
""" """
if sys.platform.startswith("win"):
raise QemuError("swtpm (TPM emulator) is not supported on Windows")
tpm_dir = os.path.join(self.working_dir, "tpm") tpm_dir = os.path.join(self.working_dir, "tpm")
os.makedirs(tpm_dir, exist_ok=True) os.makedirs(tpm_dir, exist_ok=True)
tpm_sock = os.path.join(self.temporary_directory, "swtpm.sock") tpm_sock = os.path.join(self.temporary_directory, "swtpm.sock")