<div dir="ltr"><pre class="" id="comment_text_4">Hi Cole

I tested the LXC VM with libvirt 1.2.12 after applying the patch 

<a href="http://www.redhat.com/archives/libvir-list/2016-April/msg00505.html">http://www.redhat.com/archives/libvir-list/2016-April/msg00505.html</a>

I'm now getting following errors..

virsh -c lxc: start test      
error: Failed to start domain test
error: internal error: Unsupported network type ethernet

I'm using the below XML file for launching LXC VM..

<domain type="lxc">
  <uuid>64c48da2-e318-4085-8b88-c980aab4de34</uuid>
  <name>test</name>
  <memory>524288</memory>
  <vcpu>1</vcpu>
  <os>
    <type machine="virt">exe</type>
    <cmdline>root=/dev/ram0 rw  console=ttyAMA0 rootwait earlyprintk</cmdline>
    <init>/bin/sh</init>
  </os>
  <clock offset="utc"/>
  <devices>
    <file/>
    <interface type='ethernet'>
      <mac address='02:74:ff:9d:52:f5'/>
      <script path=''/>
      <target dev='tap74f2-f5'/>
    </interface>
    <console type="pty"/>
  </devices>
</domain>

Thanks
Abhishek Jain</pre></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 12, 2016 at 12:05 AM, abhishek jain <span dir="ltr"><<a href="mailto:ashujain9727@gmail.com" target="_blank">ashujain9727@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thanks Cole.<br><br></div>I need to use network type="ethernet" with LXC instead of Qemu.<br>I have reopened my bug.<br><br><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 11, 2016 at 8:25 PM, Cole Robinson <span dir="ltr"><<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 04/11/2016 09:24 AM, abhishek jain wrote:<br>
> Hi Team<br>
><br>
> I'm trying to launch LXC VM with libvirt 1.2.12 having commit<br>
</span>> *22cff52a2b8e06c913b1f97767e5d3**90fb17fc3b *with below XML configuration..<br>
<div><div>><br>
> <domain type="lxc"><br>
>   <uuid>64c48da2-e318-4085-8b88-c980aab4de34</uuid><br>
>   <name>test</name><br>
>   <memory>524288</memory><br>
>   <vcpu>1</vcpu><br>
>   <os><br>
>     <type machine="virt">exe</type><br>
>     <cmdline>root=/dev/ram0 rw  console=ttyAMA0 rootwait earlyprintk</cmdline><br>
>     <init>/bin/sh</init><br>
>   </os><br>
>   <clock offset="utc"/><br>
>   <devices><br>
>     <file/><br>
>     <interface type='ethernet'><br>
>       <mac address='02:74:ff:9d:52:f5'/><br>
>       <script path=''/><br>
>       <target dev='tap74f2-f5'/><br>
>     </interface><br>
>     <console type="pty"/><br>
>   </devices><br>
> </domain><br>
><br>
> I'm getting following errors while launching LXC VM using above XML file..<br>
><br>
> virsh -c lxc: define lxc.xml<br>
> virsh -c lxc: start<br>
> test<br>
><br>
> error: Failed to start domain test<br>
> error: internal error: guest failed to start: /usr/lib/libvirt/libvirt_lxc:<br>
> option '--veth' requires an argument<br>
> syntax: /usr/lib/libvirt/libvirt_lxc [OPTIONS]<br>
> Options<br>
>   -b, --background<br>
>   -n NAME, --name NAME<br>
>   -c FD, --console FD<br>
>   -v VETH, --veth VETH<br>
>   -s FD, --handshakefd FD<br>
>   -S NAME, --security NAME<br>
>   -h, --help<br>
> Unknown failure in libvirt_lxc startup<br>
><br>
><br>
> Please help me regarding this.<br>
<br>
<br>
</div></div>Hmm indeed, it seems like that commit inadvertently dropped the error<br>
condition for type=ethernet... from reading the original thread, I think the<br>
reporter was only testing with qemu.<br>
<br>
It's probably not much work to wire up type=ethernet for LXC, but someone else<br>
will need to do it. I'll send a patch to make the error explicit again. Please<br>
reopen your RFC bug<br>
<br>
Thanks,<br>
Cole<br>
<span><br>
><br>
><br>
> --Thanks<br>
> Abhishek Jain<br>
><br>
><br>
><br>
> On Mon, Apr 11, 2016 at 3:35 AM, <<a href="mailto:bugzilla@redhat.com" target="_blank">bugzilla@redhat.com</a><br>
</span><span>> <mailto:<a href="mailto:bugzilla@redhat.com" target="_blank">bugzilla@redhat.com</a>>> wrote:<br>
><br>
>     <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1325687" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1325687</a><br>
><br>
</span>>     Cole Robinson <<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a> <mailto:<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a>>> changed:<br>
<span>><br>
>                What    |Removed                     |Added<br>
>     ----------------------------------------------------------------------------<br>
>                  Status|NEW                         |CLOSED<br>
>                      CC|                            |<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a><br>
</span>>     <mailto:<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a>><br>
<span>>              Resolution|---                         |CURRENTRELEASE<br>
>             Last Closed|                            |2016-04-10 18:05:06<br>
><br>
><br>
><br>
>     --- Comment #1 from Cole Robinson <<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a><br>
</span>>     <mailto:<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a>>> ---<br>
<span>>     ethernet support was actually enabled for lxc via this commit:<br>
><br>
>     commit 22cff52a2b8e06c913b1f97767e5d390fb17fc3b<br>
</span>>     Author: Anirban Chakraborty <<a href="mailto:abchak@juniper.net" target="_blank">abchak@juniper.net</a> <mailto:<a href="mailto:abchak@juniper.net" target="_blank">abchak@juniper.net</a>>><br>
<div><div>>     Date:   Tue Nov 18 15:55:48 2014 -0800<br>
><br>
>         network: Add network bandwidth support to ethernet interfaces<br>
><br>
><br>
>     Which looks like libvirt v1.2.10 or v1.2.11<br>
><br>
>     --<br>
>     You are receiving this mail because:<br>
>     You are on the CC list for the bug.<br>
>     You reported the bug.<br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>