1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-04-22 18:39:00 +00:00

Prettify TPM error message

This commit is contained in:
grossmj 2025-04-18 15:25:50 +07:00
parent f6546bf1de
commit 684770a220
No known key found for this signature in database
GPG Key ID: 1E7DD6DBB53FF3D7

View File

@ -1200,7 +1200,7 @@ class QemuVM(BaseNode):
if "TPM result for CMD_INIT" in qemu_stdout:
partition = self._find_partition_for_path(self.project.path)
if partition and partition.mountpoint != "/":
qemu_stdout += "\n\nTPM error: the project directory is not on the same partition as the root directory which can be a problem when using AppArmor." \
qemu_stdout += "\nTPM error: the project directory is not on the same partition as the root directory which can be a problem when using AppArmor.\n" \
"Please try to execute the following commands on the server:\n\n" \
"echo 'owner {}/** rwk,' | sudo tee /etc/apparmor.d/local/usr.bin.swtpm > /dev/null\n" \
"sudo service apparmor restart".format(os.path.dirname(self.project.path))