From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yolkfull Chow Subject: Re: [Autotest] [PATCH] Assign an UUID for each VM in kvm command line Date: Thu, 16 Jul 2009 10:42:31 +0800 Message-ID: <4A5E9397.4050100@redhat.com> References: <1247649149-28353-1-git-send-email-yzhou@redhat.com> <4A5DDB66.9080400@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, autotest@test.kernel.org, jasowang@redhat.com To: dlaor@redhat.com Return-path: Received: from mx2.redhat.com ([66.187.237.31]:52354 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757161AbZGPCmb (ORCPT ); Wed, 15 Jul 2009 22:42:31 -0400 In-Reply-To: <4A5DDB66.9080400@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/15/2009 09:36 PM, Dor Laor wrote: > On 07/15/2009 12:12 PM, Yolkfull Chow wrote: >> Would submit this patch which is from our internal kvm-autotest >> patches submitted by Jason. >> So that we could go on test case about parameters verification(UUID, >> DMI data etc). >> >> Signed-off-by: Yolkfull Chow >> --- >> client/tests/kvm/kvm_vm.py | 4 ++++ >> 1 files changed, 4 insertions(+), 0 deletions(-) >> >> diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py >> index 503f636..68cc235 100644 >> --- a/client/tests/kvm/kvm_vm.py >> +++ b/client/tests/kvm/kvm_vm.py >> @@ -287,6 +287,10 @@ class VM: >> elif params.get("display") == "nographic": >> qemu_cmd += " -nographic" >> >> + uuid = os.popen("cat >> /proc/sys/kernel/random/uuid").readline().strip() >> + if uuid: >> + qemu_cmd += " -uuid %s" % uuid > > If you'll change the uuid on every run, the guest will notice that. > Some guest (M$) might not love it. > Why not use a static uuid or even just test uuid in a specific test > without having it in all tests? Hi Dor, since we cannot use a static uuid for running stress_boot test, but just assign UUID in a specific test is a good idea. We could use an option like assign_uuid = yes for that specific test? > > btw: why you're at it, please add uuid to the block devices too. > + the -smbios option. Do you mean assign serial number for block devices? Thanks for suggestions. :) > > Thanks, > dor > >> + >> return qemu_cmd >> >> > -- Yolkfull Regards,