]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/QemuServer/Cloudinit.pm
schema: fix description of migrate_downtime parameter
[qemu-server.git] / PVE / QemuServer / Cloudinit.pm
index cd5cc242db64e3bfa23fdf379b413b47077bd8dd..abc6b1421b38c67f3de46ea075d5f8ac2fe599ef 100644 (file)
@@ -148,7 +148,7 @@ sub cloudinit_userdata {
        $content .= "  - default\n";
     }
 
-    $content .= "package_upgrade: true\n" if $conf->{ciupgrade};
+    $content .= "package_upgrade: true\n" if !defined($conf->{ciupgrade}) || $conf->{ciupgrade};
 
     return $content;
 }
@@ -550,8 +550,11 @@ sub get_custom_cloudinit_files {
 sub read_cloudinit_snippets_file {
     my ($storage_conf, $volid) = @_;
 
-    my ($full_path, undef, $type) = PVE::Storage::path($storage_conf, $volid);
-    die "$volid is not in the snippets directory\n" if $type ne 'snippets';
+    my ($vtype, undef) = PVE::Storage::parse_volname($storage_conf, $volid);
+
+    die "$volid is not in the snippets directory\n" if $vtype ne 'snippets';
+
+    my $full_path = PVE::Storage::abs_filesystem_path($storage_conf, $volid, 1);
     return PVE::Tools::file_get_contents($full_path, 1 * 1024 * 1024);
 }