[libvirt] Supporting vhost-net and macvtap in libvirt for QEMU

Anthony Liguori aliguori at linux.vnet.ibm.com
Mon Jan 25 17:59:17 UTC 2010

>> and in the guest:
>> <interface type='direct'>
>> <source physical='eth0'>
>>    ...
>> </interface>
> I like the simplicity of just having this in the guest XML and a way
> to just indicate macvlan vs macvtap somehow.

macvlan and macvtap devices have to be created per-VM.  How they're 
created is non-trivial as you need to set flags which eventually get 
down to twiddling bits on the physical interface.

So you essentially have two options: 1) punt the creation fo these 
devices and just let it be specified per-device.  libvirt would be 
incapable of starting these guests automatically without some helper 
tool.  2) allow the twiddling bits to be specified as part of the 
per-domain information. <source physical='eth0' mode='vepa'> might be 
enough but I'm not entirely qualified to understand exactly what the 
various cases are.


Anthony Liguori

More information about the libvir-list mailing list