Top OpenStack Interview Questions & Answers 2021



1-What is OpenStack?

OpenStack is a cloud computing project aimed at providing infrastructure as a service (IaaS). OpenStack is a set of software components for managing and building Cloud Computing platforms for private and public clouds. OpenStack is an Open Source Cloud Computing platform.

2-Define OpenStack key components?

the key components of OpenStack
Nova – It handles the Virtual machines at compute level and performs other computing tasks at compute or hypervisor level.
Neutron – It provides the networking functionality to VMs, Compute, and Controller Nodes.
Keystone – It provides the identity service for all cloud users and OpenStack services. In other words, we can say Keystone a method to provide access to cloud users and services.
Horizon – It provides a GUI (Graphical User Interface), using the GUI Admin can all day to day operations task at ease.
Cinder – It provides the block storage functionality Generally, OpenStack Cinder is integrated with Ceph and ScaleIO to service block storage to Compute & Controller nodes.
Swift – It provides object storage functionality. Generally, Glance images are on object storage. External storage like ScaleIO can work as Object storage too and can easily be integrated with Glance Service.
Glance – It provides Cloud image services, using glance admin used to upload and download cloud images.
Heat – It provides an orchestration service or functionality. Using Heat admin can easily VMs as stack and based on requirements VMs in the stack can be scale-in and Scale-out
Ceilometer – It provides telemetry and billing services.

3-What are services generally run on a controller node?

Following services run on a controller node:
Identity Service ( KeyStone)
Image Service ( Glance)
Nova Services like Nova API, Nova Scheduler & Nova DB
Block & Object Service
Ceilometer Service
MariaDB / MySQL and RabbitMQ Service
Management services of Networking (Neutron) and Networking agents
Orchestration Service (Heat)

4-What are the services generally run on a Compute Node?

Following services run on a compute node,
Nova-Compute
Networking Services like OVS
Hypervisor like KVM

5-Tell me the command how to spin a VM from Command Line?

We can easily spin a new VM using the following OpenStack command,
# openstack server create --flavor {flavor-name} --image {Image-Name-Or-Image-ID}  --nic net-id={Network-ID} --security-group {Security_Group_ID} –key-name {Keypair-Name} <VM_Name>

6-How to list the network namespace of a tenant in OpenStack?

The network namespace of a tenant can be listed using “ip net ns” command
# ip netns list 

 7-How to execute a command inside the network namespace in OpenStack?

# ip netns exec {network-space} <command>

8-How to upload and download a cloud image in Glance from the command line?

A Cloud image can be uploaded in a glance from command using OpenStack command,

~# openstack image create --disk-format qcow2 --container-format bare   --public --file {Name-Cloud-Image}.qcow2     <Cloud-Image-Name>

Use below OpenStack command to download a cloud image from the command line,

~# glance image-download --file <Cloud-Image-Name> --progress  <Image-ID>

9- How to reset the error state of a VM into active in OpenStack env?

There are some scenarios where some VMs went to an error state and this error state can be changed into an active state using the below commands,

~# nova reset-state --active {Instance_id}

 10-How to get a list of available Floating IPs from the command line?

Available floating IPs can be listed using the below command,
~]# openstack ip floating list | grep None

11-How to get a list of VMs which are provisioned on a specific Compute node?

#openstack server list –all-projects –long -c Name -c Host | grep -i  {Compute-Node-Name}

12- How to view the console log of an OpenStack instance from the command line?

Console logs of an instance can be viewed from the command line using the following commands,

First, get the ID of an instance and then use the below command,

~# openstack console log show {Instance-id}

 13-How to get the console URL of an OpenStack instance?

Console URL of an instance can be retrieved from the command line using the below OpenStack command,

~# openstack console url show {Instance-id}