Use Xen to create a VM

Source: Internet
Author: User

This section describes how to use the Virtual Machine Manager tool to create a Virtual Machine.

The steps for creating a VM are quite different in Linux. For example, the Ubuntu server provides the Xen tool-a tricky command line solution, which creates a configuration file and uses commands with many options. For more information, see the next article ). On the contrary, Red Hat and SUSE are easier to create Virtual machines thanks to the graphical Virtual Machine Manager tool.

Virtual Machine Manager can be used in semi-virtualized or fully virtualized environments. After using Virtual Machine Manager to create a Virtual Machine, you can also start and monitor the Virtual Machine from the tool. However, some advanced options are not available in Virtual Machine Manager. For example, the option of creating a virtual machine between nodes or creating a high availability solution.

Use Xen to create a VM

In the following steps, we will learn how to install a quasi-virtualized SUSE Linux Enterprise Server 10 SP1 instance on The SUSE Linux Enterprise 10 SP1 virtualization host.

1. Make sure that the Xen kernel is enabled on your server. Next, run the virt-manager Command to enable Virtual Machine Manager. The interface shown in Figure 1 appears.

 

: Virtual Machine Manager provides an interface for all Virtual machines on the same physical server.

2. From the Virtual Machine Manager interface, click "New ". Open the VM creation wizard. Start from the wizard's open interface and click "Forward"

3. the wizard now asks you what you want to do. If you want to install a brand new operating system, select "I need to install an operating system ". If you want to use a pre-installed disk or disk image on the operating system, select "I have a disk or disk image with an installed operating system", as shown in 2.

 

: Select "I need to install an operating system" to start the new installation.

4. Select SUSE Linux Enterprise Server 10 from the list of available operating systems and click "Forward ". Now you can see the summary window of 3.

 

: You can configure and complete virtual machines in the summary window.

Note: If you choose to install an operating system as a virtual machine, try to select the operating system that can be installed from the DVD, rather than from the CD. In the latest version of SUSE Linux Enterprise Server, Xen installed from CD has a problem. Both of them can configure an installation server to install the operating system you selected.

5. Several installation options are available in the summary window. First, under the Virtualization Method, you can select the Virtualization type you want to use. If your CPU has virtualization support, select "Full virtualization alization ". If "Paravirtualization" is not supported, it is your only choice. SUSE Linux Enterprise Server 10 SP1 can be installed as a quasi-virtualized operating system, but not all operating systems provide this possibility.

6. Next, select the Virtual Machine name. If you have not logged on to your own name, the installer will create a name.

7. Click "Hardware" to connect to the memory and CPU configuration. When configuring the memory, you will notice the difference between the initial memory and the maximum memory. The initial memory is the memory allocated to the VM when it is started for the first time. I recommend setting it to a relatively low value because it is easy to grow. The maximum memory size is the maximum memory size that can be used by virtual machines. This is not a dynamic configuration, but an upper limit. It is no problem to set it to equal the number of RAM resources on your server. Next, select the number of virtual processors that the machine can use. Setting the number of virtual CPUs to a greater number than the number of available processors makes no sense, but if you want to have only one CPU on a physical machine, it seems that there are 32 processors-the maximum possible value, which you can specify here.

 

: The amount of memory and CPU available for virtual machines can be easily changed.

8. As for graphics adapters, by default, they use quasi-virtualized graphics adapters. This adapter performs well and does not need to be changed in most cases.

9. One of the most important choices when creating a VM is the disk you want to use. By default, the installer creates a disk image file in the/var/lib/xen/images directory. This is good, but for performance, it is a good idea to set LVM volumes and use LVM volumes as virtualized disks. To make it easier to create a virtual machine, in this article, we will configure a virtual disk based on a disk image file. Click Connect to Disks. You can see the disk created by the installer.

 

: Configure a virtual disk based on a disk image file

Note: This is a trick. Do you want to use your VM in the data center? Place the disk image file on SAN, which makes it easier to create a virtual machine on another host!

10. To change the disk attributes, such as the size or location of the disk file, select the virtual disk and click "Edit" to change the disk attributes as needed.

11. As you can see, the installer will not allow you to access the disc drive by default. You may want to set the disc driver as long as you can install the disc from the DVD installation disk. Click the CD-ROM and select the media you want to use as the disc drive in the VM. The default value is/dev/cdrom on the host operating system. If you want to install an ISO file, use the Open button to browse the location of the ISO file.

 

: It is easy to replace physical CD-rom with an ISO file.

12. In the Network Adapters Network adapter section of the summary window, you can see that a quasi-virtualization Network adapter is automatically added. We will discuss network adapters later.

13. Check the Installation resources mentioned in Operating System Installation. If yes, click OK to deploy your VM.

After the Virtual operating system is installed, you can access it from Virtual Machine Manager. Later in this series, we will learn more about management options.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.