Customizing Linux CVM Configurations

Last updated: 2020-05-07 09:57:03


Compared with using quick configuration to create a Tencent Cloud Virtual Machine (CVM), custom configuration provides more image platforms and advanced configurations for storage, bandwidth, and security group. You can select the configuration method as needed. This document uses custom configuration as an example.
To create a CVM with quick configuration, refer to Custom Configuration for Linux CVM.

Registration and Verification

Before using the CVM, you need to perform the following operations:

  1. Sign up for a Tencent Cloud account and complete identity verification.
    A new user needs to sign up for an account on the official website of Tencent Cloud. For detailed operations, see Sign Up for a Tencent Cloud Account.
  2. Visit the Tencent CVM Introduction page, click Get Started and “Create”.

Selecting the Model

  1. Configure the following information as prompted by the page:
    Select region and model
    CategoryRequired/OptionalConfiguration Description
    Billing ModeRequiredPlease select based on your actual needs:
    • Pay-as-you-go: an elastic billing method applicable to scenarios such as e-commerce flash sales, where demand will fluctuate significantly in an instant.
    • Spot instance: a new instance operation mode applicable to scenarios such as big data computing and online website service using load balancing. Its general price range is 10% - 20% of a pay-as-you-go instance.
    RegionRequiredWe recommend you select a region closest to your customer to reduce access latency and increase access speed.
    Availability ZoneRequiredSelect a value as needed.
    If you want to purchase multiple CVMs, we recommend you select different availability zones to implement disaster recovery.
    NetworkRequiredLogically isolated network space built in Tencent Cloud. A virtual private cloud (VPC) includes at least one subnet. The system provides a default VPC and subnet for each region.
    If the existing VPC or subnet does not meet your requirements, you can create a VPC or subnet in the VPC console.
    • resources in the same VPC can be shared within the private network.
    • When purchasing the CVM, ensure that the CVM and the subnet where the CVM is created have the same availability zones.
    InstanceRequiredTencent Cloud provides different types of instances based on the underlying hardware. To achieve optimal performance, we recommend you use instances of the latest generation.
    For more information about instances, see Instance Specifications.
    ImageYesTencent Cloud provides public images, custom images, shared images and marketplaces. Select an appropriate type by referring to Image Types.
    For users who just started using Tencent Cloud, we recommend public images.
    System DiskRequiredUsed to install the operating system. Its capacity is 50 GB by default.
    Available disk types vary by regions. Select as instructed by the page.
    For more information about CBS, see CBS Types.
    Data DiskOptionalUsed to scale up the storage capacity of the CVM to ensure high efficiency and reliability. CBS data disks are not added by default.
    For more information about CBS, see CBS Types.
    Public Network BandwidthRequiredTencent Cloud provides two network billing modes. Select as needed.
    • Bill-by-bandwidth: select a fixed bandwidth. Packet loss occurs when this bandwidth is exceeded. This mode is applicable to scenarios where network connection fluctuates slightly.
    • Bill-by-traffic: billing is based on actual usage. You can specify a maximum bandwidth to prevent being charged for unexpected traffic. Packet loss occurs when the instantaneous bandwidth exceeds this value. This mode is applicable to scenarios where network connection fluctuates significantly.
    Public GatewayOptionalA network interface between the VPC and the Internet. It can forward the requests of CVMs that are within different subnets of the VPC and have no public IP addresses. Please note that Tencent Cloud no longer supports selecting public network gateway configuration on the CVM purchase page after December 6, 2019. If you need it, see Public Gateway to configure by yourself.
    QuantityRequiredThe number of CVMs to be purchased.
    2. Click **Next: Complete Configuration** to open the CVM configuration page.

    Configuring the CVM

    1. Configure the following information as prompted by the page:
      Security group and CVM
      CategoryRequired/OptionalConfiguration Description
      ProjectRequiredThe default project is selected by default. You can select an existing project as needed to manage different CVMs.
      Security GroupRequiredUsed to configure the network access policies for one or more CVMs.
      Ensure that login port 22 is open.For more information, see Security Group.
      Instance NameOptionalThe name of the CVM to be created.
      It is defined by the user. We recommend **CVM-01**.
      Login MethodsRequiredThe method for logging into the CVM. Please select base on your actual needs.
      • Custom Password: customize the password for logging into the instance.
      • SSH Key Pair: associate the instance with a secure shell (SSH) key to ensure secure login.
        If no key is available or existing keys are inapplicable, click **Create Now** to create a key. For more information about SSH keys, see SSH Key.
      • Random Password: An auto-generated password will be sent via Internal Messages.
      Security ServiceOptionalEnabled for free by default to help users build a CVM security protection system against data leakage.
      Cloud MonitoringOptionalEnabled for free by default. It provides comprehensive CVM data monitoring, intelligent data analysis, real-time fault alarms, and custom data reports to help users precisely monitor Tencent Cloud services and the health conditions of CVMs.
      Advanced SettingsOptionalYou can configure additional settings of the instance as needed.
      • Hostname: you can customize the internal computer name for the CVM’s operating system. After a CVM is created, you can log into the CVM to view the hostname.
      • Placement Group: you can add an instance to a placement group as needed to improve service availability. For more information, see Placement Group.
      • Tag: a tag can be configured to manage CVM resources by categories. For more information, see Tag.
      • Custom Data: you can configure an instance by specifying custom data, and the configured scripts will run when an instance is started. If multiple CVMs are purchased at a time, the custom data will run on all CVMs. The Linux operating system supports the Shell format and a maximum of 16 KB raw data. For details, see Custom Data.
        Note: custom data configuration supports only certain public images with the Cloudinit service. For more information, see Cloud-Init.
    2. Click Next: Confirm Configuration to open the configuration information confirmation page.

    Confirming the configuration information

    1. Check the information of the CVM to be purchased and the cost details of each configuration item.
    2. Click Purchase and complete the payment. You can then check your CVM by logging into the CVM Console.
      Information such as the instance name, public IP address, private IP address, login username, and initial login password of the CVM will be sent to your account via Internal Messages. You can log into and manage instances based on the information. To ensure CVM security, change your login password as soon as possible.

    Logging into and connecting the instance

    After completing CVM operations, you can log into your CVM in the Tencent Cloud console, and perform operations such as building a site as needed.
    Select the method for logging into the CVM in the Tencent Cloud console as needed:

    Partitioning and formatting the data disk

    If you added a data disk when selecting the instance type, you need to format and partition the data disk after logging into the CVM instance. If you did not add any data disk, skip this step.
    Select the appropriate operations guide according to the disk capacity and the CVM operating system.

    For more operations, see Initialization Scenarios.