<div dir="ltr"><div><div><div><div><div>Thanks! Unfortunately, I am running into the following issue when attempting to use the generic ethernet configuration:<br><br>$ virsh -c qemu:///system create /tmp/generic.xml<br>error: Failed to create domain from /tmp/generic.xml<br>
error: internal error process exited while connecting to monitor: kvm: -netdev tap,id=hostnet0: could not configure /dev/net/tun: Operation not permitted<br>kvm: -netdev tap,id=hostnet0: Device 'tap' could not be initialized<br>
<br></div><div>This is the network part of my xml file:<br><br></div><div><devices><br></div><div>   <interface type="ethernet"/><br><br></div><div><br><pre> ...
  <devices>
    <interface type='ethernet'/>
    ...
    <interface type='ethernet'>
      <target dev='vnet7'/>
      <script path='/etc/qemu-ifup-mynet'/>
    </interface>
  </devices>
  ...</pre><br></div><div><br></div>In my /etc/libvirt/qemu.conf file I have the following set:<br><br></div>user = "root"<br></div>group ="root"<br></div>dynamic ownership = 0<br></div>clear_emulator_capabilities = 0<br>
<div><div><div><div><div><div><div><div>cgroup_device_acl = [<br>    "/dev/null", "/dev/full", "/dev/zero",<br>    "/dev/random", "/dev/urandom",<br>    "/dev/ptmx", "/dev/kvm", "/dev/kqemu",<br>
    "/dev/rtc", "/dev/hpet",<br>    "/dev/net/tun", <br>]<br><br></div><div>I am running Ubuntu 12, which does not use SELinux.</div></div></div></div></div></div></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Aug 9, 2013 at 8:01 AM, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, Aug 08, 2013 at 08:55:27PM -0600, Joshua McKee wrote:<br>
> Hi,<br>
><br>
> I hope this is the right place to ask this question. I was wondering if<br>
> there is a way to set up a KVM VM using an XML document as input into Virsh<br>
> that uses bridged networking over a wireless card.<br>
><br>
> I understand that wireless cards to not natively support, but I was able to<br>
> find a working solution here:<br>
> <a href="http://blog.ericwhite.ca/articles/2011/04/creating-a-wireless-bridge/" target="_blank">http://blog.ericwhite.ca/articles/2011/04/creating-a-wireless-bridge/</a>.<br>
<br>
</div>Ok, that's slightly different. The traditional integration with Linux<br>
bridge devices is doing ethernet layer bridging - so all protocols<br>
like IPv4, IPv6, etc, etc will "just work".<br>
<br>
What that blog describes is protocol layer bridging, which with those<br>
instructions only works for IPv4.<br>
<br>
Libvirt doesn't have any explicit support for the latter. Though we have<br>
thought about implementing it in the virtual network APIs, we've never<br>
got around to it.<br>
<div class="im"><br>
> The issue is, I can use this bridge by calling KVM directly. However, I<br>
> cannot figure out how to get this same configuration on an XML file that I<br>
> input into Virsh for the creation of a VM.<br>
><br>
> My understanding is that libvirt calls KVM/QEMU at some point, but I may be<br>
> mistaken.<br>
<br>
</div>You might be able to get it working using the generic ethernet config<br>
<br>
   <a href="http://libvirt.org/formatdomain.html#elementsNICSEthernet" target="_blank">http://libvirt.org/formatdomain.html#elementsNICSEthernet</a><br>
<br>
That setup you specify a pre-created TAP device for the VM to use.<br>
Of course it is upto you todo the manal config steps described in<br>
that blog, so is more tedious from an admin pov.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Daniel<br>
--<br>
|: <a href="http://berrange.com" target="_blank">http://berrange.com</a>      -o-    <a href="http://www.flickr.com/photos/dberrange/" target="_blank">http://www.flickr.com/photos/dberrange/</a> :|<br>
|: <a href="http://libvirt.org" target="_blank">http://libvirt.org</a>              -o-             <a href="http://virt-manager.org" target="_blank">http://virt-manager.org</a> :|<br>
|: <a href="http://autobuild.org" target="_blank">http://autobuild.org</a>       -o-         <a href="http://search.cpan.org/~danberr/" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
|: <a href="http://entangle-photo.org" target="_blank">http://entangle-photo.org</a>       -o-       <a href="http://live.gnome.org/gtk-vnc" target="_blank">http://live.gnome.org/gtk-vnc</a> :|<br>
</font></span></blockquote></div><br></div>