[pve-devel] [PATCH qemu-server 0/2] cleanup and fix vm restore with cloudinit

Mira Limbeck m.limbeck at proxmox.com
Mon May 13 14:01:52 CEST 2019


the first patch is a simple cleanup as we're introducing a third spot
where the cloudinit disk size is required in the 2nd patch. we now define one
variable that's used in all 3 spots. this means the 2nd patch requires
the first one to be applied.

the second patch is the actual fix for restoring vms with cloudinit
disks as those did not change the vmid to the new one.
implements some suggestions by @Dominik and @Thomas made on the previous
patch that was part of a different patch series. this means we're using
already defined subs instead of custom regexes whenever possible
(parse_drive + drive_is_cloudinit).
and the one regex still in use now matches on any line starting with 'ide',
'sata' or 'scsi' and takes whatever comes after it to pass to 'parse_drive'
instead of a custom regex that matches on vm-\d+-cloudinit directly.

Mira Limbeck (2):
  introduce one global cloudinit disk size variable
  map cloudinit disk to new vmid on restore

 PVE/API2/Qemu.pm            |  4 ++--
 PVE/QemuServer.pm           | 29 ++++++++++++++++++++++++++---
 PVE/QemuServer/Cloudinit.pm |  8 +++++---
 3 files changed, 33 insertions(+), 8 deletions(-)

-- 
2.11.0





More information about the pve-devel mailing list