test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] framework/qemu_kvm: rm ssh keygen before connect to vm
@ 2019-08-21  0:02 lihong
  2019-08-21  7:28 ` Zhang, YanX A
  2019-09-20  6:18 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: lihong @ 2019-08-21  0:02 UTC (permalink / raw)
  To: dts; +Cc: lihong

when different vm use same tcp port to start qemu, it will connect failed.
so delete the keygen info before connect it.

Signed-off-by: lihong <lihongx.ma@intel.com>
---
 framework/qemu_kvm.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py
index c425f41..bbed32d 100644
--- a/framework/qemu_kvm.py
+++ b/framework/qemu_kvm.py
@@ -1443,6 +1443,9 @@ class QEMUKvm(VirtBase):
             if getattr(self, 'net_nic_pci', None) is None:
                 self.__get_vmnet_pci()
             if self.control_command("network") == "Success":
+                pos = self.hostfwd_addr.find(':')
+                ssh_key = '[' + self.hostfwd_addr[:pos] + ']' + self.hostfwd_addr[pos:]
+                os.system('ssh-keygen -R %s' % ssh_key)
                 network_ready = True
                 break
 
-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-20  6:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-21  0:02 [dts] [PATCH V1] framework/qemu_kvm: rm ssh keygen before connect to vm lihong
2019-08-21  7:28 ` Zhang, YanX A
2019-09-20  6:18 ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).