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
Log in to the KSV web console.
In the top navigation bar, click Virtual Resources to go to the management page of virtual resources.
In the left-side navigation pane, choose VMs > VMs to go to the VM management page.
On the VMs page, click Create and select From Image. The page for creating a VM appears.
In the Basic Info step, configure basic information for the VM, and then click Next.
Parameter Description NameThe 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.ProjectThe project in which you want to create the VM.DescriptionThe description of the VM.The description can be up to 128 characters in length. The character types are unlimited.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.
In the Configuration section, configure the CPU and memory specification for the VM.
Parameter Description Default N cores N GiBBy default, the configuration is the same as the configuration defined in the image.Standard 2 cores 4 GiB2 CPU cores and 4 GiB memory. This configuration can be used for medium-sized business and general data processing.Professional 4 cores 8 GiB4 CPU cores and 8 GiB memory. This configuration can be used for enterprise business with high concurrency requirements.CustomThe custom CPU and memory configuration.In the Storage section, configure the system disk and data disks for the VM.
Parameter Description System DiskThe 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.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.
Parameter Description UsernameThe username for VM login. By default, the value is root.PasswordThe password for VM login. By default, the value is 123456.SSHSelect SSH to bind an SSH key for VM login. For more information about SSH keys, see View SSH keys.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.
In the Network section, expand the second drop-down list to specify a method for IP address allocation.
Parameter Description Auto-assignThe system automatically assigns an available IP address to the VM from the IP address segment.Manual-assignSpecify an available IP address from the IP address segment.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
Log in to the KSV web console.
In the top navigation bar, click Virtual Resources to go to the management page of virtual resources.
In the left-side navigation pane, choose VMs > VMs to go to the VM management page.
On the VMs page, click Create and select From Template. The page for creating a VM appears.
In the Basic Info step, configure basic information for the VM, and then click Next.
Parameter Description NameThe 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.ProjectThe project in which you want to create the VM.DescriptionThe description of the VM.The description can be up to 128 characters in length. The character types are unlimited.In the Select Template section, select a template in the project to create a VM.
Parameter Description NameThe custom name of the template.IDThe universally unique identifier (UUID) of the template in the system. The UUID is automatically assigned by the system.OSThe 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.CPUThe CPU cores of the VM defined in the template.MemoryThe memory size of the VM defined in the template.System DiskThe system disk size of the VM defined in the template.In the Configuration section, configure the CPU and memory specification for the VM.
Parameter Description CPUThe CPU cores that can be used for the VM.MemoryThe memory size that can be used for the VM.In the Storage section, configure the system disk and data disks for the VM.
Parameter Description System DiskThe 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.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.
Parameter Description UsernameThe username for VM login. By default, the value is root.PasswordThe password for VM login. By default, the value is 123456.SSHSelect SSH to bind an SSH key for VM login. For more information about SSH keys, see View SSH keys.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.
In the Network section, expand the second drop-down list to specify a method for IP address allocation.
Parameter Description Auto-assignThe system automatically assigns an available IP address to the VM from the IP address segment.Manual-assignSpecify an available IP address from the IP address segment.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
Log in to the KSV web console.
In the top navigation bar, click Virtual Resources to go to the management page of virtual resources.
In the left-side navigation pane, choose VMs > VMs to go to the VM management page.
On the VMs page, click Create and select From VM. The page for creating a VM appears.
In the Basic Info step, configure basic information for the VM, and then click Next.
Parameter Description NameThe 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.ProjectThe project in which you want to create the VM.DescriptionThe description of the VM.The description can be up to 128 characters in length. The character types are unlimited.In the VMs section of the Configuration step, select an existing VM in the project to create a VM.
Parameter Description NameThe custom name of the VM.IDThe UUID of the VM in the system. The UUID is automatically assigned by the system.OSThe OS of the VM. You can place the cursor on the OS to view the specific type and version of the OS.IP AddressThe IP address of the source VM.In the Storage section, configure the system disk and data disks for the VM.
Parameter Description System DiskThe 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.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.
Parameter Description UsernameThe username for VM login. By default, the value is root.PasswordThe password for VM login. By default, the value is 123456.SSHSelect SSH to bind an SSH key for VM login. For more information about SSH keys, see View SSH keys.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.
In the Network section, expand the second drop-down list to specify a method for IP address allocation.
Parameter Description Auto-assignThe system automatically assigns an available IP address to the VM from the IP address segment.Manual-assignSpecify an available IP address from the IP address segment.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.