mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 04:36:48 +00:00
feat(instances): a VM's TPM 2.0 is switched on and off on its Options tab
A VM made without a TPM, a Windows 10 to be upgraded to Windows 11, had no way to get one but the XML editor. The Options tab has a TPM 2.0 switch, as the RNG one: it adds an emulated TPM of the host's model to the definition for the next start, or removes it. Its state stays on the host until the VM is undefined, so a TPM added again has it back. A TPM the switch did not make (passthrough, 1.2, encrypted, with its own state path) is left to the XML editor, and a host without swtpm says so.
This commit is contained in:
parent
2a05576e18
commit
e35342bff1
10 changed files with 288 additions and 130 deletions
|
|
@ -289,6 +289,10 @@ class Instance(models.Model):
|
|||
def config_rng(self) -> str | None:
|
||||
return self.proxy.get_rng()
|
||||
|
||||
@cached_property
|
||||
def config_tpm(self) -> str | None:
|
||||
return self.proxy.get_tpm()
|
||||
|
||||
@cached_property
|
||||
def config_on_crash(self) -> str:
|
||||
return self.proxy.get_on_crash()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue