[virt-tools-list] [PATCH] tpm: allow hotplug operation so error is reported by libvirt

Stefan Berger stefanb at linux.vnet.ibm.com
Tue Jun 12 12:52:20 UTC 2018


Perform a hotplug operation so that we get the error notification
about unsupported TPM hotplug operation and we can alert the user
that the change will only take effect upon domain shutdown.

Signed-off-by: Stefan Berger <stefanb at linux.vnet.ibm.com>
---
 virtManager/domain.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/virtManager/domain.py b/virtManager/domain.py
index 3eb860ec..8688f282 100644
--- a/virtManager/domain.py
+++ b/virtManager/domain.py
@@ -991,7 +991,10 @@ class vmmDomain(vmmLibvirtObject):
         if model != _SENTINEL:
             editdev.model = model
 
-        self._redefine_xmlobj(xmlobj)
+        if do_hotplug:
+            self.hotplug(device=editdev)
+        else:
+            self._redefine_xmlobj(xmlobj)
 
 
     ####################
-- 
2.14.4




More information about the virt-tools-list mailing list