Instance: create

The creation of a virtual machine can be done using the Horizon Dashboard, using the Command Line Interface or with customized Ansible and Terraform scripts to automate the process (Declarative and procedural approaches to IaC). You are free to choose any of these methods. However, there are a few mandatory steps that must be followed before creating a virtual machine.

This page will guide you step by step in the creation of a virtual machine with the Openstack Horizon Dashboard.

Important

Prerequisites: In order to create and boot a virtual machine, you need have already created the following resources

Virtual machine creation

Once you have completed the above steps, you can proceed to create a Virtual Instance. Go to “Compute → Instances” and click on “Launch Instance”.

A pop-up window will appear and you have to fill in the required information in the different tabs.

../../../_images/op_instace_create_img1.png
Details

Under the tab “Details”, you need to insert the instance name and how many copies of this virtual machine you want to create (“count” field).

Source

Under the tab “Source”, you specify if you want to boot your virtual machine form an image/image snapshot or from a volume/volume snapshot. When booting from an image, you are able to decide if you want the virtual machine to be created as “ephemeral” or you want to create a root “bootable volume” contextually to the virtual machine creation (see Compute for more information on bootable and ephemeral instances).

In this section, you also need to choose from the available list which image you would like to use to build your instance. To select the one to be use simply click on the up arrow from the list of available resources.

Flavor and network

Under the respective tabs, you can choose the flavor of the virtual machine, and the network you want the virtual machine connected to. To select the one to be used, simply click on the up arrow from the list of available resources.

Note

The network should have been already created

Security groups and key pair

Under the respective tabs, you can choose the security groups you want to apply to the virtual machine, and the key-pairs you want to use to access. To select the one to be used, simply click on the up arrow from the list of available resources.

Note

The key pair should have been already created

Server groups

Under the “Server Groups” tab you find the options to create the virtual machine under a previously created affinity or anti-affinity group (see Compute for more information on affinity groups).

Once you have setup the preferred configuration, click on “Launch instance” to create your virtual machine.

Warning

Once the instance has been created, it is possible only to modify the security groups and the flavor. If you need to change the network, or the key pair, you will need to create a new instance.

Associate a Floating IP

Once the virtual machine is created, you can associate a floating IP with the virtual machine. For more information on how to associate a floating IP with a virtual machine, refer to the Floating IP: allocate and associate.

Once the floating IP is associated with the virtual machine, you can access the virtual machine using it.

Accessing the instance

Note

If you created an instance using a default image available in the cloud computing, by default it is possible to login into the instance only by using the default user and key.

Suppose you have used the default ubuntu cloud image, you can login as:

$ ssh -i MyKey.pem ubuntu@<floating IP address>