hotplug/unplug devices by default

This commit is contained in:
Dietmar Maurer 2013-02-19 10:43:22 +01:00
parent 9a8d6b6665
commit 6c52b6794e

View File

@ -166,8 +166,8 @@ my $confdesc = {
hotplug => {
optional => 1,
type => 'boolean',
description => "Activate hotplug for disk and network device",
default => 0,
description => "Allow hotplug for disk and network device",
default => 1,
},
reboot => {
optional => 1,
@ -2519,7 +2519,7 @@ sub vm_deviceplug {
return 1;
}
return 1 if !$conf->{hotplug};
return 1 if defined($conf->{hotplug}) && !$conf->{hotplug};
my $devices_list = vm_devices_list($vmid);
return 1 if defined($devices_list->{$deviceid});
@ -2586,7 +2586,7 @@ sub vm_deviceunplug {
return 1;
}
return 1 if!$conf->{hotplug};
return 1 if defined($conf->{hotplug}) && !$conf->{hotplug};
my $devices_list = vm_devices_list($vmid);
return 1 if !defined($devices_list->{$deviceid});