From patchwork Thu Jul 16 10:26:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yolkfull Chow X-Patchwork-Id: 35842 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6GAQsQj032574 for ; Thu, 16 Jul 2009 10:26:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754939AbZGPK0w (ORCPT ); Thu, 16 Jul 2009 06:26:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754719AbZGPK0w (ORCPT ); Thu, 16 Jul 2009 06:26:52 -0400 Received: from mx2.redhat.com ([66.187.237.31]:57992 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752644AbZGPK0v (ORCPT ); Thu, 16 Jul 2009 06:26:51 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6GAQjbv002022; Thu, 16 Jul 2009 06:26:45 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6GAQia7015397; Thu, 16 Jul 2009 06:26:44 -0400 Received: from localhost.localdomain (dhcp-66-70-57.nay.redhat.com [10.66.70.57]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6GAQf5I027445; Thu, 16 Jul 2009 06:26:42 -0400 From: Yolkfull Chow To: kvm@vger.kernel.org Cc: autotest@test.kernel.org, Yolkfull Chow Subject: [PATCH] Specify the system UUID for VM Date: Thu, 16 Jul 2009 18:26:46 +0800 Message-Id: <1247740006-27416-1-git-send-email-yzhou@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Signed-off-by: Yolkfull Chow --- client/tests/kvm/kvm_vm.py | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 503f636..895049e 100644 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -113,6 +113,13 @@ class VM: self.qemu_path = qemu_path self.image_dir = image_dir self.iso_dir = iso_dir + + if params.get("uuid"): + if params.get("uuid") == "random": + uuid = os.popen("cat /proc/sys/kernel/random/uuid").readline() + self.uuid = uuid.strip() + else: + self.uuid = params.get("uuid") # Find available monitor filename @@ -374,6 +381,10 @@ class VM: # Make qemu command qemu_command = self.make_qemu_command() + # Specify the system UUID + if self.uuid: + qemu_command += " -uuid %s" % self.uuid + # Is this VM supposed to accept incoming migrations? if for_migration: # Find available migration port