lost and found ( for me ? )

Fedora 21 : install openvswitch (OVS) and configure internal bridge


install openvswitch via yum and start the OVS.
# yum install openvswitch

# systemctl status openvsiwtch.service
* openvsiwtch.service
  Loaded: not-found (Reason: No such file or directory)
  Active: inactive (dead)

# systemctl start openvswitch.service

# systemctl status openvswitch.service
* openvswitch.service - Open vSwitch
  Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; disabled)
  Active: active (exited) since Wed 2015-01-14 01:20:45 JST; 1min 57s ago
 Process: 11536 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 11536 (code=exited, status=0/SUCCESS)
  CGroup: /system.slice/openvswitch.service

# systemctl enable openvswitch.service
Created symlink from /etc/systemd/system/multi-user.target.wants/openvswitch.service to /usr/lib/systemd/system/openvswitch.service.

# ovs-vsctl show
   ovs_version: "2.3.1"

add a bridge
# ovs-vsctl add-br ovsbr0

# ovs-vsctl show
   Bridge "ovsbr0"
       Port "ovsbr0"
           Interface "ovsbr0"
               type: internal
   ovs_version: "2.3.1"

add an interface to VMs.
virsh edit <VM>
   <interface type='bridge'>
     <source bridge='ovsbr0'/>
     <virtualport type='openvswitch'>

start VMs.
# virsh start ubuntu1404-vm2
Domain ubuntu1404-vm2 started

# virsh start ubuntu1404-vm3
Domain ubuntu1404-vm3 started

# ovs-vsctl show
   Bridge "ovsbr0"
       Port "ovsbr0"
           Interface "ovsbr0"
               type: internal
       Port "vnet10"
           Interface "vnet10"
       Port "vnet7"
           Interface "vnet7"
   ovs_version: "2.3.1"

VM1 ( ) -- OVS -- VM2 (

confirm that each VM can communicate with the other.

send ping to VM2 from VM1.
# ping -c 1
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=1.01 ms

--- ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.011/1.011/1.011/0.000 ms

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.