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

fix(instances): a VM with a saved state says so and can start without it

A VM with a managed save image showed as plain Off; Power On restored the
saved memory and the panel had no way to boot it fresh or drop the saved
state. The power tab now says the VM has a saved state and offers Start
Without Saved State (confirmed), which boots it with
VIR_DOMAIN_START_FORCE_BOOT and so discards the image. Owners get it as
they get Power On; the audit row names it.
This commit is contained in:
catborise 2026-11-11 14:27:00 +03:00
parent 1957a5a85a
commit dba2c2b1c2
11 changed files with 308 additions and 225 deletions

View file

@ -84,6 +84,13 @@ class DestroyOptionsSerializer(serializers.Serializer):
delete_nvram = serializers.BooleanField(default=False)
class PowerOnSerializer(serializers.Serializer):
"""Power On's options, from the page's form or an API body: fresh boots
a VM with a saved state anew and discards the saved state."""
fresh = serializers.BooleanField(default=False)
class DestroySerializer(DestroyOptionsSerializer):
"""The API's delete: a job, which a new submission key per request names."""