From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: Yolkfull Chow <yzhou@redhat.com>
Cc: kvm@vger.kernel.org, autotest@test.kernel.org
Subject: Re: [PATCH] Add UUID option into kvm command line
Date: Mon, 20 Jul 2009 09:43:49 -0300 [thread overview]
Message-ID: <1248093829.5318.10.camel@localhost.localdomain> (raw)
In-Reply-To: <1247843861-3976-1-git-send-email-yzhou@redhat.com>
On Fri, 2009-07-17 at 23:17 +0800, Yolkfull Chow wrote:
> Signed-off-by: Yolkfull Chow <yzhou@redhat.com>
> ---
> client/tests/kvm/kvm_vm.py | 24 ++++++++++++++++++++++++
> 1 files changed, 24 insertions(+), 0 deletions(-)
Ok, I've followed the discussion around this patch, thanks Yolkfull and
Michael. Applied.
> diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
> index 503f636..48f2916 100644
> --- a/client/tests/kvm/kvm_vm.py
> +++ b/client/tests/kvm/kvm_vm.py
> @@ -107,6 +107,7 @@ class VM:
> @param iso_dir: The directory where ISOs reside
> """
> self.pid = None
> + self.uuid = None
>
> self.name = name
> self.params = params
> @@ -287,6 +288,11 @@ class VM:
> elif params.get("display") == "nographic":
> qemu_cmd += " -nographic"
>
> + if params.get("uuid") == "random":
> + qemu_cmd += " -uuid %s" % self.uuid
> + elif params.get("uuid"):
> + qemu_cmd += " -uuid %s" % params.get("uuid")
> +
> return qemu_cmd
>
>
> @@ -371,6 +377,12 @@ class VM:
> if params.get("display") == "vnc":
> self.vnc_port = kvm_utils.find_free_port(5900, 6000)
>
> + # Find random UUID if specified 'uuid = random' in config file
> + if params.get("uuid") == "random":
> + f = open("/proc/sys/kernel/random/uuid")
> + self.uuid = f.read().strip()
> + f.close()
> +
> # Make qemu command
> qemu_command = self.make_qemu_command()
>
> @@ -732,3 +744,15 @@ class VM:
> self.send_key("shift-%s" % char.lower())
> else:
> self.send_key(char)
> +
> +
> + def get_uuid(self):
> + """
> + Catch UUID of the VM.
> +
> + @return: None,if not specified in config file
> + """
> + if self.params.get("uuid") == "random":
> + return self.uuid
> + else:
> + return self.params.get("uuid", None)
next prev parent reply other threads:[~2009-07-20 12:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-16 10:26 [PATCH] Specify the system UUID for VM Yolkfull Chow
2009-07-16 11:54 ` Yolkfull Chow
2009-07-17 15:17 ` [PATCH] Add UUID option into kvm command line Yolkfull Chow
2009-07-20 12:43 ` Lucas Meneghel Rodrigues [this message]
2009-07-29 12:18 ` [PATCH] Specify the system UUID for VM Avi Kivity
2009-07-29 12:36 ` Lucas Meneghel Rodrigues
2009-07-29 12:46 ` Lucas Meneghel Rodrigues
2009-07-29 12:46 ` [Autotest] " Michael Goldish
2009-07-29 12:48 ` Lucas Meneghel Rodrigues
2009-07-29 13:03 ` Avi Kivity
2009-07-29 13:06 ` Yolkfull Chow
2009-07-29 13:25 ` Yolkfull Chow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1248093829.5318.10.camel@localhost.localdomain \
--to=lmr@redhat.com \
--cc=autotest@test.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=yzhou@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox