]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/QemuConfig.pm
suspend: continue cleanup even if savevm-end QMP command fails
[qemu-server.git] / PVE / QemuConfig.pm
index d49d88230a8e2329d5a62374c508d153310b0a3f..8e8a7828e10e7f0ce2f57318e25d506755f46b89 100644 (file)
@@ -406,9 +406,8 @@ sub __snapshot_delete_vol_snapshot {
     return if PVE::QemuServer::drive_is_cdrom($drive);
     my $storecfg = PVE::Storage::config();
     my $volid = $drive->{file};
-    my $device = "drive-$ds";
 
-    PVE::QemuServer::qemu_volume_snapshot_delete($vmid, $device, $storecfg, $volid, $snapname);
+    PVE::QemuServer::qemu_volume_snapshot_delete($vmid, $storecfg, $volid, $snapname);
 
     push @$unused, $volid;
 }
@@ -433,7 +432,8 @@ sub __snapshot_rollback_hook {
        } else {
            # Note: old code did not store 'machine', so we try to be smart
            # and guess the snapshot was generated with kvm 1.4 (pc-i440fx-1.4).
-           $data->{forcemachine} = $conf->{machine} || 'pc-i440fx-1.4';
+           my $machine_conf = PVE::QemuServer::Machine::parse_machine($conf->{machine});
+           $data->{forcemachine} = $machine_conf->{type} || 'pc-i440fx-1.4';
 
            # we remove the 'machine' configuration if not explicitly specified
            # in the original config.