<br><tt><font size=2>libvir-list-bounces@redhat.com wrote on 03/25/2010
07:15:00 AM:<br>
<br>
</font></tt>
<br><tt><font size=2>> <br>
> Hi Daniel,<br>
> I am trying to create an interface with the type 'direct' with 'vepa'<br>
> mode.<br>
> I assigned an ip '10.0.0.1' to the eth2 interface of the host machine.<br>
> My domain XML format is shown below.<br>
> <br>
> <domain type='lxc' id='1'><br>
> <name>vm1_fedora</name><br>
> <memory>500000</memory><br>
> <os><br>
> <type>exe</type><br>
> <init>/bin/bash</init><br>
> </os><br>
> <vcpu>1</vcpu><br>
> <clock offset='utc'/><br>
> <on_poweroff>destroy</on_poweroff><br>
> <on_reboot>restart</on_reboot><br>
> <on_crash>destroy</on_crash><br>
> <devices><br>
> <emulator>/usr/libexec/libvirt_lxc</emulator><br>
> <filesystem type='mount'><br>
> <source dir='/root/lxc/fedora_fresh'/><br>
> <target dir='/'/><br>
> </filesystem><br>
> <interface type='direct'><br>
> <source dev='eth2' mode='vepa'/><br>
> </interface><br>
> <console type='pty' /><br>
> </devices><br>
> </domain><br>
> <br>
> When I am trying to define the domain, I am getting the following
error:<br>
> <br>
> virsh # define /root/lxc_devel/fedora.xml<br>
> error: Failed to define domain from /root/lxc_devel/fedora.xml<br>
> error: internal error unknown interface type 'direct'<br>
> <br>
> Can you please let me know the problem here.</font></tt>
<br>
<br><tt><font size=2>The direct interface type only works for VMs of type
'kvm'. I'll send an update for the online documentation to </font></tt>
<br><tt><font size=2>mention that. Otherwise, for direct device support
you would need to compile libvirt on a system with a fairly</font></tt>
<br><tt><font size=2>recent Linux kernel (release candidates of 2.6.34
for example) and have their include files installed so that </font></tt>
<br><tt><font size=2>linux/if_link.h contains this fragment here:</font></tt>
<br>
<br><tt><font size=2>enum macvlan_mode {</font></tt>
<br><tt><font size=2> MACVLAN_MODE_PRIVATE =
1, /* don't talk to other macvlans */</font></tt>
<br><tt><font size=2> MACVLAN_MODE_VEPA
= 2, /* talk to other ports through ext bridge */</font></tt>
<br><tt><font size=2> MACVLAN_MODE_BRIDGE =
4, /* talk to bridge ports directly */</font></tt>
<br><tt><font size=2>};</font></tt>
<br>
<br><tt><font size=2>Then the result of a './configure ...' of libvirt
should show this result here :</font></tt>
<br>
<br><tt><font size=2>[...]</font></tt>
<br><tt><font size=2>configure: Libvirtd: yes</font></tt>
<br><tt><font size=2>configure: netcf: yes</font></tt>
<br><tt><font size=2>configure: macvtap: yes</font></tt>
<br><tt><font size=2>configure:</font></tt>
<br><tt><font size=2>configure: Storage Drivers</font></tt>
<br><tt><font size=2>configure:</font></tt>
<br><tt><font size=2>[...]</font></tt>
<br>
<br><tt><font size=2>Hope this helps.</font></tt>
<br>
<br><tt><font size=2>Regards,</font></tt>
<br><tt><font size=2> Stefan</font></tt>
<br>
<br><tt><font size=2><br>
> <br>
> Regards,<br>
> Srikanth.<br>
> <br>
> --<br>
> libvir-list mailing list<br>
> libvir-list@redhat.com<br>
> </font></tt><a href="https://www.redhat.com/mailman/listinfo/libvir-list"><tt><font size=2>https://www.redhat.com/mailman/listinfo/libvir-list</font></tt></a><tt><font size=2><br>
</font></tt>