We describe how to create a network and VMs, and we show the VMs can communicate through the virtual network configured by OpenstackSwitching. We do not describe the details of how to use Openstack. If you are not familiar with Openstack, we recommend to walk through tutorials in Openstack community sites. In this workthrough, we use horizon UI interface for simplicity.
Create four VMs using the network net1 just created above : Compute > Instances > Launch Instance.When a VM is created successfully, you can see that a new port "tapxxxx" for the VM is created in the host. You can check the host of the VM in the menu of admin>system>instances.
$ sudo ovs-vsctl show 1265d109-8a0a-40d5-bfee-f8ee9c7438c1 Manager "ptcp:6640" Bridge br-int Controller "tcp:10.40.101.152:6653" is_connected: true fail_mode: secure Port vxlan Interface vxlan type: vxlan options: {key=flow, remote_ip=flow} Port br-int Interface br-int Port "tap8ee7ff66-af" Interface "tap8ee7ff66-af" |
You can also check that forwarding flow rules for the VM are added in the bridge of the host.
$ sudo ovs-ofctl dump-flows br-int -O openflow13 OFPST_FLOW reply (OF1.3) (xid=0x2): cookie=0x3300004890be8f, duration=4.875s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=40000,udp,tp_src=68,tp_dst=67 actions=CONTROLLER:65535 cookie=0x3900004642a9bd, duration=35.979s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=0 actions=goto_table:1 cookie=0x330000487f4dd5, duration=35.925s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=40000,dl_type=0x88cc actions=CONTROLLER:65535 cookie=0x330000488eb5db, duration=35.926s, table=0, n_packets=243, n_bytes=10206, send_flow_rem priority=40000,arp actions=CONTROLLER:65535 cookie=0x3900004642a9be, duration=35.980s, table=1, n_packets=0, n_bytes=0, send_flow_rem priority=0 actions=drop |
Repeat the process above to create three other VMs as below.
From the Admin>System>Instances menu, you can see the location of the VMs. You can see that VMs have been created alternatively across hosts. If your VMs are created in only one host, then there must be some issues in the other host. Please check the logs of the compute node referring to the Trouble Shooting page in the wiki.