mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-02 18:59:41 +00:00
hotplug/unplug devices by default
This commit is contained in:
parent
9a8d6b6665
commit
6c52b6794e
@ -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});
|
||||
|
Loading…
Reference in New Issue
Block a user