Re: [libvirt] libvirt passes wrong MAC address to KVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 17, 2008 at 04:18:59PM +0200, Nikola Ciprich wrote:
> Hi all,
> I think there could be a bug in libvirt passing MAC address to KVM.
> If I have following in my xml config:
> <interface type="bridge">
>     <source bridge="br0"/>
>          <mac address="00:16:3e:0d:24:00"/>
> </interface>
> 
> and start the domain (I'm using python binding btw), qemu is then executed with following parameter:
> 
> ... -net nic,macaddr=00:16:3e:18:24:00,vlan=0 ...
> 
> MAC address given in config is not used by any other machine. Does somebody have a tip on where the problem could be?
> I'm using libvirt-0.4.3.

  Hum, I can't really reproduce this. I used a definition like:

    <interface type='network'>
      <mac address='00:16:3e:0d:24:00'/>
      <source network='default'/>
      <target dev='vnet0'/>
    </interface>

since i don't have bridging set. When starting the guest with 0.4.2 I see

/usr/bin/qemu-kvm -M pc -m 512 -smp 1 -monitor pty -boot c -hda /virt/test-mac.img -net nic,macaddr=00:16:3e:0d:24:00,vlan=0 -net tap,fd=14,script=,vlan=0,ifname=vnet0 -usb -vnc 127.0.0.1:0 -k en-us

when starting with 0.4.3 I see

/usr/bin/qemu-kvm -S -M pc -m 512 -smp 1 -name test-mac -monitor pty -boot c -drive file=/virt/test-mac.img,if=ide,index=0,boot=on -drive file=,if=ide,media=cdrom,index=2 -net nic,macaddr=00:16:3e:0d:24:00,vlan=0 -net tap,fd=13,script=,vlan=0,ifname=vnet0 -serial none -parallel none -usb -vnc 127.0.0.1:0 -k en-us

but in both cases the MAC parsing looks correct and properly provided down
to qemu-kvm . Could you double check with virsh directly (though i don't see
how python could scramble just that part of the XML description) using
virsh dumpxml and virsh create ...
Also testing with a network type of setting may help finding what is happening
precisely here

  thanks,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]