[dts] [PATCH V1]framework/qemu_kvm: fix add multiple e1000 nic can't connect vm

Xiao Qimai qimaix.xiao at intel.com
Wed Jan 15 10:48:00 CET 2020


fix can't connect vm when add more than one e1000 devices to vm

Signed-off-by: Xiao Qimai <qimaix.xiao at intel.com>
---
 framework/qemu_kvm.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py
index 849a4a7..7076d35 100644
--- a/framework/qemu_kvm.py
+++ b/framework/qemu_kvm.py
@@ -620,7 +620,8 @@ class QEMUKvm(VirtBase):
         # init the redirect incoming TCP or UDP connections
         # just combine host address and host port, it is enough
         # for using ssh to connect with VM
-        self.hostfwd_addr = host_addr + separator + host_port
+        if not hasattr(self, 'hostfwd_addr'):
+            self.hostfwd_addr = host_addr + separator + host_port
 
         return hostfwd_line
 
-- 
2.17.1



More information about the dts mailing list