From e8a7e9b44cf378e2c6e6ce210a78c9c65c284088 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Tue, 19 Feb 2013 12:02:50 +0100 Subject: [PATCH] fix tablet hotplug Signed-off-by: Alexandre Derumier --- PVE/API2/Qemu.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index daada76..ee02467 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -656,9 +656,11 @@ my $vmconfig_delete_option = sub { $unplugwarning = "
verify that your guest support acpi hotplug"; } - die "error hot-unplug $opt $unplugwarning" if !PVE::QemuServer::vm_deviceunplug($vmid, $conf, $opt); - - PVE::QemuServer::vm_deviceplug(undef, $conf, $vmid, $opt) if $opt eq 'tablet'; + if($opt eq 'tablet'){ + PVE::QemuServer::vm_deviceplug(undef, $conf, $vmid, $opt); + }else{ + die "error hot-unplug $opt $unplugwarning" if !PVE::QemuServer::vm_deviceunplug($vmid, $conf, $opt); + } if ($isDisk) { my $drive = PVE::QemuServer::parse_drive($opt, $conf->{$opt}); -- 2.39.2