public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH-SERIES guest-common/manager/qemu-server/container 00/12] backup/restore: improve missing drive and owned CD-ROM handling
@ 2025-03-04 10:44 Fiona Ebner
  2025-03-04 10:44 ` [pve-devel] [PATCH guest-common 01/12] abstract config: make get_backup_volumes() method more flexible Fiona Ebner
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Fiona Ebner @ 2025-03-04 10:44 UTC (permalink / raw)
  To: pve-devel

Missing drive handling during restore:

Currently, the configuration line for a drive that is marked for
backup (i.e. 'backup' flag not explicitly set to 0), but missing from
the restore map will be added verbatim to the restored configuration.

As reported in the community forum [0], this can cause issues with a
VM with a configured EFI disk, but not using OVMF BIOS. In such a
case, the EFI disk is not backed up, see the get_backup_volumes()
helper in QemuConfig.pm.

Writing out references to non-existent volumes to the restored config
will lead to issues starting the VM. Write such references as comments
instead, like is already done for volumes explicitly excluded from
backup. But add a warning since this is not expected, and info for the
EFI disk case.


Owned CD-ROM handling:

Currently, all volumes with a 'media=cdrom' marker are excluded from
backup. For owned volumes, this is very surprising. Treat owned CD-ROM
volumes like other volumes and consider the 'backup' marker instead.

Cloud-init volumes are owned, but still skipped, because they are
generated from the configuration/snippets.

Add a reminder to start removing owned CD-ROMs with PVE 9 when
destroying a VM.


The first 5 qemu-server patches are improvements that make sense even
if we don't go for the rest. The get_backup_volumes() patches belong
together and are a prerequisite for qemu-server patch "backup: include
owned CD-ROM volumes".

No hard dependency bumps, but optionally pve-manager ->
pve-guest-common -> qemu-server,pve-container for the
get_backup_volumes() signature change and to make the change from
"backup: include owned CD-ROM volumes" take effect.


guest-common:

Fiona Ebner (1):
  abstract config: make get_backup_volumes() method more flexible

 src/PVE/AbstractConfig.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


manager:

Fiona Ebner (1):
  api: backup: adapt to new get_backup_volumes() signature

 PVE/API2/Backup.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


qemu-server:

Fiona Ebner (9):
  cloudinit: avoid undefined value warning when no searchdomain is
    defined
  drive: move vm_is_volid_owner() and try_deallocate_drive() helpers to
    Drive module
  test: restore config: use diff to make failure human-readable
  test: restore config: add config with missing disks
  test: restore config: test behavior for disks with absolute paths
  backup restore: improve missing drive handling
  backup: adapt to new get_backup_volumes() signature
  backup: include owned CD-ROM volumes
  destroy vm: add reminder to also remove owned CD-ROMs starting with
    PVE 9

 PVE/API2/Qemu.pm                      |  8 +++-
 PVE/QemuConfig.pm                     | 12 +++++-
 PVE/QemuServer.pm                     | 55 ++++++++-------------------
 PVE/QemuServer/Cloudinit.pm           |  2 +-
 PVE/QemuServer/Drive.pm               | 38 ++++++++++++++++++
 PVE/VZDump/QemuServer.pm              |  2 +-
 test/restore-config-expected/110.conf | 16 ++++++++
 test/restore-config-expected/140.conf | 17 +++++++++
 test/restore-config-input/110.conf    | 18 +++++++++
 test/restore-config-input/140.conf    | 18 +++++++++
 test/run_qemu_restore_config_tests.pl | 13 +++++--
 11 files changed, 149 insertions(+), 50 deletions(-)
 create mode 100644 test/restore-config-expected/110.conf
 create mode 100644 test/restore-config-expected/140.conf
 create mode 100644 test/restore-config-input/110.conf
 create mode 100644 test/restore-config-input/140.conf


container:

Fiona Ebner (1):
  backup: adapt to new get_backup_volumes() signature

 src/PVE/LXC/Config.pm | 2 +-
 src/PVE/VZDump/LXC.pm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Summary over all repositories:
  15 files changed, 154 insertions(+), 55 deletions(-)

-- 
Generated by git-murpp 0.5.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-03-04 10:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-04 10:44 [pve-devel] [PATCH-SERIES guest-common/manager/qemu-server/container 00/12] backup/restore: improve missing drive and owned CD-ROM handling Fiona Ebner
2025-03-04 10:44 ` [pve-devel] [PATCH guest-common 01/12] abstract config: make get_backup_volumes() method more flexible Fiona Ebner
2025-03-04 10:44 ` [pve-devel] [PATCH manager 02/12] api: backup: adapt to new get_backup_volumes() signature Fiona Ebner
2025-03-04 10:44 ` [pve-devel] [PATCH qemu-server 03/12] cloudinit: avoid undefined value warning when no searchdomain is defined Fiona Ebner
2025-03-04 10:44 ` [pve-devel] [PATCH qemu-server 04/12] drive: move vm_is_volid_owner() and try_deallocate_drive() helpers to Drive module Fiona Ebner
2025-03-04 10:44 ` [pve-devel] [PATCH qemu-server 05/12] test: restore config: use diff to make failure human-readable Fiona Ebner
2025-03-04 10:44 ` [pve-devel] [PATCH qemu-server 06/12] test: restore config: add config with missing disks Fiona Ebner
2025-03-04 10:44 ` [pve-devel] [PATCH qemu-server 07/12] test: restore config: test behavior for disks with absolute paths Fiona Ebner
2025-03-04 10:44 ` [pve-devel] [PATCH qemu-server 08/12] backup restore: improve missing drive handling Fiona Ebner
2025-03-04 10:44 ` [pve-devel] [PATCH qemu-server 09/12] backup: adapt to new get_backup_volumes() signature Fiona Ebner
2025-03-04 10:44 ` [pve-devel] [PATCH qemu-server 10/12] backup: include owned CD-ROM volumes Fiona Ebner
2025-03-04 10:44 ` [pve-devel] [PATCH qemu-server 11/12] destroy vm: add reminder to also remove owned CD-ROMs starting with PVE 9 Fiona Ebner
2025-03-04 10:44 ` [pve-devel] [PATCH container 12/12] backup: adapt to new get_backup_volumes() signature Fiona Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal