Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

#Check Openstack components on controller & compute :

systemctl | grep -i active | grep -i openstack | wc -l

#Check Openstack version :

openstack --version
Verification on https://docs.openstack.org/releasenotes/python-openstackclient/

#Create flavour :

openstack flavor create --vcpus 2 --ram 2048 --disk 10 test-flavor-2

#Create image

Download the sample image from the below link into the workstation
https://download.cirros-cloud.net/0.5.2/cirros-0.5.2-x86_64-disk.img

openstack image create --file cirros-0.5.2-x86_64-disk.img --disk-format qcow2 --public test-


image-2

#Create network

openstack network create test-net-2

#Create subnet

openstack subnet create --subnet-range 10.2.2.0/24 --network test-net-2 test-subnet-2

#Create security group


openstack security group create test-sec-2
openstack security group rule create --protocol icmp test-sec-2
openstack security group rule create --protocol tcp --dst-port 22 test-sec-2

#Create VM
openstack server create --image test-image-2 --flavor m1.tiny --network test-net-2 --
security-group test-sec-2 test-vm-2

#Create Volume
openstack volume create --size 1 test-volume-2

#Attach Volume to VM
openstack server add volume <VM UUID> <Volume UUID>
For ex -
openstack server add volume d6c5dc0a-89d3-413a-8ccb-b563b6d67820 5fbb4e39-f9e4-
4f06-8830-9db3d8bdbbd6

#List all VMs & their hosts


nova list --all --fields host,name,instance_name

#Login to VM's console (from specific compute)


virsh console <VM instance id>

#Create project & users in that project


openstack project create test-project-1
openstack user create --project test-project-1 --password h0r1z0n test-user-1

#VM live migration


openstack server migrate --live <target compute name> <VM name> --block-migration
For ex -
openstack server migrate --live controller.us-east1-b.c.winter-wonder-329711.internal test-
vm-1 --block-migration

#Check OVS tunnels & ports


ovs-vsctl show

#Check flows of an ovs device


ovs-ofctl dump-flows br-int

#To check the neutron port id (vNIC), IP & MAC details


nova interface-list <VM UUID>

You might also like