Skip to content

Create your first Linux instance

You have created an Infomaniak Public Cloud project and sourced your credentials ? Then you are ready to create your first Linux instance !

Create a keypair

A keypair is basically a ssh key allowing you to login to your instance.

You can either import your existing ssh key or create a new one. You can refer to this guide

Create an instance

Choose a flavor

$ openstack flavor list
+--------------------------------------+----------------------------+------+------+-----------+-------+-----------+
| ID                                   | Name                       |  RAM | Disk | Ephemeral | VCPUs | Is Public |
+--------------------------------------+----------------------------+------+------+-----------+-------+-----------+
| 21aad244-a330-4e79-ba80-4c057cf742f9 | a1-ram2-disk20-perf1       |  2048 |   20 |         0 |     1 | True     |
| 7918af3e-aa2a-4aa4-976d-9056490a4654 | a4-ram8-disk20-perf1       |  8192 |   20 |         0 |     4 | True     |
| a1d6e394-e4db-486b-8091-5d95cfbf3952 | a12-ram24-disk20-perf1     | 24576 |   20 |         0 |    12 | True     |
| a35c6646-0f3c-464b-b50d-2a76cad0bd7b | a16-ram32-disk20-perf1     | 32768 |   20 |         0 |    16 | True     |
...
| b6b7baeb-2328-48c9-8543-88cccec8ec4b | a2-ram4-disk20-perf1       |  4096 |   20 |         0 |     2 | True     |
| cd0483a8-ca2a-466b-89b2-f8d0d005408a | a8-ram16-disk20-perf1      | 16384 |   20 |         0 |     8 | True     |
+--------------------------------------+----------------------------+------+------+-----------+-------+-----------+

Choose an image (Operating System)

$ openstack image list
+--------------------------------------+-----------------------------------------------+--------+
| ID                                   | Name                                          | Status |
+--------------------------------------+-----------------------------------------------+--------+
| 097480e6-16bc-4a50-a7af-e34399d039ac | cirros-0.3.4                                  | active |
| 735a5c16-56f0-4c15-80e7-49056dbc4f71 | Debian 10.10 buster                           | active |
| 49f425ed-bf79-46ab-8cf3-44935d9d831e | Debian 11 bullseye                          | active |
...
| daf43e02-f59e-45bb-8d63-436094d3f360 | Ubuntu 21.04                                  | active |
+--------------------------------------+-----------------------------------------------+--------+

Create your instance

$ openstack server create --image "Debian 11 bullseye" --flavor a2-ram4-disk20-perf1 --key-name mykeypair --network ext-net1 infomaniak-vm-1
+-----------------------------+------------------------------------------------------------------------+
| Field                       | Value                                                                  |
+-----------------------------+------------------------------------------------------------------------+
| OS-DCF:diskConfig           | MANUAL                                                                 |
| OS-EXT-AZ:availability_zone |                                                                        |
| OS-EXT-STS:power_state      | NOSTATE                                                                |
| OS-EXT-STS:task_state       | scheduling                                                             |
| OS-EXT-STS:vm_state         | building                                                               |
| OS-SRV-USG:launched_at      | None                                                                   |
| OS-SRV-USG:terminated_at    | None                                                                   |
| accessIPv4                  |                                                                        |
| accessIPv6                  |                                                                        |
| addresses                   |                                                                        |
| adminPass                   | mii5bBNRGRF6                                                           |
| config_drive                |                                                                        |
| created                     | 2021-02-24T15:51:17Z                                                   |
| flavor                      | a2-ram4-disk20-perf1 (b6b7baeb-2328-48c9-8543-88cccec8ec4b)            |
| hostId                      |                                                                        |
| id                          | 5bf0ebf6-825d-4879-b4b8-90245ec4dc19                                   |
| image                       | Debian 11 bullseye                                                |
| key_name                    | mykeypair                                                              |
| name                        | infomaniak-vm-1                                                        |
| progress                    | 0                                                                      |
| project_id                  | ac4fafd60021431585bbb23470119557                                       |
| properties                  |                                                                        |
| security_groups             | name='default'                                                         |
| status                      | BUILD                                                                  |
| updated                     | 2021-02-24T15:51:17Z                                                   |
| user_id                     | b1580497f51e4d10b9110c60c154562c                                       |
| volumes_attached            |                                                                        |
+-----------------------------+------------------------------------------------------------------------+

Check your instance is active

$ openstack server show infomaniak-vm-1
+-----------------------------+------------------------------------------------------------------------+
| Field                       | Value                                                                  |
+-----------------------------+------------------------------------------------------------------------+
| OS-DCF:diskConfig           | MANUAL                                                                 |
| OS-EXT-AZ:availability_zone | b10                                                                    |
| OS-EXT-STS:power_state      | Running                                                                |
| OS-EXT-STS:task_state       | None                                                                   |
| OS-EXT-STS:vm_state         | active                                                                 |
| OS-SRV-USG:launched_at      | 2021-02-24T15:51:27.000000                                             |
| OS-SRV-USG:terminated_at    | None                                                                   |
| accessIPv4                  |                                                                        |
| accessIPv6                  |                                                                        |
| addresses                   | ext-net1=2001:1600:115:1::3d8, 195.15.242.18                           |
| config_drive                |                                                                        |
| created                     | 2021-02-24T15:51:17Z                                                   |
| flavor                      | a2-ram4-disk20-perf1 (b6b7baeb-2328-48c9-8543-88cccec8ec4b)            |
| hostId                      | 1baedae8de146b81f259cfec3cf33fcae980bb274f8fef46a5f49ba9               |
| id                          | 5bf0ebf6-825d-4879-b4b8-90245ec4dc19                                   |
| image                       | Debian 11 bullseye                                                |
| key_name                    | mykeypair                                                              |
| name                        | infomaniak-vm-1                                                        |
| progress                    | 0                                                                      |
| project_id                  | ac4fafd60021431585bbb23470119557                                       |
| properties                  |                                                                        |
| security_groups             | name='default'                                                         |
| status                      | ACTIVE                                                                 |
| updated                     | 2021-02-24T15:51:27Z                                                   |
| user_id                     | b1580497f51e4d10b9110c60c154562c                                       |
| volumes_attached            |                                                                        |
+-----------------------------+------------------------------------------------------------------------+

Firewall

By default, no incoming traffic is allowed to your instance but the outgoing traffic is allowed.

To allow the SSH connection you have to add a rule to the default security group this way :

openstack security group rule create --ingress --protocol tcp --dst-port 22 --ethertype IPv4 default

More information is available here

Create an instance d_i_1.png

Name your instance

d_i_2.png

Choose an image (Operating System)

d_i_3.png

Choose a flavor

d_i_4.png

Select a network

d_i_5.png

Add a security group

d_i_6.png

Add your key pair and launch your instance

d_i_7.png

Check your instance

d_i_8.png

SSH your instance

ssh debian@195.15.242.18