[virt-tools-list] [PATCH virtinst v2] support 'kvm' domain type

Alex Jia ajia at redhat.com
Sat Mar 3 13:39:03 UTC 2012


----- Original Message -----
From: "Cole Robinson" <crobinso at redhat.com>
To: "Alex Jia" <ajia at redhat.com>
Cc: virt-tools-list at redhat.com
Sent: Saturday, March 3, 2012 12:07:09 AM
Subject: Re: [virt-tools-list] [PATCH virtinst v2] support 'kvm' domain type

On 03/01/2012 09:52 PM, Alex Jia wrote:
> The v2 is the same to v1, however, it's committed based on latest git repo.
> 
> The v1 hasn't been committed based on latest git repo due to network issue,
> so it will exist conflict when applying it. 
> 
> If domain type is 'kvm', the randomMAC() will think it's a invalid key then
> set default 'xen' type mac address. It's a real error for cloning a kvm guest,
> the guest mac address will be changed to 'xen' type address.
> 
> RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=798909
> 
> * virtinst/util.py (randomMAC): add 'kvm' domain type.
> 
> Signed-off-by: Alex Jia <ajia at redhat.com>
> ---
>  virtinst/util.py |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/virtinst/util.py b/virtinst/util.py
> index 2977e08..cf0074b 100644
> --- a/virtinst/util.py
> +++ b/virtinst/util.py
> @@ -204,7 +204,8 @@ def randomMAC(type="xen", conn=None):
>          # Testing hack
>          return "00:11:22:33:44:55"
>  
> -    ouis = { 'xen': [ 0x00, 0x16, 0x3E ], 'qemu': [ 0x52, 0x54, 0x00 ] }
> +    ouis = dict.fromkeys(['qemu', 'kvm'], [ 0x52, 0x54, 0x00 ])
> +    ouis.update(dict.fromkeys(['xen'], [ 0x00, 0x16, 0x3E ]))
>  
>      try:
>          oui = ouis[type]

Hmm, I think this is already fixed upstream? See virtinst commit
060feeb26be4cd0ab36feca88e8a92db54b09e2

Hi Cole,
It should be commit 8060fee, so we need to backport the patch to RHEL.

Thanks,
Alex


Basically only the libvirt connection type should be sent to that function, so
it was a bug that we were sending 'kvm' at all.

- Cole




More information about the virt-tools-list mailing list