mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-03 16:47:51 +00:00
hotplug/unplug devices by default
This commit is contained in:
parent
9a8d6b6665
commit
6c52b6794e
@ -166,8 +166,8 @@ my $confdesc = {
|
|||||||
hotplug => {
|
hotplug => {
|
||||||
optional => 1,
|
optional => 1,
|
||||||
type => 'boolean',
|
type => 'boolean',
|
||||||
description => "Activate hotplug for disk and network device",
|
description => "Allow hotplug for disk and network device",
|
||||||
default => 0,
|
default => 1,
|
||||||
},
|
},
|
||||||
reboot => {
|
reboot => {
|
||||||
optional => 1,
|
optional => 1,
|
||||||
@ -2519,7 +2519,7 @@ sub vm_deviceplug {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1 if !$conf->{hotplug};
|
return 1 if defined($conf->{hotplug}) && !$conf->{hotplug};
|
||||||
|
|
||||||
my $devices_list = vm_devices_list($vmid);
|
my $devices_list = vm_devices_list($vmid);
|
||||||
return 1 if defined($devices_list->{$deviceid});
|
return 1 if defined($devices_list->{$deviceid});
|
||||||
@ -2586,7 +2586,7 @@ sub vm_deviceunplug {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1 if!$conf->{hotplug};
|
return 1 if defined($conf->{hotplug}) && !$conf->{hotplug};
|
||||||
|
|
||||||
my $devices_list = vm_devices_list($vmid);
|
my $devices_list = vm_devices_list($vmid);
|
||||||
return 1 if !defined($devices_list->{$deviceid});
|
return 1 if !defined($devices_list->{$deviceid});
|
||||||
|
Loading…
Reference in New Issue
Block a user