Creating Cloud Servers (Virtual Machines)
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.
Creating Cloud Servers in the Control Panel
To create a cloud server in the Cloud platform Control panel:
-
Go to the Servers section and click Create server.
-
Enter the name of your server, specify the pool and pool segment. Names are assigned automatically and can be changed if necessary.
-
Ubuntu is the default image. To change the OS image, click Choose another source. You can choose one of our prebuilt 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 {…}.
-
Select the virtual machine configuration. There are two types of 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 resource ratio.
-
For all server configurations, you can use volume storage – local disk or network volume. If the “Local disk” box is checked, the local disk is specified as the network volume.
-
If a network volume is specified as the system volume, select its type:
- 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.
-
Specify the network volume size.
-
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.
-
To add a network volume, click Add another network volume.
-
Select the type of the subnet to which the server will be connected. If there are subnets in the pool where the server is created, they will be displayed in the list.
For more information about working with networks, such as connecting the server to an external network, see Managing networks.
-
Configure access settings. Assign a root password or add an SSH key for a more secure connection.
-
Click Create.
A new server will appear in the project’s server list.
Getting Ready through Console Clients
Learn more about getting started through Console Clients in the instructions.
You need to select the server image, availability zone, network, and server flavor before creating a cloud server.
Server Image
You can choose one of the default images or upload your own one, learn more in Creating images.
Get a list of all available operating system images by running:
openstack image list --public
The list will look 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 |
| 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
Availability zone is one or more data centers within the same region. Each data center is self-contained, equipped with redundant power and cooling supplies, and has ultra-low latency links for communications.
Servers in different zones can be connected by local networks. The resources available in each zone are determined by the quotas.
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 name of the selected zone.
Viewing Network Information
To view available networks, run the following:
openstack network list
The output will look 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 |
+--------------------------------------+------------------+-----------------------------------------------------+
You can choose a private or public network. You will need to specify the network UUID when creating a new server.
For more information on configuring the created server, for example, connecting a public IP address or port to the server, see Managing networks.
Server Flavor
Server configuration is referred to as flavor in OpenStack terminology.
To create a server, you can:
- choose a flavor with fixed configuration according to the instruction;
- create a custom flavor with the required configuration according to the instruction.
Save the flavor UUID and its name.
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 <volume type>
.<zone name>
zone, for example, fast.ru-2b
.
Proceed to creating a cloud server depending on its type using the instructions below. It will appear in the list of project servers.
Creating a Server with a Boot Local Disk
Through CLI
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 look 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 | |
+-----------------------------+----------------------------------------------------------------+
Through Terraform
You can create a project with a cloud server with a boot local disk using a GitHub example through Terraform. An example of creating multiple cloud servers with a boot local disk in the same network and a network of servers with a load balancer.
Creating a Server with a Boot Network Volume
Through CLI
To create a cloud server with one boot network volume:
- Create a network volume of the required size and type from image (this volume will be automatically assigned as a boot one).
- 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 look 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 look 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 | |
+-----------------------------+--------------------------------------+
Through Terraform
You can create a project with a cloud server with a boot network volume using a GitHub example through Terraform. An example of creating a cloud server with a boot network volume and two ports in different subnets.
Creating a Server with a Boot Local Disk and an Additional Network Volume
Through CLI
- Create an empty network volume of the required size and type.
- 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
Through Terraform
You can create a project with a cloud server with a boot local disk and an additional network volume using a GitHub example through Terraform.
Creating a Server with a Boot Network Volume and an Additional Network Volume
Through CLI
- Create a network volume of the required size and type from image (this volume will be automatically assigned as a boot one).
- Create an empty network volume of the required size and type.
- 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