[pve-devel] [PATCH qemu-server 1/2] create_disks: fix uninitialized warning

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Jun 2 10:46:26 CEST 2020


Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 PVE/API2/Qemu.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index fd51bf3..5e6fd42 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1095,7 +1095,7 @@ my $update_vm_api  = sub {
 	return if PVE::QemuServer::drive_is_cdrom($drive);
 
 	my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
-	return if $volname eq 'cloudinit';
+	return if defined($volname) && $volname eq 'cloudinit';
 
 	my $format;
 	if ($volid =~ $NEW_DISK_RE) {
-- 
2.20.1





More information about the pve-devel mailing list