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

Thomas Lamprecht t.lamprecht at proxmox.com
Fri May 17 12:12:36 CEST 2019


On 5/16/19 2:06 PM, Mira Limbeck wrote:
> 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
> constant 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.
> 
> v2:
>   first patch: now introduces a constant instead of a variable
>   second patch: cleanups as @Thomas suggested
> 
> the size in the second patch is required for vdisk_alloc. without that
> function we don't get the correct volid to use for cloudinit. if we
> specify a size of 0 or anything else, there will be 'file exists' (we
> use a file size check with 0 == file does not exist and try to create it
> in commit_cloudinit_disk) or other errors when starting the VM as the size
> does not match.
> 
> other solutions like find_free_diskname and get_next_vm_diskname would
> require additional logic to make it work with vm-$vmid-cloudinit as
> name.
> 
> v3:
>   ',' instead of ';', did not realize in diff that it was the old (not
>   working) one I sent
> 
> Mira Limbeck (2):
>   introduce one global CLOUDINIT_DISK_SIZE constant
>   map cloudinit disk to new vmid on restore
> 
>  PVE/API2/Qemu.pm            |  4 ++--
>  PVE/QemuServer.pm           | 30 +++++++++++++++++++++++++++---
>  PVE/QemuServer/Cloudinit.pm |  2 ++
>  3 files changed, 31 insertions(+), 5 deletions(-)
> 

applied, with some followups...




More information about the pve-devel mailing list