• 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

Create a VM

Describes how to create a VM in the KSV web console.

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

Prerequisites

  • Make sure the number of VMs you want to create does not exceed the resource quota of your KSV cluster. KSV Basic Edition allows you to create up to nine VMs. If you create a VM after the resource quota has been reached, the VM will be locked. If you want to create more VMs, we recommend that you purchase the Developer or Enterprise Edition. For more information about editions and resource quotas, see Editions.

  • 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.

KSV provides the following methods to create a VM:

Create a VM from an image

  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. The page for creating a VM appears.

  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 section, 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.

Create a VM from a template

  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 Template. The page for creating a VM appears.

  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 Select Template section, select a template in the project to create a VM.

    ParameterDescription
    Name
    The custom name of the template.
    ID
    The universally unique identifier (UUID) of the template in the system. The UUID is automatically assigned by the system.
    OS
    The OS of the VM defined in the template. You can place the cursor on the OS to view the specific type and version of the OS.
    CPU
    The CPU cores of the VM defined in the template.
    Memory
    The memory size of the VM defined in the template.
    System Disk
    The system disk size of the VM defined in the template.
  7. In the Configuration section, configure the CPU and memory specification for the VM.

    ParameterDescription
    CPU
    The CPU cores that can be used for the VM.
    Memory
    The memory size that can be used for the VM.
  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.

Create a VM from another 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 VM. The page for creating a VM appears.

  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 VMs section of the Configuration step, select an existing VM in the project to create a VM.

    ParameterDescription
    Name
    The custom name of the VM.
    ID
    The UUID of the VM in the system. The UUID is automatically assigned by the system.
    OS
    The OS of the VM. You can place the cursor on the OS to view the specific type and version of the OS.
    IP Address
    The IP address of the source VM.
  7. 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.
  8. 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.
  9. 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.

  10. 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.
  11. 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.

KubeSphere ®️ © QingCloud Technologies 2022