Create a cloud server with an emulated USB drive
You cannot connect a USB drive directly to a cloud server. To connect a USB drive, create a cloud server with a disk emulated as a USB drive.
Connecting a USB drive may be required to import various files to a cloud server. For example, for importing and using cryptographic information protection tools (CIPFs). To connect a USB drive, create a cloud server with a disk emulated as a USB drive.
1. Prepare the file
Prepare the file that you need to import to the cloud server. The preparation process depends on the type of file being imported.
2. Create a USB drive image with the file
Linux
Windows
-
Open the CLI.
-
Create a USB drive image with the prepared file.
dd if=<disk_name> of=<image_name>.iso bs=4MSpecify:
<disk_name>— name of the disk containing the prepared file – source disk;<image_name>— name of the image created from the source disk.
3. Configure OpenStack CLI
Follow the Configure OpenStack CLI using OS tools or Configure OpenStack CLI in a Docker container instructions.
4. Upload the image
Follow the Upload an image from a file instructions.
5. Create a flavor
The flavor will only be available for the project and pool you authenticated to for working with the OpenStack API during OpenStack CLI configuration in step 3.
-
Create a flavor:
openstack flavor create \--private \--vcpus <vcpu> \--ram <ram_size> \--disk <disk_size> \<flavor_name>Specify:
<vcpu>— number of vCPUs;<ram_size>— RAM size in MB;- optional:
<disk_size>— local disk size in GB. To create a flavor with a network disk, the value must be zero; <flavor_name>— flavor name. Must be unique and not match the names of previously deleted flavors. You can view the list of existing flavors using the commandopenstack flavor list.
Example of a configured flavor
A flavor with 2 vCPUs, 2 GB RAM, and a local disk size of 80 GB
openstack flavor create \--private\--vcpus 2\--ram 2048\--disk 80\new_flavor
6. Create a cloud server
-
Create a cloud server:
openstack server create \--image <image> \--flavor <flavor> \--availability-zone <pool_segment> \--nic net-id=<net_uuid> \--security-group <security_group> \--block-device source_type=image,uuid=<uploaded_image>,destination_type=volume,disk_bus=usb,device_type=disk,volume_size=<size> \<server_name>Specify:
<image>— to create a server from a pre-made or custom image. The<image>parameter is the image ID or name. The image must be in the same pool as the server. You can view the list of images usingopenstack image list;<flavor>— flavor ID or name. Flavors correspond to cloud server configurations and determine the number of vCPUs, RAM, and the server local disk size. You can use fixed configuration flavors or create a custom flavor. For example,1015is the ID to create a server with a fixed configuration from the Standard line with 4 vCPUs and 16 GB RAM in the ru-9 pool. You can view the list of flavors using the commandopenstack flavor listor in the table Fixed configuration flavors in all pools;<pool_segment>— pool segment where the cloud server will be created, for exampleru-9a. You can view the list of available pool segments in the Cloud server availability by location guide;<net_uuid>— ID of the private or public network that the server will be connected to. You can view the list of networks using the commandopenstack network list;<security_group>— ID or name of the security group. To create a server with a security group, traffic filtering (port security) must be enabled on the network. You can view the list of groups using the commandopenstack security group list;<uploaded_image>— ID of the uploaded disk image with the prepared file. You can find it in the control panel: in the top menu, click Products → Cloud Servers → Images → on the image card, in the UUID field, click ;<size>— disk size in GB. The minimum disk size must be equal to the source disk size. Consider the network disk limits on maximum size;- optional:
--property x_cloud_smt_enabled=false— disable Hyper-Threading (SMT). If the parameter is not specified, Hyper-Threading (SMT) will be enabled by default. Can only be used with flavors that support dedicated cores. You can view the list of flavors in the table Fixed configuration flavors in all pools; - optional:
--property x_cloud_numa_nodes=1— allocate resources on a single NUMA node. Can only be used with flavors that support dedicated cores. You can view the list of flavors in the table Fixed configuration flavors in all pools; <server_name>— server name.