Create an interruptible server
carefully
An interruptible server will be stopped by Selectel at any time within 24 hours of creation.
For more information on how interruptible servers work, see the Interruptible Servers instruction.
Control panel
OpenStack CLI
-
In the dashboard, on the top menu, click Products and select Cloud Servers.
-
Click Create Server.
-
In the Advanced Settings block, check the Interruptible Server checkbox.
-
Select the rest of the server settings — see the Create Cloud Server instructions for details.
-
Click Create.
-
Create a cloud server:
openstack server create \
[--image <image> | --volume <volume> | --snapshot <snapshot>] \
--flavor <flavor> \
--availability-zone <pool_segment> \
--nic net-id=<net_uuid> \
--security-group <security_group> \
--key-name <key_name> \
--tag preemptible --os-compute-api-version 2.72 \
<server_name>Specify:
- source type:
--image <image>
— to create a server from off-the-shelf or custom image. Parameter<image>
— ID or name of the image. The list of images can be viewed withopenstack image list
;--volume <volume>
— to create a server from network disk. Parameter<volume>
— ID or disk name. You can view the list of network disks usingopenstack volume list
;--snapshot <snapshot>
— to create a server from snapshot. Parameter<snapshot>
— ID or name of the snapshot. The list of snapshots can be viewed withopenstack snapshot list
;
<flavor>
— The ID or name of the flavor. The flavors correspond to cloud server configurations and determine the number of vCPUs, RAM, and local disk size (optional) of the server. You can use fixed configuration flavors or create a flavor. For example,4011
— ID to create a Memory Line fixed configuration server with 2 vCPUs, 16 GB RAM in a ru-9 pool. You can view the list of flavors usingopenstack flavor list
or in the table List of fixed configuration flavors in all pools;<pool_segment>
— pool segment in which the cloud server will be created, e.g.ru-9a
. The list of available pool segments can be found in the instructions. Availability matrices;<net_uuid>
— ID of the private or public network to which the server will be connected. The list can be viewed withopenstack network list
;<security_group>
— The ID or name of the security group. To create a server with a security group, port security must be enabled on the network. port security. The list of groups can be viewed with the commandopenstack security group list
;<key_name>
— name of the SSH key pair for the service user. If SSH keys are not created, generate them. The list can be viewed withopenstack keypair list
;--tag preemptible --os-compute-api-version 2.72
— tag to create a preemptible server;- optional:
--block-device-mapping vdb=<extra_volume>
— ID or name of the extra disk. The list can be viewed withopenstack volume list
; - optional:
--tag <tag_name> --os-compute-api-version 2.52
— tag to add more information about the server; - optional:
--user-data <user_data.file>
— path to the script with Base64 encoded data. Scripts and tasks from the script will be executed at the first boot of the operating system. Examples of scripts can be found in the User data instruction; <server_name>
— server name.
- source type: