don't try to hotplug|unplug ide && sata drive

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>
This commit is contained in:
Alexandre Derumier 2015-01-02 15:16:00 +01:00 committed by Dietmar Maurer
parent 6d89b548e1
commit 6f9a607037

View 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);
}