Verifying OpenStack Installation on a Single Node

Getting Started with Napatech Link-Virtualization™ Software

Platform
Napatech SmartNIC
Content Type
Getting Started
Getting Started Guide
Capture Software Version
Link-Virtualization™ Software 4.5

This shows how to access VM instances and perform traffic test after the OpenStack deployment is complete.

Before you begin

  • The OpenStack deployment is complete.
  • Place a VM base image on the target server.

About this task

This is an example of creating and accessing two VM instances to test and verify the OpenStack installation after the installation is done.

Procedure

  1. Create an Openstack image and a network on the host.
    source /root/keystonerc_admin
    
    openstack image create --disk-format qcow2 --container-format bare \
    --public --file ./Fedora-Cloud-Base-33-1.2.x86_64.qcow2 fedora
    
    # Create a flavor with huge pages
    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
    
    # Attach the subnet to the router
    openstack router add subnet router1 subnet1
  2. Create ports and VMs.
    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 \
    --port <port_name> <vm_name>
    For example:
    # Create port10
    openstack port create --network net1 --fixed-ip \
    subnet=subnet1,ip-address=192.1.10.10 --vnic-type virtio-forwarder port10
    
    # Create vm1
    openstack server create --flavor m1.medium --image fedora --port port10 vm1
    openstack server show vm1 -f json
    
    # Create port10
    openstack port create --network net1 --fixed-ip \
    subnet=subnet1,ip-address=192.1.10.20 --vnic-type virtio-forwarder port20
    
    # Create vm2
    openstack server create --flavor m1.medium --image fedora --port port20 vm2
    openstack server show vm2 -f json
  3. Check the status of the VMs.
    openstack server list
    An output example:
    +--------------------------------------+------+--------+------------------+---------+-----------+
    | ID                                   | Name | Status | Networks         | Image   | Flavor    |
    +--------------------------------------+------+--------+------------------+---------+-----------+
    | db615599-e547-43e8-a0d8-99f7b9b8a552 | vm2  | ACTIVE | net1=192.1.10.20 | fedora  | m1.medium |
    | 2931f302-ea1d-49f6-a6ca-2b6558b93445 | vm1  | ACTIVE | net1=192.1.10.10 | fedora  | m1.medium |
    +--------------------------------------+------+--------+------------------+---------+-----------+
    Two VM instances are created in this example.
  4. List the VM instances using virsh.
    virsh list --all
    An output example:
     Id   Name                State
    -----------------------------------
     1    instance-00000001   running
     2    instance-00000002   running
  5. Access the VM instances.
    virsh console <VM instance name>
  6. Compare the MAC addresses of the ports on the host and on the VM instances.
    Execute the following command on the host to get the MAC address of a port.
    openstack port show <port_name> | grep mac_address
    For example:
    openstack port show port10 | grep mac_address
    An output example:
    | mac_address             | fa:16:3e:e8:6c:42 
    Note: The following command must be executed to enable the openstack commands when a new terminal is opened.
    source /root/keystonerc_admin
    Check the MAC address on each VM. For example:
    ip a
    Note: If the IP address is not assigned, configure manually.
    ip a add <ip>/<netmask> dev eth0
    For example:
    ip a add 192.168.1.10/24 dev eth0

    Two VMs should now be connectable via ping.

  7. Test with traffic between two VM instances using iperf3.
    For example:
    # Start iperf3 as a server on one VM
    iperf3 -s
    
    # Start bandwidth test on another VM
    iperf3 -c 192.168.1.X

    where X is the last field of the iperf3 server IP address.