From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yolkfull Chow Subject: Re: [PATCH] Specify the system UUID for VM Date: Wed, 29 Jul 2009 21:06:25 +0800 Message-ID: <20090729130624.GA3088@aFu.nay.redhat.com> References: <1247740006-27416-1-git-send-email-yzhou@redhat.com> <4A703E2B.3070703@redhat.com> Reply-To: Yolkfull Chow Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, autotest@test.kernel.org To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:60438 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755305AbZG2NGR (ORCPT ); Wed, 29 Jul 2009 09:06:17 -0400 Content-Disposition: inline In-Reply-To: <4A703E2B.3070703@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Jul 29, 2009 at 03:18:51PM +0300, Avi Kivity wrote: > On 07/16/2009 01:26 PM, Yolkfull Chow wrote: >> 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() >> > > instead of os.popen("cat ..."), you can open the file directly: > > uuid = file('/proc/.../uuid').readline() Yes, Lucas also suggested this method as well. Since the patch has been applied, need I submit a little patch for this? Thanks for suggestion. :-) > > -- > error compiling committee.c: too many arguments to function > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html