kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Specify the system UUID for VM
@ 2009-07-16 10:26 Yolkfull Chow
  2009-07-16 11:54 ` Yolkfull Chow
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Yolkfull Chow @ 2009-07-16 10:26 UTC (permalink / raw)
  To: kvm; +Cc: autotest, Yolkfull Chow


Signed-off-by: Yolkfull Chow <yzhou@redhat.com>
---
 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
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] Specify the system UUID for VM
  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-29 12:18 ` [PATCH] Specify the system UUID for VM Avi Kivity
  2 siblings, 0 replies; 12+ messages in thread
From: Yolkfull Chow @ 2009-07-16 11:54 UTC (permalink / raw)
  To: kvm; +Cc: autotest

On Thu, Jul 16, 2009 at 06:26:46PM +0800, Yolkfull Chow wrote:
> 
> Signed-off-by: Yolkfull Chow <yzhou@redhat.com>
> ---
>  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")

Sorry, forgot to initialize self.uuid.  Will resend the patch. 

>  
>  
>          # 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
> -- 
> 1.6.2.5
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] Add UUID option into kvm command line
  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 ` Yolkfull Chow
  2009-07-20 12:43   ` Lucas Meneghel Rodrigues
  2009-07-29 12:18 ` [PATCH] Specify the system UUID for VM Avi Kivity
  2 siblings, 1 reply; 12+ messages in thread
From: Yolkfull Chow @ 2009-07-17 15:17 UTC (permalink / raw)
  To: kvm; +Cc: autotest, Yolkfull Chow


Signed-off-by: Yolkfull Chow <yzhou@redhat.com>
---
 client/tests/kvm/kvm_vm.py |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

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)
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] Add UUID option into kvm command line
  2009-07-17 15:17 ` [PATCH] Add UUID option into kvm command line Yolkfull Chow
@ 2009-07-20 12:43   ` Lucas Meneghel Rodrigues
  0 siblings, 0 replies; 12+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-07-20 12:43 UTC (permalink / raw)
  To: Yolkfull Chow; +Cc: kvm, autotest

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)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Specify the system UUID for VM
  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-29 12:18 ` Avi Kivity
  2009-07-29 12:36   ` Lucas Meneghel Rodrigues
  2009-07-29 13:06   ` Yolkfull Chow
  2 siblings, 2 replies; 12+ messages in thread
From: Avi Kivity @ 2009-07-29 12:18 UTC (permalink / raw)
  To: Yolkfull Chow; +Cc: kvm, autotest

On 07/16/2009 01:26 PM, Yolkfull Chow wrote:
> Signed-off-by: Yolkfull Chow<yzhou@redhat.com>
> ---
>   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()

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Specify the system UUID for VM
  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 13:06   ` Yolkfull Chow
  1 sibling, 2 replies; 12+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-07-29 12:36 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Yolkfull Chow, kvm, autotest

On Wed, Jul 29, 2009 at 9:18 AM, Avi Kivity<avi@redhat.com> wrote:
> On 07/16/2009 01:26 PM, Yolkfull Chow wrote:
>>
>> Signed-off-by: Yolkfull Chow<yzhou@redhat.com>
>> ---
>>  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()

Oooops... I didn't notice this little issue. Will make a quick patch
to change it, thanks Avi!

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Specify the system UUID for VM
  2009-07-29 12:36   ` Lucas Meneghel Rodrigues
@ 2009-07-29 12:46     ` Lucas Meneghel Rodrigues
  2009-07-29 12:46     ` [Autotest] " Michael Goldish
  1 sibling, 0 replies; 12+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-07-29 12:46 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Yolkfull Chow, kvm, autotest

On Wed, Jul 29, 2009 at 9:36 AM, Lucas Meneghel Rodrigues<lmr@redhat.com> wrote:
> On Wed, Jul 29, 2009 at 9:18 AM, Avi Kivity<avi@redhat.com> wrote:
>> On 07/16/2009 01:26 PM, Yolkfull Chow wrote:
>>>
>>> Signed-off-by: Yolkfull Chow<yzhou@redhat.com>
>>> ---
>>>  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()
>
> Oooops... I didn't notice this little issue. Will make a quick patch
> to change it, thanks Avi!

Hmm, turns out we've had sorted this out during the review process of
this particular patch. The version that got in reads the file directly
:)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Autotest] [PATCH] Specify the system UUID for VM
  2009-07-29 12:36   ` Lucas Meneghel Rodrigues
  2009-07-29 12:46     ` Lucas Meneghel Rodrigues
@ 2009-07-29 12:46     ` Michael Goldish
  2009-07-29 12:48       ` Lucas Meneghel Rodrigues
  2009-07-29 13:03       ` Avi Kivity
  1 sibling, 2 replies; 12+ messages in thread
From: Michael Goldish @ 2009-07-29 12:46 UTC (permalink / raw)
  To: Lucas Meneghel Rodrigues; +Cc: autotest, kvm, Avi Kivity


----- "Lucas Meneghel Rodrigues" <lmr@redhat.com> wrote:

> On Wed, Jul 29, 2009 at 9:18 AM, Avi Kivity<avi@redhat.com> wrote:
> > On 07/16/2009 01:26 PM, Yolkfull Chow wrote:
> >>
> >> Signed-off-by: Yolkfull Chow<yzhou@redhat.com>
> >> ---
> >>  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()
> 
> Oooops... I didn't notice this little issue. Will make a quick patch
> to change it, thanks Avi!

I think I already commented on this and Yolkfull posted a new patch,
and that patch is the one that got applied.  That's what I see in my
local tree anyway.

> _______________________________________________
> Autotest mailing list
> Autotest@test.kernel.org
> http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Autotest] [PATCH] Specify the system UUID for VM
  2009-07-29 12:46     ` [Autotest] " Michael Goldish
@ 2009-07-29 12:48       ` Lucas Meneghel Rodrigues
  2009-07-29 13:03       ` Avi Kivity
  1 sibling, 0 replies; 12+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-07-29 12:48 UTC (permalink / raw)
  To: Michael Goldish; +Cc: autotest, Avi Kivity, kvm

On Wed, Jul 29, 2009 at 9:46 AM, Michael Goldish<mgoldish@redhat.com> wrote:
>
> ----- "Lucas Meneghel Rodrigues" <lmr@redhat.com> wrote:
>
>> On Wed, Jul 29, 2009 at 9:18 AM, Avi Kivity<avi@redhat.com> wrote:
>> > On 07/16/2009 01:26 PM, Yolkfull Chow wrote:
>> >>
>> >> Signed-off-by: Yolkfull Chow<yzhou@redhat.com>
>> >> ---
>> >>  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()
>>
>> Oooops... I didn't notice this little issue. Will make a quick patch
>> to change it, thanks Avi!
>
> I think I already commented on this and Yolkfull posted a new patch,
> and that patch is the one that got applied.  That's what I see in my
> local tree anyway.

Yep, I over-reacted :)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Autotest] [PATCH] Specify the system UUID for VM
  2009-07-29 12:46     ` [Autotest] " Michael Goldish
  2009-07-29 12:48       ` Lucas Meneghel Rodrigues
@ 2009-07-29 13:03       ` Avi Kivity
  1 sibling, 0 replies; 12+ messages in thread
From: Avi Kivity @ 2009-07-29 13:03 UTC (permalink / raw)
  To: Michael Goldish; +Cc: Lucas Meneghel Rodrigues, autotest, kvm

On 07/29/2009 03:46 PM, Michael Goldish wrote:
> I think I already commented on this and Yolkfull posted a new patch,
> and that patch is the one that got applied.  That's what I see in my
> local tree anyway.
>    

Yeah, I have a long backlog (and don't read all autotest patches 
anyway).  Sorry about the noise.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Specify the system UUID for VM
  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 13:06   ` Yolkfull Chow
  2009-07-29 13:25     ` Yolkfull Chow
  1 sibling, 1 reply; 12+ messages in thread
From: Yolkfull Chow @ 2009-07-29 13:06 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm, autotest

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<yzhou@redhat.com>
>> ---
>>   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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Specify the system UUID for VM
  2009-07-29 13:06   ` Yolkfull Chow
@ 2009-07-29 13:25     ` Yolkfull Chow
  0 siblings, 0 replies; 12+ messages in thread
From: Yolkfull Chow @ 2009-07-29 13:25 UTC (permalink / raw)
  To: yzhou; +Cc: kvm, autotest

On Wed, Jul 29, 2009 at 09:06:25PM +0800, Yolkfull Chow wrote:
> 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<yzhou@redhat.com>
> >> ---
> >>   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. :-)

Seems the answer emerges. ;-)

> 
> >
> > -- 
> > 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
> --
> 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-07-29 13:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).