1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 09:26:03 +00:00

feat(vmbackups): back up a shut-off VM's TPM state

A VM with the panel's emulated TPM 2.0 is backed up when it is shut off:
each state file of libvirt's swtpm directory for the VM, read through a
transient pool on it, becomes a small file of the backup (role tpm),
written and read back like the NVRAM file. A running or paused VM with a
TPM is refused, and so is a TPM with its own settings (encryption, a
state path, another backend). The manifest says whether the TPM state was
copied or never written.
This commit is contained in:
catborise 2026-11-17 13:47:40 +03:00
parent a145c07601
commit 52b6096efe
11 changed files with 371 additions and 166 deletions

View file

@ -0,0 +1,18 @@
# Generated by Django 5.2.18 on 2026-11-17 10:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('vmbackups', '0002_schedules'),
]
operations = [
migrations.AlterField(
model_name='backupfile',
name='role',
field=models.CharField(choices=[('disk', 'disk'), ('nvram', 'nvram'), ('tpm', 'tpm'), ('domain', 'domain'), ('manifest', 'manifest')], max_length=16),
),
]