[pve-devel] [PATCH 4/6] vmconfig_hotplug_pending : add tablet hotplug

Alexandre Derumier aderumier at odiso.com
Mon Nov 17 16:43:39 CET 2014


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 27e6957..2542059 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3538,8 +3538,16 @@ sub vmconfig_hotplug_pending {
 
     #hotplug
     foreach my $opt (keys %{$conf->{pending}}) {
+
 	if ($opt =~ m/^net(\d+)$/) { 
 	    vmconfig_update_net($storecfg, $conf, $vmid, $opt);
+	}elsif ($opt eq 'tablet'){
+
+	    if($conf->{pending}->{$opt} == 1){
+		PVE::QemuServer::vm_deviceplug(undef, $conf, $vmid, $opt, $conf->{pending}->{$opt});
+	    } elsif($conf->{pending}->{$opt} == 0){
+		PVE::QemuServer::vm_deviceunplug($vmid, $conf, $opt);
+	    }
 	}
     }
 
-- 
1.7.10.4




More information about the pve-devel mailing list