How to create an Instance using OpenStack CLI

Metaverse digital Avatar, Metaverse Presence, digital technology, cyber world, virtual reality
Reading Time: 3 minutes


For creating your OpenStack instance using CLI, you must have installed OpenStack in your system or your machine.

I have successfully installed my OpenStack and you can use this command to see all the information about OpenStack.

sudo snap info microstack

OpenStack Overview :

  • Instance source — It can be an image, block storage volume that contains an image or snapshot.
  • Instance name — The name for your instance.
  • Flavor — The flavor for your instance defines the vCPU and RAM memory limits for instance.
  • Security credentials — Use the credentials to create an instance:
    • keypair — These are SSH credentials that are injected into images when they are launched. For the key pair to be successfully activated. you have already generated a key pair with an external tool. use this instance that belongs in this project.
    • Security group — Defines incoming and outgoing network traffic from the instances. Security groups is a set of firewall policies, known as security group rules.
  • IP addresses — If the need, you can provide a public IP address to a running instance.

Create an instance:

Using some steps/commands to gather the parameters to launch an instance.

The available flavors:

create an instance in OpenStack firstly choose the available flavors list. So you can use this command to see the all available falvours list.

microstack.openstack flavor list


create an instance in OpenStack choose the available Images list. So you can use this command to see the all available images list.

microstack.openstack server list

Security groups:

Use this command to see all the available security groups list.

microstack.openstack security group list

Available key pairs:

Use this command to see all the available key pairs list.

microstack.openstack keypair list

Launch an instance:

Now create an Instance:

  • flavor — m1.large
  • image — ubuntu (e579edda-9972-450f-ac20-d5cb8d5f1d45)
  • keypair — microstack
  • security group — e9cd89d8-ffdd-4712-943e-f7a0ea1cefe1
  • Network Id — ea8d3e99-e555-4854-b461-b6824095898e
  • server name — User Choice

Run this command to create your instance:

microstack.openstack server create --flavor 4 --image e579edda-9972-450f-ac20-d5cb8d5f1d45  --key-name microstack  --security-group e9cd89d8-ffdd-4712-943e-f7a0ea1cefe1 --nic net-id=ea8d3e99-e555-4854-b461-b6824095898e                   myNewInstance

Check if the instance is online or not:

Use the list command to view a list of all instances:

microstack.openstack server list

This is Status, IP addresses, name, id, Image, and Flavor for all instances.