1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 08:56:07 +00:00
webvirtcloud/vrtManager
catborise 823d34cc18 feat(vmbackups): restore a backup as a new VM
A ready backup has a Restore button (Backups page and the VM's tab) and
POST /api/v1/backups/<uuid>/restore/. The form takes the new VM's name
(default <vm>-restored), a compute that has the target's pool, the pool
for its disks, Connect the network (off by default: the restored guest
keeps the VM's addresses and host name) and Start after restore. The job
page follows the restore.

The backup.restore job holds what a new VM's job holds, the backup
(shared) and the target. Before anything is made it checks again: the
host is not in maintenance; the name is free in the panel and on the
host (a VM made with virsh too); the backup's files are in the target,
the disks at their size and the small files with their SHA-256; the
host offers the definition's emulator, machine type and firmware, its
networks, bridges and network filters; the destination pool has room
and none of the copies' names. The new VM's UUID, MACs, volume names and
NVRAM path are recorded first. Then the disks are copied from the
target, the NVRAM file uploaded, maintenance checked once more, and the
VM defined last and given to the superuser who restored it.

The definition is the kept one rewritten as a clone's (rewrite_for_new_vm,
taken out of _clone_definition for both): new name, UUID and SMBIOS
UUID, MACs and filter parameters, a VNC password, no cloud-init seed of
the VM's; with a new generation ID, each disk's source the restored file
without the old chain, the NVRAM path, and links down unless connected.

Recovery records a VM defined by the recorded UUID; otherwise it removes
the copies and the NVRAM file by their recorded names.
2026-11-17 09:14:09 +03:00
..
tests feat(vmbackups): restore a backup as a new VM 2026-11-17 09:14:09 +03:00
__init__.py Initial commit 2015-02-27 10:53:51 +02:00
backup.py feat(vmbackups): restore a backup as a new VM 2026-11-17 09:14:09 +03:00
connection.py feat(vmbackups): what a VM's backup holds and the target files 2026-11-17 08:40:06 +03:00
create.py refactor(vrtManager): a shut-off VM clone copies its disks with clone_volume 2026-11-14 19:43:11 +03:00
hostdetails.py fix(computes): a VM that cannot be read leaves a host's capacity unknown 2026-11-13 16:38:42 +03:00
instance.py feat(vmbackups): restore a backup as a new VM 2026-11-17 09:14:09 +03:00
interface.py fix(interfaces): the interface the panel reaches its host by is kept 2026-11-12 16:17:33 +03:00
libvirt-ssh fix(vrtManager): libvirt connections open within a time limit 2026-10-05 09:06:52 +03:00
network.py fix(networks): the XML editor does not overwrite a change made meanwhile 2026-11-12 13:30:09 +03:00
nodedevs.py fix(instances): USB device changes as PCI ones; device refusals name no VM to owners 2026-11-11 22:58:40 +03:00
nwfilters.py fix(instances): a VM is not migrated to a host whose filters of its names differ 2026-11-13 11:46:01 +03:00
storage.py feat(storages): a volume downloads from its pool page 2026-11-15 00:31:42 +03:00
util.py fix(networks): the XML editor does not overwrite a change made meanwhile 2026-11-12 13:30:09 +03:00
virtsecrets.py fix(virtsecrets): a secret in use is not deleted by its UUID in capitals 2026-11-12 16:17:21 +03:00