[ovs-discuss] Installing VM on KVM hypervisor in Ubuntu 14.04 with OVS bridge
Ramana Reddy
gtvrreddy at gmail.com
Mon Oct 5 18:55:27 UTC 2015
Hi Scott,
I followed your blog mentioned in the url. I tried the following steps:
Create a br0.xml file:
<network>
<name>br0</name>
<forward mode='bridge'/>
<bridge name='br0'/>
<virtualport type='openvswitch'/>
</network>
$sudo virsh net-define br0.xml
Network br0 defined from br0.xml
$sudo virsh net-start br0
Network br0 started
$sudo virsh net-list --all
Name State Autostart Persistent
----------------------------------------------------------
br0 active no yes
$sudo qemu-img create -f qcow2 /var/lib/libvirt/images/VM2.img 8G
Formatting '/var/lib/libvirt/images/VM2.img', fmt=qcow2 size=8589934592
encryption=off cluster_size=65536 lazy_refcounts=off
$sudo virt-install --connect qemu:///system --force --name VM2 --ram=1024
--vcpus=1 --disk path=/var/lib/libvirt/images/VM2.img,size=8,format=qcow2
--cdrom=/home/ramanar/Downloads/ubuntu-14.04.3-server-amd64.iso --vnc
--os-variant=ubuntutrusty --network=bridge:br0,model=virtio
Starting install...
ERROR Unable to add bridge br0 port vnet0: Operation not supported
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start VM2
$sudo ovs-vsctl show
92d0c0b6-bbbb-4f86-aebd-ec4cc33653a3
Bridge "br0"
Port "br0"
Interface "br0"
type: internal
Port "eth0"
Interface "eth0"
Any idea why this approach is not working.
Some how the second method is working fine. I created a VM using NAT, and
then modified VM XML file as per instructions mentioned below:
<interface type='bridge'>
<mac address='52:54:00:71:b1:b6'/>
<source bridge='br0'/>
<virtualport type='openvswitch'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
This is working now. I tried this one previously, and not working. May be
it messed up with some thing!!
Thanks for all your inputs. I thought that I can go with my old setup
(ubuntu 12.04 with brcompat module with ovs 1.9.3: it was working well).
On Mon, Oct 5, 2015 at 9:51 PM, Scott Lowe <scott.lowe at scottlowe.org> wrote:
> Please see my response below.
>
> Ramana Reddy <gtvrreddy at gmail.com> wrote:
>
> > Hi all,
> >
> > I installed a VM in NAT mode using virt-manager and edited the xml file
> as per the
> > instructions given in this link:
> >
> >
> http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL.Libvirt;hb=HEAD
> >
> > Basically It tells the following modofications:
> > And change it to something like this:
> >
> > ...
> > <interface type='bridge'>
> > <mac address='52:54:00:71:b1:b6'/>
> > <source bridge='ovsbr'/>
> > <virtualport type='openvswitch'/>
> > <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
> > </interface>
> > ...
> >
> > After modifications, I started VM. But its throwing the errors: Unable
> to complete install: 'Unable to add bridge br0 port vnet0: Operation not
> supported'
> >
> > I started VM with both virsh start VM and virt-manager, but both are
> giving the same error.
> >
> > Does any one face the same problem. Please help me in this regards.
>
>
>
> Can you share the actual XML you're using (just the network interface
> portion is needed), along with the output of "ovs-vsctl show"?
>
> Also, I (personally) find the easiest way to work with libvirt+KVM+OVS is
> to use a libvirt network wrapped around OVS, as described here:
>
> <http://blog.scottlowe.org/2012/11/07/using-vlans-with-ovs-and-libvirt/>
>
> --
> Scott
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/discuss/attachments/20151006/ac67416b/attachment-0001.html>
More information about the discuss
mailing list