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
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, 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.
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 step, 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.
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.
In the left-side navigation pane, choose Networks > EIPs to go to the EIP management page.
Find the EIP that you want to associate, click on the right side, and then select Associate VM from the drop-down list.
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
In the left-side navigation pane, choose VMs > VMs to go to the VM management page.
On the VMs page, find the VM that you create in step 1 and click next to the VM to open the Terminal.
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.
In the left-side navigation pane, choose VMs > VMs to go to the VM management page.
On the VMs page, find the VM that you create in step 1, click next to the VM, and then select Delete from the drop-down list.
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.