← Back to team overview

openstack team mailing list archive

Re: [Netstack] [Quantum] Using VirtIO Driver with KVM

 

Hi Emilien,

I know of customers using virtio with Quantum, but I think they may have
modified the template directly, as you mention below.

This code in nova changed quite a bit from Essex -> Folsom.  Looking at
nova/virt/libvirt/vif.py, I noticed that whoever added the
libvirt_use_virtio_for_bridges flag did not add it to the
LibvirtOpenVswitchDriver class.  Based on the XML you show below, my guess
would be that if you add the following lines prior to the return statement
of the plug() method of that class, you would get the right XML:

if FLAGS.libvirt_use_virtio_for_bridges:
      conf.model = "virtio"

That said, I haven't tested it.

Can you file a bug on this in nova?  Thanks,

Dan


On Tue, Aug 7, 2012 at 2:57 PM, Emilien Macchi
<emilien.macchi@xxxxxxxxxxxx>wrote:

> Hi Stackers,
>
>
> I'm talking with Sebastien Han<http://www.sebastien-han.fr/blog/2012/07/19/make-the-network-of-your-vms-fly-with-virtio-driver>about VirtIO Driver for network interfaces.
>
> We have two setup :
>
> 1) Ubuntu 12.04 / Essex / KVM
>    network_manager=*nova.network*.manager.*VlanManager*
>    libvirt_use_virtio_for_bridges=true
>
> 2) Ubuntu 12.04 / Essex / KVM
>    network_manager=nova.network.quantum.manager.QuantumManager
>    linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver
>    libvirt_use_virtio_for_bridges=true
>
> What we have seen :
>
> - VMs booting from first setup have VirtIO driver for networking (Gigabit
> ready). Here is the libvirt.xml for network part :
>
> <interface type='bridge'>
> (...)
>             <model type='virtio'/>
> (...)
> </interface>
>
> - VMs booting from second setup (with Quantum) don't use VirtIO driver (No
> gigabit). Here is the libvirt.xml for network part :
>
> <interface type='ethernet'>
>             <target dev='tapxxxxx' />
>             <mac address='xxxx' />
>             <script path='' />
>  </interface>
>
> The only one way I found to use VirtIO driver with Quantum to modify
> /usr/share/pyshared/nova/virt/libvirt.xml.template file and add :
>
> <model type='virtio'/>
> (after line 125)
>
> So you must have something like this :
> <interface type='ethernet'>
> <target dev='${nic.name}' />
> <mac address='${nic.mac_address}' />
> <script path='${nic.script}' />
> <model type='virtio'/>
> </interface>
>
> And restart LibVirt service :
> service libvirt-bin restart
>
>
> What do you think about that ? Should we modify the template to get
> Gigabit capacity or is there something wrong in my configuration ?
>
>
> Best regards
>
> --
> Emilien Macchi
> *System Engineer*
> *www.stackops.com
>
> | *emilien.macchi@xxxxxxxxxxxx**  *|* skype:emilien.macchi*
> * <http://www.stackops.com>
> *
>
> *
>
> ******************** ADVERTENCIA LEGAL ********************
> Le informamos, como destinatario de este mensaje, que el correo
> electrónico y las comunicaciones por medio de Internet no permiten asegurar
> ni garantizar la confidencialidad de los mensajes transmitidos, así como
> tampoco su integridad o su correcta recepción, por lo que STACKOPS
> TECHNOLOGIES S.L. no asume responsabilidad alguna por tales circunstancias.
> Si no consintiese en la utilización del correo electrónico o de las
> comunicaciones vía Internet le rogamos nos lo comunique y ponga en nuestro
> conocimiento de manera inmediata. Este mensaje va dirigido, de manera
> exclusiva, a su destinatario y contiene información confidencial y sujeta
> al secreto profesional, cuya divulgación no está permitida por la ley. En
> caso de haber recibido este mensaje por error, le rogamos que, de forma
> inmediata, nos lo comunique mediante correo electrónico remitido a nuestra
> atención y proceda a su eliminación, así como a la de cualquier documento
> adjunto al mismo. Asimismo, le comunicamos que la distribución, copia o
> utilización de este mensaje, o de cualquier documento adjunto al mismo,
> cualquiera que fuera su finalidad, están prohibidas por la ley.
>
> ***************** PRIVILEGED AND CONFIDENTIAL ****************
> We hereby inform you, as addressee of this message, that e-mail and
> Internet do not guarantee the confidentiality, nor the completeness or
> proper reception of the messages sent and, thus, STACKOPS TECHNOLOGIES S.L.
> does not assume any liability for those circumstances. Should you not agree
> to the use of e-mail or to communications via Internet, you are kindly
> requested to notify us immediately. This message is intended exclusively
> for the person to whom it is addressed and contains privileged and
> confidential information protected from disclosure by law. If you are not
> the addressee indicated in this message, you should immediately delete it
> and any attachments and notify the sender by reply e-mail. In such case,
> you are hereby notified that any dissemination, distribution, copying or
> use of this message or any attachments, for any purpose, is strictly
> prohibited by law.
>
>
> --
> Mailing list: https://launchpad.net/~netstack
> Post to     : netstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~netstack
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Wendlandt
Nicira, Inc: www.nicira.com
twitter: danwendlandt
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Follow ups

References