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