Bug 798909 - Cloned kvm virtual machine's mac address starts with '00:16:3e' like Xen.
Summary: Cloned kvm virtual machine's mac address starts with '00:16:3e' like Xen.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst
Version: 6.3
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Cole Robinson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-01 09:06 UTC by Geyang Kong
Modified: 2013-08-05 03:43 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 12:35:39 UTC
Target Upstream Version:


Attachments (Terms of Use)
This is what I got from terminal with --debug option (5.17 KB, text/plain)
2012-03-01 09:08 UTC, Geyang Kong
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0784 0 normal SHIPPED_LIVE python-virtinst bug fix update 2012-06-19 20:34:49 UTC

Description Geyang Kong 2012-03-01 09:06:18 UTC
Version-Release number of selected component (if applicable):

python-virtinst-0.600-7.el6.noarch

How reproducible:
100%

Steps to Reproduce:

1. Make sure there is a kvm guest with NIC, its mac address should be start with '52:54:00'.

2. Clone the guest using "virt-clone -o demo -n newdemo --mac=RANDOM -f /var/lib/libvirt/images/newdemo.img --debug"

3. Waiting for clone task finished.

4. Check the cloned guest's mac address

Actual results:

1. Cloned guest's mac address starts with '00:16:3e' like Xen.

Expected results:

1. Cloned guest's mac address starts with '52:54:00'.

Additional info:

1. Don't do this through virt-manager, if you do that, everything will be OK.

2. Since there is nothing in libvirtd.log, so I didn't attach it.

Comment 1 Geyang Kong 2012-03-01 09:08:58 UTC
Created attachment 566783 [details]
This is what I got from terminal with --debug option

Comment 2 Alex Jia 2012-03-01 09:39:57 UTC
Hi Cole,

The python-virtinst only judges 'xen' and 'qemu' domain type, and 'xen' is a default domain type. If a guest is 'kvm' domain type,  python-virtinst thinks it's invalid/KeyError then set default 'xen' type:

# virtinst/util.py:

def randomMAC(type="xen"):
<snip>
    ouis = { 'xen': [ 0x00, 0x16, 0x3E ], 'qemu': [ 0x52, 0x54, 0x00 ] }

    try:
        oui = ouis[type]
    except KeyError:
        oui = ouis['xen']

</snip>

Regards,
Alex

Comment 3 Alex Jia 2012-03-01 10:44:47 UTC
Patch for upstream:
https://www.redhat.com/archives/virt-tools-list/2012-March/msg00001.html

Comment 4 Cole Robinson 2012-03-02 16:09:17 UTC
Thanks for the patch, but there was already a fix for this upstream:

http://git.fedorahosted.org/git?p=python-virtinst.git;a=commit;h=8060feeb26be4cd0ab36feca88e8a92db54b09e2

Comment 5 Alex Jia 2012-03-03 13:41:46 UTC
(In reply to comment #4)
> Thanks for the patch, but there was already a fix for this upstream:
> 
> http://git.fedorahosted.org/git?p=python-virtinst.git;a=commit;h=8060feeb26be4cd0ab36feca88e8a92db54b09e2

Hello Cole, Welcome. Hmm, we haven't backported the patch to RHEL.

Comment 6 Cole Robinson 2012-04-02 22:38:24 UTC
Fixed in python-virtinst-0.600.0-8.el6

Comment 8 Geyang Kong 2012-04-05 07:22:53 UTC
Verified pass with the packages:

python-virtinst-0.600.0-8.el6
virt-manager-0.9.0-11.el6

Test steps:

Same as the description.

Test results:

1. The cloned kvm domain now has mac address starts with '52:54:00'.

And change this bug to VERIFIED

Comment 10 errata-xmlrpc 2012-06-20 12:35:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0784.html


Note You need to log in before you can comment on or make changes to this bug.