On Sat, Jun 02, 2012 at 11:43:34PM -0400, Andrew Cathrow wrote:
> On Jun 1, 2012 2:17 PM, "Whit Blauvelt" <
whit.virt(a)transpect.com >
> wrote:
> >
> > I recall the kernel recently adding a new alternative for handling VM
> > interfaces, but can't recall what it was called. Would that be a
> > marked improvement? Is it supported by libvirt?
>
> Linux Bridge < macvtap < SR-IOV
or openvswitch
Looking into background info on these, it looks like SR-IOV capability is
specific to certain NICs and not documented for KVM/libvirt in any obvious
place. Maybe I just didn't find it.
Openvswitch looks more widely useable and promising, but also lacking
user-level documentation. Openvswitch.org's "Documentation" section has
three brief notes, all presuming you've already got it in use.
Okay, so falling back to macvtap, a long post from over a year ago at
http://ubuntuforums.org/showthread.php?t=1687750
says that the host cannot communicate directly with the guests through the
bridge when using it. Is this correct? That would rule it out for my use.
So now I fall back to the question of whether I should enable virtio where
I've currently got (working, but slowish) bridges defined. (I've got virtio
in use for memballoon, but not for the bridges.) I look at
http://wiki.libvirt.org/page/Virtio and while helpful it underspecifies:
In the <interface> section, add a virtio model, like this:
<interface type='network'>
...
<model type='virtio' />
</interface>
That's all it says. So ... I've got entries that currently look about like:
<interface type='bridge'>
<mac address='52:54:00:25:0a:a2'/>
<source bridge='br0'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x03' function='0x0'/>
</interface>
What if anything should carry across to the elipsis in the doc? The doc at
http://www.linux-kvm.org/page/Tuning_KVM is similarly terse, and puts it in
terms of the qemu command line, rather than libvirt XML, so not completely
helpful short of studying how libvirt translates the XML to that line. Ah,
here's a more useful doc at
http://wiki.libvirt.org/page/Networking#Guest_configuration_2:
Guest configuration
In order to let your virtual machines use this bridge, their configuration
should include the interface definition as described in Bridge to LAN. In
essence you are specifying the bridge name to connect to. Assuming a shared
physical device where the bridge is called "br0", the following guest XML
would be used:
<interface type='bridge'>
<source bridge='br0'/>
<mac address='00:16:3e:1a:b3:4a'/>
<model type='virtio'/> # try this if you experience problems with
VLANs
</interface>
So the <model type='virtio'/> can just go under <interface
type='bridge'>,
that doesn't need to change to <interface type='network'>. Then should
the
current line like:
<address type='pci' domain='0x0000' bus='0x00'
slot='0x03' function='0x0'/>
stay or go?
Do others share my perception that it's a shame there's so little interest
in writing good docs in this whole area?
Regards,
Whit