]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/QemuServer.pm
reenable steal time
[qemu-server.git] / PVE / QemuServer.pm
index a109ea90f09c574219b3803eba5c0f6b0eb5fa0b..81f05843efdbbf681bb4be474d445bb5bc92269f 100644 (file)
@@ -558,7 +558,7 @@ my $serialdesc = {
        description =>  <<EODESCR,
 Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).
 
-Note: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.
+Note: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.
 
 Experimental: user reported problems with this option.
 EODESCR
@@ -2158,6 +2158,8 @@ sub check_local_resources {
 
     foreach my $k (keys %$conf) {
        next if $k =~ m/^usb/ && ($conf->{$k} eq 'spice');
+       # sockets are safe: they will recreated be on the target side post-migrate
+       next if $k =~ m/^serial/ && ($conf->{$k} eq 'socket');
        $loc_res = 1 if $k =~ m/^(usb|hostpci|serial|parallel)\d+$/;
     }
 
@@ -2654,6 +2656,9 @@ sub config_to_command {
     push @$cmd, '--scope';
     push @$cmd, '--slice', "qemu";
     push @$cmd, '--unit', $vmid;
+    # set KillMode=none, so that systemd don't kill those scopes
+    # at shutdown (pve-manager service should stop the VMs instead)
+    push @$cmd, '-p', "KillMode=none";
     push @$cmd, '-p', "CPUShares=$cpuunits";
     if ($conf->{cpulimit}) {
        my $cpulimit = int($conf->{cpulimit} * 100);
@@ -2917,7 +2922,6 @@ sub config_to_command {
 
        push @$cpuFlags , '+kvm_pv_unhalt' if !$nokvm;
        push @$cpuFlags , '+kvm_pv_eoi' if !$nokvm;
-        push @$cpuFlags , '-kvm_steal_time' if !$nokvm;
     }
 
     push @$cpuFlags, 'enforce' if $cpu ne 'host' && !$nokvm;
@@ -6155,6 +6159,9 @@ sub qemu_img_convert {
     my ($dst_storeid, $dst_volname) = PVE::Storage::parse_volume_id($dst_volid, 1);
 
     if ($src_storeid && $dst_storeid) {
+
+       PVE::Storage::activate_volumes($storecfg, [$src_volid], $snapname);
+
        my $src_scfg = PVE::Storage::storage_config($storecfg, $src_storeid);
        my $dst_scfg = PVE::Storage::storage_config($storecfg, $dst_storeid);
 
@@ -6507,6 +6514,7 @@ sub complete_storage {
     my $res = [];
     foreach my $sid (keys %$ids) {
        next if !PVE::Storage::storage_check_enabled($cfg, $sid, undef, 1);
+       next if !$ids->{$sid}->{content}->{images};
        push @$res, $sid;
     }