From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6C2EEA046B for ; Wed, 21 Aug 2019 09:25:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1D5A31BEE8; Wed, 21 Aug 2019 09:25:23 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 954F41BEE6 for ; Wed, 21 Aug 2019 09:25:21 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Aug 2019 00:25:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,411,1559545200"; d="scan'208";a="353857415" Received: from dpdk-lihong-ub1604.sh.intel.com ([10.67.119.68]) by orsmga005.jf.intel.com with ESMTP; 21 Aug 2019 00:25:18 -0700 From: lihong To: dts@dpdk.org Cc: lihong Date: Wed, 21 Aug 2019 08:02:04 +0800 Message-Id: <1566345724-514-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1] framework/qemu_kvm: rm ssh keygen before connect to vm X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" 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 --- 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