[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libvirt-users
Subject:    [libvirt-users] Trouble configuring with macvtap passthrough on Debian Wheezy / Jessie
From:       Richard Gomes <rgomes1997 () yahoo ! co ! uk>
Date:       2014-01-31 19:06:00
Message-ID: 52EBF418.2060805 () yahoo ! co ! uk
[Download RAW message or body]

( Posting again. Correct subject line now! )

Hello,

I'm trying to use macvtap on Debian Wheezy.
Actually, I've installed a recent version of libvirt and qemu from
Jessie, using wheezy-backports.

$ virsh version
Compiled against library: libvirt 1.2.1
Using library: libvirt 1.2.1
Using API: QEMU 1.2.1
Running hypervisor: QEMU 1.7.0


I'm trying to configure a macvtap interface like this:


    <interface type='direct'>
      <mac address='52:54:00:7b:05:cd'/>
      <source dev='eth1' mode='passthrough'/>
      <model type='rtl8139'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08'
function='0x0'/>
    </interface>


The interface eth1 is used exclusively by this VM,  so as far as I
understand, mode 'passthrough' is enough since I'd like to "plug" the VM
straight onto a public static IP.


On my /etc/networks/interfaces, I have this:


# start :: define eth1
iface eth1 inet manual
# end :: define eth1


It does not matter whether eth1 is up or down, when I try to start the
VM, I get the following error:

    Error starting domain: Cannot create macvlan devices on this
    platform: Function not implemented

    Traceback (most recent call last):
      File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45,
    in cb_wrapper
        callback(asyncjob, *args, **kwargs)
      File "/usr/share/virt-manager/virtManager/asyncjob.py", line 66,
    in tmpcb
        callback(*args, **kwargs)
      File "/usr/share/virt-manager/virtManager/domain.py", line 1114,
    in startup
        self._backend.create()
      File "/usr/lib/python2.7/dist-packages/libvirt.py", line 866, in
    create
        if ret == -1: raise libvirtError ('virDomainCreate() failed',
    dom=self)
    libvirtError: Cannot create macvlan devices on this platform:
    Function not implemented


Trying to solve the issue, I found this:
       http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737097


I've tried to rebuild the package from Debian sources, but apparently,
macvtap is already defined, as I've reported to another mailing list.
For your information:

> I'm new to building packages from Debian sources, so I followed
> instructions from
>     
> https://wiki.debian.org/HowToPackageForDebian#Building_Debian_packages
>
>     $ apt-get -t wheezy-backports source libvirt
>     $ cd libvirt-0.9.12.3/
>     $ sudo apt-get build-dep libvirt
>     $ debuild -i -us -uc -b
>
> So... yes, it works and builds without any errors.
>
> Next step now is applying the changes mentioned.
> But I'm confused because /apparently/ debian/rules is already the way
> it should be.
>
> ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux))
>   WITH_STORAGE_LVM    = --with-storage-lvm
>   WITH_STORAGE_ISCSI  = --with-storage-iscsi
>   WITH_STORAGE_DISK   = --with-storage-disk
>   WITH_UDEV           = --with-udev --without-hal
>   WITH_CAPNG          = --with-capng
>   WITH_POLKIT         = --with-polkit
> *  WITH_MACVTAP        = --with-macvtap**
> **  WITH_NETWORK        = --with-network**
> *  WITH_QEMU           = --with-qemu
>   WITH_OPENVZ         = --with-openvz
>   WITH_NETCF          = --with-netcf
>   ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 i386 ia64 mips mipsel powerpc))
>       WITH_NUMA       = --with-numactl
>   else
>       WITH_NUMA       = --without-numactl
>   endif
>   ifneq (,$(findstring $(DEB_HOST_ARCH), ia64))
>       WITH_LXC        = --without-lxc
>   else
>       WITH_LXC        = --with-lxc
>   endif
> else
>   WITH_STORAGE_LVM    = --without-storage-lvm
>   WITH_STORAGE_ISCSI  = --without-storage-iscsi
>   WITH_STORAGE_DISK   = --without-storage-disk
>   WITH_UDEV           = --without-udev --with-hal
>   WITH_CAPNG          = --without-capng
>   WITH_POLKIT         = --without-polkit
> *  WITH_MACVTAP        = --without-macvtap**
> **  WITH_NETWORK        = --without-network**
> *  WITH_QEMU           = --without-qemu
>   WITH_LXC            = --without-lxc
>   WITH_NUMA           = --without-numactl
>   WITH_NETCF          = --without-netcf
> endif
>
>
> I suppose that nothing has to be changed, correct? ... since the
> _/then/_ branch already has the change mentioned and the _/else/_
> branch probably means that nothing related to networking would be
> enabled anyway.
>
> Am I missing something ?

Thoughts?

Thanks a lot :)
-- 
Richard Gomes
http://rgomes.info
http://www.linkedin.com/in/rgomes
mobile: +44(77)9955-6813
inum <http://www.inum.net/>: +883(5100)0800-9804
sip:rgomes@ippi.fr


[Attachment #3 (text/html)]

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    ( Posting again. Correct subject line now! )<br>
    <br>
    Hello,<br>
    <br>
    I'm trying to use macvtap on Debian Wheezy.<br>
    Actually, I've installed a recent version of libvirt and qemu from
    Jessie, using wheezy-backports.<br>
    <br>
    $ virsh version<br>
    Compiled against library: libvirt 1.2.1<br>
    Using library: libvirt 1.2.1<br>
    Using API: QEMU 1.2.1<br>
    Running hypervisor: QEMU 1.7.0<br>
    <br>
    <br>
    I'm trying to configure a macvtap interface like this:<br>
    <br>
    <br>
    &nbsp;&nbsp;&nbsp; &lt;interface type='direct'&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mac address='52:54:00:7b:05:cd'/&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;source dev='eth1' mode='passthrough'/&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;model type='rtl8139'/&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;address type='pci' domain='0x0000' bus='0x00' \
slot='0x08'  function='0x0'/&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/interface&gt;<br>
    <br>
    <br>
    The interface eth1 is used exclusively by this VM,&nbsp; so as far as I
    understand, mode 'passthrough' is enough since I'd like to "plug"
    the VM straight onto a public static IP.<br>
    <br>
    <br>
    On my /etc/networks/interfaces, I have this:<br>
    <br>
    <br>
    # start :: define eth1<br>
    iface eth1 inet manual<br>
    # end :: define eth1<br>
    <br>
    <br>
    It does not matter whether eth1 is up or down, when I try to start
    the VM, I get the following error:<br>
    <br>
    <blockquote><font face="Courier New, Courier, monospace">Error
        starting domain: Cannot create macvlan devices on this platform:
        Function not implemented<br>
        <br>
        Traceback (most recent call last):<br>
        &nbsp; File "/usr/share/virt-manager/virtManager/asyncjob.py", line
        45, in cb_wrapper<br>
        &nbsp;&nbsp;&nbsp; callback(asyncjob, *args, **kwargs)<br>
        &nbsp; File "/usr/share/virt-manager/virtManager/asyncjob.py", line
        66, in tmpcb<br>
        &nbsp;&nbsp;&nbsp; callback(*args, **kwargs)<br>
        &nbsp; File "/usr/share/virt-manager/virtManager/domain.py", line
        1114, in startup<br>
        &nbsp;&nbsp;&nbsp; self._backend.create()<br>
        &nbsp; File "/usr/lib/python2.7/dist-packages/libvirt.py", line 866,
        in create<br>
        &nbsp;&nbsp;&nbsp; if ret == -1: raise libvirtError ('virDomainCreate()
        failed', dom=self)<br>
        libvirtError: Cannot create macvlan devices on this platform:
        Function not implemented</font><br>
    </blockquote>
    <br>
    Trying to solve the issue, I found this:<br>
    &nbsp; &nbsp; &nbsp;&nbsp; <a
      href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737097">http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737097</a><br>
  <br>
    <br>
    I've tried to rebuild the package from Debian sources, but
    apparently, macvtap is already defined, as I've reported to another
    mailing list.<br>
    For your information:<br>
    <br>
    <blockquote type="cite">I'm new to building packages from Debian
      sources, so I followed instructions from <br>
      &nbsp;&nbsp;&nbsp;&nbsp; <a moz-do-not-send="true"
href="https://wiki.debian.org/HowToPackageForDebian#Building_Debian_packages">https://wiki.debian.org/HowToPackageForDebian#Building_Debian_packages</a><br>
  <blockquote>$ apt-get -t wheezy-backports source libvirt<br>
        $ cd libvirt-0.9.12.3/<br>
        $ sudo apt-get build-dep libvirt<br>
        $ debuild -i -us -uc -b<br>
      </blockquote>
      So... yes, it works and builds without any errors.<br>
      <br>
      Next step now is applying the changes mentioned.<br>
      But I'm confused because <i>apparently</i> debian/rules is
      already the way it should be.<br>
      <br>
      <pre>ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux))
  WITH_STORAGE_LVM    = --with-storage-lvm
  WITH_STORAGE_ISCSI  = --with-storage-iscsi
  WITH_STORAGE_DISK   = --with-storage-disk
  WITH_UDEV           = --with-udev --without-hal
  WITH_CAPNG          = --with-capng
  WITH_POLKIT         = --with-polkit
<big><b>  WITH_MACVTAP        = --with-macvtap</b><b>
</b><b>  WITH_NETWORK        = --with-network</b><b>
</b></big>  WITH_QEMU           = --with-qemu
  WITH_OPENVZ         = --with-openvz
  WITH_NETCF          = --with-netcf
  ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 i386 ia64 mips mipsel powerpc))
      WITH_NUMA       = --with-numactl
  else
      WITH_NUMA       = --without-numactl
  endif
  ifneq (,$(findstring $(DEB_HOST_ARCH), ia64))
      WITH_LXC        = --without-lxc
  else
      WITH_LXC        = --with-lxc
  endif
else
  WITH_STORAGE_LVM    = --without-storage-lvm
  WITH_STORAGE_ISCSI  = --without-storage-iscsi
  WITH_STORAGE_DISK   = --without-storage-disk
  WITH_UDEV           = --without-udev --with-hal
  WITH_CAPNG          = --without-capng
  WITH_POLKIT         = --without-polkit
<big><b>  WITH_MACVTAP        = --without-macvtap</b><b>
</b><b>  WITH_NETWORK        = --without-network</b><b>
</b></big>  WITH_QEMU           = --without-qemu
  WITH_LXC            = --without-lxc
  WITH_NUMA           = --without-numactl
  WITH_NETCF          = --without-netcf
endif


</pre>
      I suppose that nothing has to be changed, correct? ... since the \
<u><i>then</i></u>  branch already has the change mentioned and the \
<u><i>else</i></u>  branch probably means that nothing related to networking would be
      enabled anyway.<br>
      <br>
      Am I missing something ?</blockquote>
    <br>
    Thoughts?<br>
    <br>
    Thanks a lot :)
    <div class="moz-signature">-- <br>
      Richard Gomes<br>
      <a href="http://rgomes.info">http://rgomes.info</a><br>
      <a href="http://www.linkedin.com/in/rgomes">http://www.linkedin.com/in/rgomes</a><br>
  mobile: +44(77)9955-6813<br>
      <a href="http://www.inum.net/">inum</a>: +883(5100)0800-9804<br>
      <a class="moz-txt-link-abbreviated" \
href="mailto:sip:rgomes@ippi.fr">sip:rgomes@ippi.fr</a><br>  <br>
    </div>
  </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic