]> git.proxmox.com Git - qemu-server.git/commit
fix clone_disk with formats other than raw/qcow2
authorMira Limbeck <m.limbeck@proxmox.com>
Thu, 16 May 2019 13:08:50 +0000 (15:08 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 16 May 2019 14:27:07 +0000 (16:27 +0200)
commite1afab6e28a65e462acff3711ba52690e93e2ae6
tree8e5f114a42f4cae8fa20b19c3cfa070ca5c3855d
parent5cda6c69e395439628759b6ad70f8a8292665ba5
fix clone_disk with formats other than raw/qcow2

with commit 64d1a6a it's now possible to specify a format other than raw
or qcow2 when creating VMs. This can lead to an error when cloning the
VMs and a cloudinit disk with a different format is attached (e.g.
vmdk).

We use QEMU_FORMAT_RE in drive_is_cloudinit and according to the
QEMU_FORMAT_RE we support 7 different formats.

With this change we add any format other than 'raw' as '.<format>' to the
name and no longer die on any other format. Cloudinit disks with invalid
format are not cloned as the drive is recognized as cdrom, not cloudinit.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
PVE/QemuServer.pm