황진환
2013-May-27 09:22 UTC
[libvirt-users] Using source installed open vswitch with libvirt(or virsh).
P{font-size:10pt; line-height:16; margin-left:0; margin-top:0; margin-right:0; margin-bottom:0; font-family:gulim;} (English is not my first language Sorry for my poor English ) OS : Linux nc233 2632-220171el6x86_64 #1 SMP Tue May 15 17:16:46 CDT 2012 x86_64 x86_64 x86_64 GNU/Linux CentOS release 63 (Final) open vswitch : 11190 virsh : 100 ibvirtd (libvirt) : 100 I have tried to see what the virsh setting can do to open vswitch(ovs) until now I had installed open vswitch from a source, not by using rpm or rpm build of the source (I had tried to do 'ovs rpm build' described at INSTALLRHEL included in ovs, But i failed to do it) What i tried is this(http://blogscottloweorg/2012/11/07/using-vlans-with-ovs-and-libvirt/) I installed and started up ovs and it looked like properly working I could create and delete bridges and ports with 'ovs-vsctl' 1 what i created before running 'virsh net-define' -------------------------------------------- # ovs-vsctl show 76d9d6aa-cfce-4868-bf99-7d16bcfe38eb Bridge "br0" Port "br0" Interface "br0" type: internal Port "eth1" Interface "eth1" -------------------------------------------- 2 And then runned 'virsh net-define netxml' 'netxml' i used -------------------------------------------- <network> <name>ovs-network</name> <forward mode='bridge'/> <bridge name='br0'/> <virtualport type='openvswitch'/> <portgroup name='vlan-01' default='yes'> </portgroup> <portgroup name='vlan-02'> <vlan> <tag id='2'/> </vlan> </portgroup> <portgroup name='vlan-03'> <vlan> <tag id='3'/> </vlan> </portgroup> <portgroup name='vlan-all'> <vlan trunk='yes'> <tag id='2'/> <tag id='3'/> </vlan> </portgroup> </network> -------------------------------------------- 3 vmxml which was used for 'virsh define vmxml' -------------------------------------------- <domain type="kvm"> <name>vm</name> <memory>1048576</memory> <vcpu>1</vcpu> <os> <type arch="x86_64" machine="pc">hvm</type> <boot dev="hd"/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock mode="localtime"> <timer name="rtc" tickpolicy="catchup" wallclock="guest"/> <timer name="hpet" present="no"/> </clock> <devices> <!--<emulator>/usr/libexec/qemu-kvm</emulator>--> <emulator>/usr/bin/qemu-system-x86_64</emulator> <!--<disk device="disk" type="block">--> <disk device="disk" type="file"> <!--<driver cache="none" name="qemu" type="qcow2"/>--> <driver cache="writeback" io="threads" name="qemu" type="qcow2"/> <source file="/root/img/vmimg"/> <target bus="virtio" dev="vda"/> </disk> <interface type="network"> <mac address="d2:0d:45:a3:92:ea"/> <source network='ovs-network' portgroup='vlan-02'/> </interface> <console type="pty"> <target port="0"/> </console> <input bus="usb" type="tablet"/> <input bus="ps2" type="mouse"/> <graphics autoport="yes" keymap="en-us" listen="0000" port="-1" type="vnc"/> </devices> </domain> -------------------------------------------- 4 runned 'virsh start vm', and failed (messages had not been printed in english at my server, so i googled and tried to choose simillar sentecne which were shown in libvirt related threads please consider it) ----------------------------------------- #virsh start vm error : Failled to start domain vm error : Unable to add port vnet0 to OVS bridge br0 ----------------------------------------- At that time, /var/log/libvirt/libvirtdlog (these are also translated) ----------------------------------------- 2013-05-23 04:32:14588+0000: 11455: error : virNetDevGetMTU:343 : Cannot get interface MTU on 'ovsbr0': No such device 2013-05-23 04:32:14678+0000: 11455: error : virExecWithHook:419 : Cannot find 'ovs-vsctl' in path: No such file or directory 2013-05-23 04:32:14679+0000: 11455: error : virNetDevOpenvswitchRemovePort:173 : Unable to delete port (null) from OVS: command does not allowed ----------------------------------------- I think above errors comes from install location of OVS as written in libvirtdlog How can i solve that by hands? (I'm also trying to solve the problem by installing ovs, using rpm build) There are not only fedora or ubuntu linux, so the solution may exist Are there a way to get libvirt to recognize ovs-vsctl? (As i mentioned above, ovs-vsctl and ovs are properly working) Thank you for reading
Eric Blake
2013-May-28 20:44 UTC
Re: [libvirt-users] Using source installed open vswitch with libvirt(or virsh).
On 05/27/2013 03:22 AM, 황진환 wrote:> P{font-size:10pt; line-height:16; margin-left:0; margin-top:0; > margin-right:0; margin-bottom:0; font-family:gulim;}[Please fix your mailer to send plain-text. This gobbledy-gook is annoying to anyone with a plain-text mail client.]> (English is not my first language Sorry for my poor English ) > > > > OS : > > Linux nc233 2632-220171el6x86_64 #1 SMP Tue May 15 17:16:46 CDT 2012 x86_64 > x86_64 x86_64 GNU/LinuxIt looks like all the '.' in your message disappeared, making it rather illegible.> virsh : 100 > > ibvirtd (libvirt) : 100CentOS 6.3 did not ship with libvirt 1.0.0; have you self-built some packages? If that's the case, would you mind trying again with 1.0.5 (or even help us test our 1.0.6 release candidate)? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Laine Stump
2013-May-31 16:56 UTC
Re: [libvirt-users] Using source installed open vswitch with libvirt(or virsh).
On 05/27/2013 05:22 AM, ??? wrote:> > > At that time, /var/log/libvirt/libvirtd.log > (these are also translated) > ----------------------------------------- > 2013-05-23 04:32:14.588+0000: 11455: error : virNetDevGetMTU:343 : > Cannot get interface MTU on 'ovsbr0': No such device > 2013-05-23 04:32:14.678+0000: 11455: error : virExecWithHook:419 : > Cannot find 'ovs-vsctl' in path: No such file or directory > 2013-05-23 04:32:14.679+0000: 11455: error : > virNetDevOpenvswitchRemovePort:173 : Unable to delete port (null) from > OVS: command does not allowed. > ----------------------------------------- > > > I think above errors comes from install location of OVS as written in > libvirtd.log.Correct. When you built and installed openvswitch, it apparently was installed in some alternate place (/usr/local?) that isn't in the PATH supplied to libvirtd when it starts. The simplest solution would be to find ovs-vsctl, and make a symlink to it from /usr/bin/ovs-vsctl. BTW, since you're apparently already building upstream libvirt from source, I'll repeat Eric's request to try libvirt-1.0.5 or the libvirt-1.0.6-rc2 instead of 1.0.0; many things have been accomplished in the last 6 months.
Possibly Parallel Threads
- VLANs with Open vSwitch in libvirt 0.10.1
- Ovs error when starting vm: ovs-vsctl: 'del-port' command requires at least 1 arguments
- Re: VM Performance using KVM Vs. VMware ESXi
- Define libvirt network portgroup with native untagged.
- Bug#702337: xen-xapi / Open vSwitch not really working