RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 656214 - domxml-to-native always set rtl8139 and all zeros mac for networking
Summary: domxml-to-native always set rtl8139 and all zeros mac for networking
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 884767 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-23 09:03 UTC by Mark Wu
Modified: 2018-11-14 16:52 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-26 12:04:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mark Wu 2010-11-23 09:03:51 UTC
Description of problem:
domxml-to-native always use the model rtl8139 and zeroed mac address for networking in the exported qemu command line. I think network model and mac address should be exported the same as the configuration of original virtual machine.

Version-Release number of selected component (if applicable):
Related Package Version: libvirt-0.8.1-27.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.
#virsh domxml-to-native qemu-argv /etc/libvirt/qemu/guest.xml 
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin HOME=/root USER=root LOGNAME=root QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -name adasd -uuid 0b346301-de68-06a0-eb54-b2317d61f7df -nodefconfig -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/adasd.monitor,server,nowait -mon chardev=monitor,mode=readline -rtc base=utc -no-reboot -boot n -drive file=/var/lock/subsys/hh,if=none,id=drive-ide0-0-0,format=raw,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=00:00:00:00:00:00 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:0 -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 

  
Actual results:


Expected results:


Additional info:
1. This issue was also reported in BZ636832
2. The mac address and network model can be exported with the following patch on fedora14:
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 25695df..0b21d49 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6855,7 +6855,7 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
         if (net->type == VIR_DOMAIN_NET_TYPE_NETWORK) {
             VIR_FREE(net->data.network.name);
 
-            memset(net, 0, sizeof *net);
+     //     memset(net, 0, sizeof *net);
 
             net->type = VIR_DOMAIN_NET_TYPE_ETHERNET;
             net->data.ethernet.dev = NULL;


LC_ALL=C PATH=/usr/lib64/ccache:/sbin:/bin:/usr/sbin:/usr/bin HOME=/root USER=root LOGNAME=root QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -S -M fedora-13 -cpu core2duo,+x2apic -enable-kvm -m 512 -smp 2,sockets=2,cores=1,threads=1 -name rhel-5.2 -uuid 66ae1400-1bb9-7759-fe77-f350eaf777a0 -nodefconfig -nodefaults -chardev socket,id=monitor,path=/usr/local/var/lib/libvirt/qemu/rhel-5.2.monitor,server,nowait -mon chardev=monitor,mode=readline -rtc base=utc -boot c -device lsi,id=scsi0,bus=pci.0,addr=0x6 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive file=/var/lib/libvirt/images/rhel-5.2.img,if=none,id=drive-scsi0-0-0,boot=on,format=raw -device scsi-disk,bus=scsi0.0,scsi-id=0,drive=drive-scsi0-0-0,id=scsi0-0-0 -device e1000,vlan=0,id=net0,mac=52:54:00:06:ec:67,bus=pci.0,addr=0x4 -net tap,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:0 -k en-us -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0

Comment 1 Osier Yang 2011-01-26 12:04:17 UTC
It is by design, libvirt creates TAP/macvtap devices to setup network interface of type direct/bridge/network for a domain, but for "domxml-to-native", we are just responsible to exporting the qemu args, and converting those configs into generic 'ethernet' config and assume the user has suitable 'ifup-qemu' scripts, otherwise, it definitely fails if trying to start the guest with the qemu args got from "domxml-to-native", as qemu won't setup the tap/mactap device for you.

Thus, close it as not a bug.

Comment 2 Jiri Denemark 2012-12-13 13:15:10 UTC
*** Bug 884767 has been marked as a duplicate of this bug. ***


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