Go to file
Mira Limbeck c4ab3c5584 map cloudinit disk to new vmid on restore
Resolves the issue of restoring a VM that has a cloudinit drive
configured to a new VMID. The VMID of the disk name gets now remapped
correctly and in the process the cloudinit disk is created with the same size
as in PVE/API2/Qemu.pm create_disks and in PVE/QemuServer/Cloudinit
commit_cloudinit_disk as the same constant is used.

This is done by matching any line starting with either 'ide', 'sata' or
'scsi' and then check if it is a cloudinit drive. As cloudinit drives
are attached as cdrom, only those 3 are possible. For the cloudinit
check we use 'parse_drive' followed by 'drive_is_cloudinit' so no custom
regex is necessary.

'--targetstorage' is also taken into account on restore now for
cloudinit disks. If a target storage is specified the format is either
kept if possible, or changed to the default of that storage.

This should fix #1807 completely. The restore error was already resolved
with commit 7e8ab2a, but the vmid of the disk might not have matched the new
one.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
2019-05-16 16:29:02 +02:00
debian d/control: add ${misc:Depends} to Depends list 2019-05-13 16:06:56 +00:00
PVE map cloudinit disk to new vmid on restore 2019-05-16 16:29:02 +02:00
test config2command test: mock kernel_has_vhost_net 2018-12-20 10:44:15 +01:00
.gitignore d/cointrol is not autogenerated anymore, remove from .gitignore 2019-01-31 12:10:51 +01:00
bootsplash.jpg add seabios bootsplash and use it 2016-09-08 12:22:01 +02:00
bootsplash.xcf add seabios bootsplash and use it 2016-09-08 12:22:01 +02:00
Makefile bump version to 5.0-51 2019-04-30 14:08:27 +00:00
modules-load.conf remove unnecessary init.d, postint, postrm and qmupdate scripts 2015-02-27 16:09:41 +01:00
pcitest.pl use warnings instead of global -w flag 2013-10-01 13:14:49 +02:00
pve-bridge fix #909: pass rate to tap_plug() 2016-03-08 15:52:31 +01:00
pve-bridge-hotplug pve-bridge-hotplug code deduplication 2015-11-14 10:34:22 +01:00
pve-bridgedown add pve-bridgedown script 2014-05-08 08:37:04 +02:00
pve-q35.cfg Add pci.3 to pve-q35.cfg required by virtio-scsi-single 2018-05-02 09:14:22 +02:00
pve-usb.cfg imported from svn 'qemu-server/pve2' 2011-08-23 07:47:04 +02:00
qm convert qmrestore into a PVE::CLI class 2015-10-05 13:10:24 +02:00
qmeventd.c qmeventd: fixup program name in license 2018-11-19 14:40:21 +01:00
qmeventd.h add qmeventd 2018-11-14 15:29:59 +01:00
qmeventd.service add qmeventd 2018-11-14 15:29:59 +01:00
qmextract remove legacy sparsecp 2017-08-23 10:03:37 +02:00
qmrestore convert qmrestore into a PVE::CLI class 2015-10-05 13:10:24 +02:00