This shows how to create and access VM instances on multiple nodes and perform traffic test after the OpenStack deployment is complete.
About this task
This procedure is an example of creating and running VXLAN/VLAN tunneled VMs with OpenStack.
Before you begin
Procedure
-
On the controller node, source the keystonerc_admin file to be
able to access the openstack command.
source /root/keystonerc_admin
-
Create an OpenStack image.
For example:
openstack image create --disk-format qcow2 --container-format bare --public \ --file ./Fedora-Cloud-Base-33-1.2.x86_64.qcow2 fedora_cloud_qcow
List images to ensure the image was created successfully.openstack image list
An output example:+--------------------------------------+-------------------+--------+ | ID | Name | Status | +--------------------------------------+-------------------+--------+ | ad51c574-a14b-4127-ad47-5bcc429fab40 | fedora_cloud_qcow | active | +--------------------------------------+-------------------+--------+
-
Create a flavor with huge pages support.
openstack flavor set m1.medium --property hw:mem_page_size=large
-
Create a network.
openstack network create net1 --disable-port-security # Create a subnet openstack subnet create subnet1 --network net1 \ --subnet-range 192.1.10.0/24 # Create a router openstack router create router1 # Add the subnet to the router openstack router add subnet router1 subnet1
-
Create a port and a VM on each compute node.
openstack port create --network net1 --fixed-ip \ subnet=subnet1,ip-address=<VM IP> --vnic-type virtio-forwarder <port_name> openstack server create --flavor m1.medium --image fedora_cloud_qcow \ --availability-zone ::<compute-host-name> --port <port_name> <vm_name>
For example:openstack port create --network net1 --fixed-ip \ subnet=subnet1,ip-address=192.1.10.10 --vnic-type virtio-forwarder port10 openstack server create --flavor m1.medium --image fedora_cloud_qcow \ --availability-zone ::cmp79 --port port10 vm1 openstack server show server10 -f json
Check whether the server is created successfully.openstack server list
-
Log in to compute node 0.
# Run command to list running VMs virsh list --all # Access the VM. virsh console <VM instance name> # From the VM command line, ping the VM on compute node 1 ping 192.1.10.11
Note: If the network interface does not have an IP address, configure manually.# Stop NetworkManager before setting an IP manually. systemctl stop NetworkManager ip a add <ip>/<netmask> dev eth0
For example:ip a add 192.1.10.10/24 dev eth0
-
Log in to compute node 1.
# Run command to list running VMs. virsh list --all # Access the VM. virsh console <VM instance name> # Ping from one VM to another VM ping 192.1.10.10
-
Test with traffic between multiple VM guests using iperf3.
# On one VM iperf3 -s # On another VM iperf3 -c <iperf3_server_VM_IP>