Creating Cloud Servers (Virtual Machines)

Creating Cloud Servers in the Control Panel

To create a cloud server in the selected region, go to the Servers section and click Create server.

Set your virtual machine’s parameters in the new window:

  1. Enter the name of your server, specify the region and zone. Names are assigned automatically and can be changed if necessary.
  2. Select a source for installing the operating system. Ubuntu is the default image. To change the OS image, click Choose another source. You can choose one of our pre-built images, your own image, or a previously created volume or snapshot. You can additionally write a custom script, which will be executed when the system loads, in the User data field when you click {…}.
  3. Configure the virtual machine. There are two types of server configurations:

    • fixed — several configuration lines that offer various processor and RAM combinations. Resource restrictions: up to 36 CPU, 128 RAM depending on the configuration line;
    • custom — free choice of core and RAM number within the resources: 8 CPU, 64 RAM, 512 SSD.
  4. For all server configurations, you can use volume storage – local disk (check the corresponding box) or network volume.

  5. If a network volume is specified as the system volume (the “Local disk” box is not checked), select the type of the network volume:

    • basic — for storing large amounts of data with few read and write operations;
    • fast — faster response time and higher performance compared to basic volumes;
    • universal — for storing virtual machine system volumes.
  6. Specify the network volume size.

  7. If a local disk is specified as the system volume and there is no need for an additional volume, then the network volume can be deleted by clicking Delete volume.

  8. To add an additional network volume, click Add another network volume.

  9. Select the subnet type to add it to the server. Please note that if you already have some subnets in the region where you want to create a server, then these subnets are displayed in the box.

  10. Configure access settings. Assign a root password or add an SSH key for a more secure connection.

  11. Click Create to complete new virtual machine setup.

After this, a new server will appear in the project’s server list. Expand the lower block to manage machine resources, volumes, and ports, access the console, or open the system log.

To create a snapshot, go to the Volumes tab and click Make snapshot.

Note: when working with the console of the selected server, you will not be able to change the password if you use your own or a side image.

Getting Ready to Create a Cloud Server through Console Clients

Learn more about getting started through Console clients in the article.

You need to select the server image, availability zone, network, and server flavor before creating a cloud server.

Server Image

Get a list of all available operating system images by running:

openstack image list --public

The final list will be as follows:

+--------------------------------------+--------------------------------------------+--------+
| ID                                   | Name                                       | Status |
+--------------------------------------+--------------------------------------------+--------+
| 771635f4-7604-4c1c-abd6-8934237d8816 | CentOS 7 64-bit                            | active |
| 0cd42521-8146-4488-967b-da6f6d15f156 | CentOS 7 Minimal 64-bit                    | active |
| ad82e097-d786-4201-a637-5a50abe95483 | CentOS 8 64-bit                            | active |
| 3b7d0b97-e808-45e4-877f-4b8801563497 | CoreOS                                     | active |
| cf7e6a23-bd30-4cad-98e5-88d0ede05954 | Debian 10 (Buster) 64-bit                  | active |
| 82ed4d6d-ca96-4736-beb3-3ad56f3c3a62 | Debian 8 (Jessie) 64-bit                   | active |
| 145e6700-8f6b-40ac-91d4-102d156aa9d0 | Debian 9 (Stretch) 64-bit                  | active |
| cf67b80c-9c08-439e-97f3-4c12bbc25feb | Fedora 28 64-bit                           | active |
| 37221cd3-f636-40e8-9624-f493a0e148df | Fedora 29 64-bit                           | active |
| 2b87f642-b581-43c1-9b84-46969d6199b6 | Fedora 30 64-bit                           | active |
| 694f5167-67d1-426f-808b-6606ebc14566 | Fedora 31 64-bit                           | active |
| 05372e42-e654-4349-865d-cd941f257e65 | Fedora Atomic 27 64-bit                    | active |
| e95f07cd-fcce-4813-88ca-50dfc6a60a66 | Fedora Atomic 28 64-bit                    | active |
| d0ebf434-cb62-4168-a3f1-1ea17a0a586a | Fedora Atomic 29 64-bit                    | active |
| bd6035e9-6813-44cf-b121-7a03b72a6f8f | RancherOS                                  | active |
| 1da506f9-1afa-4258-8049-9adc6988b5cb | Ubuntu 16.04 LTS 64-bit                    | active |
| 266e724e-d6a8-4b6e-86b8-9d634abe057b | Ubuntu 16.04 LTS GPU Drivers 64-bit        | active |
| c5c8d3cc-9a2c-48ce-adfe-93e066e9ae6e | Ubuntu 18.04 LTS 64-bit                    | active |
| 7d93991b-aa64-41de-a728-8d08018553cf | Ubuntu 18.04 LTS GPU Drivers 64-bit        | active |
| ca311e9f-943c-4ebb-849c-002b04962b4c | Ubuntu 20.04 LTS 64-bit                    | active |
| da041a03-7ae8-405f-bcd7-072f9fede164 | Windows Server 2012 R2 Standard            | active |
| d8735845-de63-4202-983e-c618888ccd08 | Windows Server 2016 Standard               | active |
| 568685fa-573b-48f5-971a-8162c9016c19 | Windows Server 2016 Standard (GPU Drivers) | active |
| 87bf1e26-5cb3-4d89-93eb-c094e1bffa62 | Windows Server 2019 Standard Legacy BIOS   | active |
| 8cd12e23-a228-4dbb-864f-319e80a8dd44 | blank-simple-image                         | active |
| bac517e3-6b48-47cf-8135-a3189785e539 | selectel-rescue-initrd                     | active |
| 1e3206a6-9e37-4d69-9733-855ade507782 | selectel-rescue-kernel                     | active |
+--------------------------------------+--------------------------------------------+--------+

To view information about the image by its UUID, run the following:

openstack image show <UUID image>

To view information about the image by its name, run the following:

openstack image show <image name>

After selecting the required image, copy its ID (you will need it when creating the server).

Availability Zones

One or more zones may be available in one region. Each zone is a set of virtualization and data storage servers hosted on separate racks. Servers in different zones can be connected by local networks. The resources available in each zone are determined by the zone quota, which is managed from the project management panel.

openstack availability zone list --compute

The list of availability zones is as follows:

+-----------+-------------+
| Zone Name | Zone Status |
+-----------+-------------+
|   ru-1a   |  available  |
|   ru-1b   |  available  |
+-----------+-------------+

Save the selected zone name.

Viewing Network List

To view the list of available networks, run the following:

openstack network list

The list of available network is as follows:

+--------------------------------------+------------------+-----------------------------------------------------+
| id                                   | name             | subnets                                             |
+--------------------------------------+------------------+-----------------------------------------------------+
| 1c037362-487f-4103-a73b-6cba3f5532dc | nat              | b7be542a-2eef-465e-aacd-34a0c83e6afa 192.168.0.0/24 |
| ab2264dd-bde8-4a97-b0da-5fea63191019 | external-network | 102a9263-2d84-4335-acfb-6583ac8e70aa                |
|                                      |                  | aa9e4fc4-63b0-432e-bcbd-82a613310acb                |
| fce90252-7d99-4fc7-80ae-ef763d12938d | newnetwork       | 5a1a68f9-b885-47b7-9c7e-6f0e08145e3b 192.168.1.0/24 |
+--------------------------------------+------------------+-----------------------------------------------------+

Each network has a unique identification number (ID column). You will have to specify it when creating a new server.

Server Flavors

Server configuration is referred to as flavor in OpenStack terminology.

To create a server, you can choose a flavor with fixed configuration or create a custom flavor with the required resources.

Flavors with Fixed Configurations

You can view the list of default flavors with fixed configurations by running the following:

openstack flavor list --public

The output will be as follows:

+-------+------------------+--------+------+-----------+-------+-----------+
| ID    | Name             |    RAM | Disk | Ephemeral | VCPUs | Is Public |
+-------+------------------+--------+------+-----------+-------+-----------+
| 1     | m1.tiny          |    512 |    0 |         0 |     1 | True      |
| 2     | m1.small         |   2048 |    0 |         0 |     1 | True      |
| 3     | m1.medium        |   4096 |    0 |         0 |     2 | True      |
| 4     | m1.large         |   8192 |    0 |         0 |     4 | True      |
| 5     | m1.xlarge        |  16384 |    0 |         0 |     8 | True      |
| 1011  | SL1.1-1024       |   1024 |    0 |         0 |     1 | True      |
| 1012  | SL1.1-2048       |   2048 |    0 |         0 |     1 | True      |
| 1013  | SL1.2-4096       |   4096 |    0 |         0 |     2 | True      |
| 1014  | SL1.2-8192       |   8192 |    0 |         0 |     2 | True      |
| 1015  | SL1.4-16384      |  16384 |    0 |         0 |     4 | True      |
| 1016  | SL1.6-32768      |  32768 |    0 |         0 |     6 | True      |
| 1017  | SL1.8-32768      |  32768 |    0 |         0 |     8 | True      |
| 1311  | SL1.1-1024-8     |   1024 |    8 |         0 |     1 | True      |
| 1312  | SL1.1-2048-16    |   2048 |   16 |         0 |     1 | True      |
| 1313  | SL1.2-4096-32    |   4096 |   32 |         0 |     2 | True      |
| 1314  | SL1.2-8192-64    |   8192 |   64 |         0 |     2 | True      |
| 1315  | SL1.4-16384-128  |  16384 |  128 |         0 |     4 | True      |
| 1316  | SL1.6-32768-256  |  32768 |  256 |         0 |     6 | True      |
| 1317  | SL1.8-32768-384  |  32768 |  384 |         0 |     8 | True      |

Flavors with the:

  • SL1.XX name type — Standard Line;

  • CPU1.XX name type — CPU Line;

  • RAM1.XX name type — Memory Line.

Learn more about the cloud servers with fixed resource configurations.

Please note that the m1.XX flavors are the basic ones in the OpenStack examples, similar to the custom servers in the Control panel.

Choose a flavor and save its ID and name.

Creating a Flavor with Custom Configuration

You can create a flavor of the required server configuration by running the following:

openstack flavor create --private --vcpus <num-cpu> --ram <size-mb> --disk <size-gb> <flavor-name>

The flavor name must be unique and not match other flavor names (including the deleted flavors).

Server configuration ID will be generated:

+----------------------------+--------------------------------------+
| Field                      | Value                                |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled   | False                                |
| OS-FLV-EXT-DATA:ephemeral  | 0                                    |
| availability_zones         | [u'ru-1a']                           |
| disk                       | 0                                    |
| extra_specs                | {}                                   |
| id                         | 7e652f6c-a326-4e23-8b01-017194cc3024 |
| name                       | flavor-name                          |
| os-flavor-access:is_public | False                                |
| properties                 |                                      |
| ram                        | 1                                    |
| rxtx_factor                | 1.0                                  |
| swap                       |                                      |
| vcpus                      | 1                                    |
+----------------------------+--------------------------------------+

Save the generated server configuration ID.

Viewing Network Volume Types

You need to select the network volume type to create a server with the network volume.

The list of available volume types can be viewed by running the following:

openstack volume type list

The list of available volume types is as follows:

+--------------------------------------+-----------------+-----------+
|                  ID                  |       Name      | Is_Public |
+--------------------------------------+-----------------+-----------+
| 00a8c3b9-715e-438b-845c-89fbc1e9e62b |    fast.ru-1b   |   True   |
| 27c66842-2b9f-4d71-a957-383ca5ee19c4 |    fast.ru-1a   |   True   |
| 2c9a6741-5901-40ff-ba67-4a7e70ad7563 | universal.ru-1a |   True   |
| 48f5caf9-9bc9-49ed-bdf5-0b29c544b0b0 | universal.ru-1b |   True   |
| 9c535a8c-cce1-4780-95bf-76c68b99c52f |     iso.ru-1a   |   True   |
| c7f1cda0-ebcb-4711-8f50-e13e6e4fc9eb |   basic.ru-1b   |   True   |
| ea11f5ad-baeb-461e-9769-47facee5dbcd |   basic.ru-1a   |   True   |
+--------------------------------------+-----------------+-----------+

For server volumes, use the fast, basic, and universal types in the required . zone, for example, fast.ru-2b.

Proceed to create a server — based on Linux or Windows. Server creation depends on the volume type. You can create a server with:

  • a boot local disk;
  • a boot network volume;
  • a boot local disk and an additional network volume;
  • a boot network volume and an additional network volume.

After creating, the new server will appear in the list of project servers.

Linux Example with a Boot Local Disk

To create a cloud server with a boot local disk, specify the availability zone, the name of the selected flavor, the network, and the name of the image from which you want to create the server, for example:

openstack server create \
          --availability-zone ru-2b \
          --flavor SL1.1-1024-8 \
          --nic net-id=net_name \
          --image 'Ubuntu 18.04 LTS 64-bit' \
    test-srv-with-boot-local

The output will be as follows:

+-----------------------------+----------------------------------------------------------------+
| Field                       | Value                                                          |
+-----------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig           | MANUAL                                                         |
| OS-EXT-AZ:availability_zone | ru-2b                                                          |
| 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                   |                                                                |
| config_drive                |                                                                |
| created                     | 2020-04-28T03:34:29Z                                           |
| flavor                      | SL1.1-1024-8 (1311)                                            |
| hostId                      |                                                                |
| id                          | 980f8c19-3974-466e-803e-9239c8a8a14f                           |
| image                       | Ubuntu 18.04 LTS 64-bit (c5c8d3cc-9a2c-48ce-adfe-93e066e9ae6e) |
| key_name                    | None                                                           |
| name                        | test-srv-with-boot-local                                       |
| progress                    | 0                                                              |
| project_id                  | 04d92ef9fe254caaa90d6ecd2849c1cf                               |
| properties                  |                                                                |
| security_groups             | name='default'                                                 |
| status                      | BUILD                                                          |
| updated                     | 2020-04-28T03:34:29Z                                           |
| user_data                   | None                                                           |
| user_id                     | d38f8bea67f94083803c5066f458664a                               |
| volumes_attached            |                                                                |
+-----------------------------+----------------------------------------------------------------+

Linux Example with a Boot Network Volume

To create a cloud server with one boot network volume:

  1. Create a network volume of the required size and type from image (this volume will be automatically assigned as a boot one).
  2. Create a server from this volume. Specify the flavor name and the network.

Example of creating a network volume:

openstack volume create --image 'Ubuntu 18.04 LTS 64-bit' --size 5 --type fast.ru-2b BOOT_VOLUME_NAME

The output will be as follows:

+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| attachments         | []                                   |
| availability_zone   | ru-2b                                |
| bootable            | false                                |
| consistencygroup_id | None                                 |
| created_at          | 2020-04-28T03:29:57.000000           |
| description         | None                                 |
| encrypted           | False                                |
| id                  | 3b447abb-a4ff-4f02-baac-a6f7a02bd21e |
| multiattach         | False                                |
| name                | BOOT_VOLUME_NAME                     |
| properties          |                                      |
| replication_status  | None                                 |
| size                | 5                                    |
| snapshot_id         | None                                 |
| source_volid        | None                                 |
| status              | creating                             |
| type                | fast.ru-2b                           |
| updated_at          | None                                 |
| user_id             | d38f8bea67f94083803c5066f458664a     |
+---------------------+--------------------------------------+

Example of creating a server from network volume:

openstack server create \
          --availability-zone ru-2b \
          --flavor SL1.1-1024 \
          --nic net-id=net_name \
          --volume BOOT_VOLUME_NAME \
    test-srv-with-boot-net-volume

The output will be as follows:

+-----------------------------+--------------------------------------+
| Field                       | Value                                |
+-----------------------------+--------------------------------------+
| OS-DCF:diskConfig           | MANUAL                               |
| OS-EXT-AZ:availability_zone | ru-2b                                |
| 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                   |                                      |
| config_drive                |                                      |
| created                     | 2020-04-28T03:33:32Z                 |
| flavor                      | SL1.1-1024 (1011)                    |
| hostId                      |                                      |
| id                          | 112f9304-4a70-428f-b588-05d61436f9d8 |
| image                       |                                      |
| key_name                    | None                                 |
| name                        | test-srv-with-boot-net-volume        |
| progress                    | 0                                    |
| project_id                  | 04d92ef9fe254caaa90d6ecd2849c1cf     |
| properties                  |                                      |
| security_groups             | name='default'                       |
| status                      | BUILD                                |
| updated                     | 2020-04-28T03:33:31Z                 |
| user_data                   | None                                 |
| user_id                     | d38f8bea67f94083803c5066f458664a     |
| volumes_attached            |                                      |
+-----------------------------+--------------------------------------+

Linux Example with a Boot Local Disk and an Additional Network Volume

  1. Create an empty network volume of the required size and type.
  2. Create a server from flavor. Specify the availability zone, network, network volume name, and the name of the image from which you want to create the server.

Example:

openstack volume create --size 20 --type fast.ru-2b ADD_VOLUME_NAME

openstack server create \
          --availability-zone ru-2b \
          --flavor SL1.1-1024-8 \
          --nic net-id=net_name \
          --block-device-mapping vdb=ADD_VOLUME_NAME \
          --image 'Ubuntu 18.04 LTS 64-bit' \
    test-srv-with-boot-local-add-volume

Linux Example with a Boot Network Volume and an Additional Network Volume

  1. Create a network volume of the required size and type from image (this volume will be automatically assigned as a boot one).
  2. Create an empty network volume of the required size and type.
  3. Create a server from this volume.

Example:

openstack volume create --image 'Ubuntu 18.04 LTS 64-bit' --size 5 --type fast.ru-2b  BOOT_VOLUME_NAME

openstack volume create --size 20 --type fast.ru-2b ADD_VOLUME_NAME

openstack server create \
          --availability-zone ru-2b \
          --flavor SL1.1-1024 \
          --nic net-id=net_name \
          --block-device-mapping vdb=ADD_VOLUME_NAME \
          --volume BOOT_VOLUME_NAME \
    test-srv-with-boot-net-volume-add-volume

Windows Example with a Boot Local Disk

Example of creating a Windows-based cloud server with a local disk:

openstack server create \
          --availability-zone ru-2b \
          --flavor SL1.2-4096-32 \
          --nic net-id=net_name \
          --nic net-id=license_windows_2016_standard \
          --property admin_pass='qwerty' \
          --image 'Windows Server 2016 Standard' \
    test-win-with-boot-local

Windows Example with a Boot Network Volume

Example of creating a Windows-based cloud server with a network volume:

openstack volume create --image 'Windows Server 2016 Standard' --size 32 --type fast.ru-2b  WIN_BOOT_VOLUME_NAME

openstack server create \
          --availability-zone ru-2b \
          --flavor SL1.1-4096 \
          --nic net-id=net_name \
          --nic net-id=license_windows_2016_standard \
          --property admin_pass='qwerty' \
          --volume WIN_BOOT_VOLUME_NAME \
    test-win-with-boot-net-volume

Restoring a Network with Licenses

When deploying a Windows-based server from image or when deleting a licensed subnet, you can restore it as follows (before that, you must allocate licenses in the project):

openstack server add network test-win-with-boot-net-volume license_windows_2016_standard