• Cloud-Native Container ProductsCloud-Native Container Products
    • KubeSphere Enterprisehot
    • KubeSphere Virtualizationhot
    • KubeSphere Enterprise HCI
  • Cloud-Native ServiceCloud-Native Service
    • KubeSphere Backuphot
    • KubeSphere Litenew
    • KubeSphere Inspectornew
  • Public Cloud Container ServicePublic Cloud Container Service
    • KubeSphere on AWS
    • KubeSphere on DigitalOcean

Get started with a VM

Describes how to get started with a VM.

This topic describes how to get started with a VM in the KubeSphere Virtualization (KSV) web console.

Prerequisites

  • KSV is installed. For information about how to install KSV, see Install KSV in single-node mode and Install KSV in multi-node mode.

  • The user that you use has been granted the permissions to manage VMs. Only user admin, project administrators, and operators can manage VMs. Project viewers can view only VMs in the projects to which they belong.

Step 1: Create a VM

  1. Log in to the KSV web console.

  2. In the top navigation bar, click Virtual Resources to go to the management page of virtual resources.

  3. In the left-side navigation pane, choose VMs > VMs to go to the VM management page.

  4. On the VMs page, click Create and select From Image, From Template, or From VM as needed.

    common:NOTE

    This tutorial describes how to create a VM from an image. For information about how to create a VM from a template or VM, see Create a VM.

  5. In the Basic Info step, configure basic information for the VM, and then click Next.

    ParameterDescription
    Name
    The name of the VM.
    The name can contain only lowercase letters, digits, and hyphens (-), and must start and end with a lowercase letter or a digit. The name can contain up to 16 characters in length.
    Project
    The project in which you want to create the VM.
    Description
    The description of the VM.
    The description can be up to 128 characters in length. The character types are unlimited.
  6. In the Images section of the Configuration step, select the image type of the VM.

    common:NOTE

    • KSV supports images of major Linux distributions, such as Fedora, CentOS, and Ubuntu.

    • You can select System Images, Private Images, or Shared Images to create a VM. For more information about images of different types, see Images.

  7. In the Configuration step, configure the CPU and memory specification for the VM.

    ParameterDescription
    Default N cores N GiB
    By default, the configuration is the same as the configuration defined in the image.
    Standard 2 cores 4 GiB
    2 CPU cores and 4 GiB memory. This configuration can be used for medium-sized business and general data processing.
    Professional 4 cores 8 GiB
    4 CPU cores and 8 GiB memory. This configuration can be used for enterprise business with high concurrency requirements.
    Custom
    The custom CPU and memory configuration.
  8. In the Storage section, configure the system disk and data disks for the VM.

    ParameterDescription
    System Disk
    The custom system disk size must be greater than or equal to the default system disk size of the image.
    Data Disk
    (Optional) The data disk that you want to mount to the VM. You can mount up to 5 data disks to each VM.
  9. In the Login Method section, configure the login method for the VM. You can use a username and its password or an SSH key to log in to the VM.

    ParameterDescription
    Username
    The username for VM login. By default, the value is root.
    Password
    The password for VM login. By default, the value is 123456.
    SSH
    Select SSH to bind an SSH key for VM login. For more information about SSH keys, see View SSH keys.
  10. In the Network section, expand the first drop-down list to specify a network in which the VM resides.

    common:NOTE

    You can create a VM in a physical or virtual subnet. In default settings, a VM created in a physical subnet can access the Internet. If you want to connect to a VM created in a virtual subnet over the Internet, you must associate an EIP with the VM. Otherwise, Internet access is disabled for the VM. For more information about how to enable Internet access for a VM, see Associate an EIP.

  11. In the Network section, expand the second drop-down list to specify a method for IP address allocation.

    ParameterDescription
    Auto-assign
    The system automatically assigns an available IP address to the VM from the IP address segment.
    Manual-assign
    Specify an available IP address from the IP address segment.
  12. In the Summary section on the right side, verify the VM configuration and click OK in the lower-right corner. The VM appears in the VM list after it is created.

Step 2: Associate an EIP with the VM

If the VM is created in a virtual subnet, perform the following steps to associate an elastic IP address (EIP) with the VM. This way, you can enable Internet access for the VM.

  1. In the left-side navigation pane, choose Networks > EIPs to go to the EIP management page.

  2. Find the EIP that you want to associate, click operation-menu on the right side, and then select Associate VM from the drop-down list.

  3. In the dialog box that appears, select the VM that you create in step 1, and click OK. After this step is performed, you can use the EIP to connect to the VM over the Internet.

    common:NOTE

    Each EIP can be associated with one VM. If no EIP is available, you can click Apply in the upper-right corner of the page to apply for an EIP. For more information, see Apply for an EIP.

Step 3: Connect to the VM

  1. In the left-side navigation pane, choose VMs > VMs to go to the VM management page.

  2. On the VMs page, find the VM that you create in step 1 and click 18px next to the VM to open the Terminal.

  3. In the Terminal, enter the username and password to log in to the VM.

    • Username: Enter root.

    • Password: the password that you configure when you create the VM. By default, the value is 123456.

Step 4: Delete the VM

If the VM is no longer needed, you can delete the VM to release resources. The VM data cannot be restored after the VM is deleted.

  1. In the left-side navigation pane, choose VMs > VMs to go to the VM management page.

  2. On the VMs page, find the VM that you create in step 1, click 18px next to the VM, and then select Delete from the drop-down list.

  3. In the dialog box that appears, click OK.

    common:WARNING

    The VM cannot be restored after it is deleted. Exercise caution when you perform this operation.

KubeSphere ®️ © QingCloud Technologies 2022