[pve-devel] [PATCH 18/19] cloudinit: parse_volume_id can fail (eg	on 'none')
    Alexandre Derumier 
    aderumier at odiso.com
       
    Tue May 23 08:57:16 CEST 2017
    
    
  
From: Wolfgang Bumiller <w.bumiller at proxmox.com>
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index c3f1327..a6adef2 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -6636,7 +6636,7 @@ sub generate_cloudinitconfig {
 
 	my ($storeid, $volname) = PVE::Storage::parse_volume_id($drive->{file}, 1);
 
-	return if $volname !~ m/vm-$vmid-cloudinit/;
+	return if !$volname || $volname !~ m/vm-$vmid-cloudinit/;
 
 	my $path = "/tmp/cloudinit/$vmid";
 
-- 
2.11.0
    
    
More information about the pve-devel
mailing list