]> git.proxmox.com Git - qemu-server.git/commitdiff
don't try to hotplug|unplug ide && sata drive
authorAlexandre Derumier <aderumier@odiso.com>
Fri, 2 Jan 2015 14:16:00 +0000 (15:16 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 7 Jan 2015 07:36:02 +0000 (08:36 +0100)
We can't hotplug theses devices,
so we can avoid to throw always an error when adding them

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/QemuServer.pm

index 0c70c18e498d5bece1ae82284022b24eaeb2c637..38eca4b6088e304bcc3a5457c52042ab1b6ff48e 100644 (file)
@@ -3656,7 +3656,7 @@ sub vmconfig_hotplug_pending {
                die "skip\n" if !$hotplug;
                vm_deviceunplug($vmid, $conf, $opt);
            } elsif (valid_drivename($opt)) {
-               die "skip\n" if !$hotplug;
+               die "skip\n" if !$hotplug || $opt =~ m/(ide|sata)(\d+)/;
                vm_deviceunplug($vmid, $conf, $opt);
                vmconfig_register_unused_drive($storecfg, $vmid, $conf, parse_drive($opt, $conf->{$opt}));
            } else {
@@ -3903,7 +3903,7 @@ sub vmconfig_update_disk {
        }
 
     } else { 
-       die "skip\n" if !$conf->{hotplug};
+       die "skip\n" if !$conf->{hotplug} || $opt =~ m/(ide|sata)(\d+)/;   
        # hotplug new disks
        vm_deviceplug($storecfg, $conf, $vmid, $opt, $drive);
     }