[pve-devel] [RFC qemu-server] api: create disks: avoid adding secondary cloud-init drives

Mira Limbeck m.limbeck at proxmox.com
Mon Jul 4 10:57:56 CEST 2022

On 5/16/22 13:04, DERUMIER, Alexandre wrote:
> Le vendredi 06 mai 2022 à 12:11 +0200, Fabian Ebner a écrit :
>> This will break possibly existing workflows like
>> 1. add second cloud-init
>> 2. remove first cloud-init
>> to change the cloud-init storage.
> Also, currently, in the gui, we can't add 2 cloud-init drives
> currently.
> But we could add an "move disk" like feature.
> generate current cloudinit config on a new drive and swap isos online.
> (If iso is mounted in the guest os, it's not a problem, as it's
> readonly, and the mountpoint content is updated too)
`Move Disk` while the VM is running, should not recreate the disk from 
config as this could lead to a changed cloud-init disk.

Offline should be fine, but online `Move Disk` must re-use the current 
cloud-init disk.

We had the same issue in the live migration case. We now offline migrate 
the cloud-init disk and pass an argument during start on the target node 
to skip generating the cloud-init disk as a workaround.

Live migration the same way all other disks are migrated doesn't work 
here because the cloud-init disk is readonly mounted in QEMU.

More information about the pve-devel mailing list