[libvirt] macvtap support in libvirt 0.9.8

Stefan Berger stefanb at linux.vnet.ibm.com
Mon Dec 12 23:16:13 UTC 2011


On 12/12/2011 05:20 AM, Amit Tewari wrote:
>
> Hi all,
>
> Please ignore my previous mail..
>
> This is my test scenario
>
> My test environment
>
> Host os=rhel6.1
>
> Guest os = rhel6.1
>
> Libvirt=0.9.8
>
> Kvm hypervisor
>
> I am creating a macvtap interface on host machine at eth0 interface
>
> #ip link show macvtap0
>
> 51: macvtap0 at eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq 
> state UNKNOWN qlen 500
>
>     link/ether 1e:aa:f7:43:7e:3d brd ff:ff:ff:ff:ff:ff
>


I assume you created this device via 'ip link add link eth0 type 
macvtap' command?

> I have made this entry in guest xml file
>
> <interface type='direct'>
>
> <mac address=1e:aa:f7:43:7e:3d'/>
>

The direct type of interface automatically creates a macvtap interface. 
However, it will fail if there already is a macvtap device with that 
same MAC address connected to the same physical interface, here eth0. So 
if you delete this macvtap interface first (ip link del mavtap0), then 
start the VM using 'virsh start' then it will work. libvirt wants to 
create a macvtap device since only then it knows that it is the 'owner' 
of the device; it doesn't just us a macvtap device that happens to be 
available since that could be 'owner' by some other application.

Regards,
    Stefan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111212/9f122980/attachment-0001.htm>


More information about the libvir-list mailing list