mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-02 17:06:09 +00:00
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. |
||
|---|---|---|
| .. | ||
| tr/LC_MESSAGES | ||
| zh/LC_MESSAGES | ||