Xen semi-virtualization and full virtualization

Source: Internet
Author: User
Article Title: xen semi-virtualization and full virtualization. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

This article only covers how to implement full and semi-virtualization of xen, that is, to install linux in linux and to install windows in linux.

I am still studying the principles and optimization.

Environment centos 5.2 64bit

Virtualization is already included during installation, so after the system is started, the kernel with xen is installed with xen-related software.

Xen has multiple storage methods, such as files, lvm, and nfs, according to the official manual. I chose files as the storage of the xen virtual machine, because it is relatively simple, of course, there will be weaknesses, which will be discussed later.

First, let's talk about how to implement semi-Virtualization:

Check whether the cpu instruction set contains pae. This should not be a problem. All of my small black CPUs are supported by T2370.

1. First dd an imgfile as the Virtual Machine installation space

Dd if =/dev/zero of =/xen/image/xen1.img bs = 1 M count = 30720 values can be adjusted as needed.

2. Install the virtual machine. The installation method is the same as that of the host machine. You can use the optical drive and network. Because I have created the ks source, it is convenient.

During this period, I used ks to install the Virtual Machine System.

Run the following command:

Virt-install-n xen1-r 256-p -- nographic-f/xen/images/xen1.img-l http: // 192.168.32.132/centos32bit-x "ip = 192.168.32.31 netmask = 255.255.255.0 gateway = 192.168.32.1 ks = http: // 192.168.32.132/centos32bit/ksxen. cfg"

If the installation succeeds, the system is automatically installed until the system is restarted. The ks file will not be pasted. The partition name needs to be adjusted basically the same as the configuration file of the host machine. The host machine is in the form of sda, and the virtual machine is in the form of xvda.

However, the basic commands for controlling Xenos are not enough. I am going online to discuss this book in detail.

Next we will talk about full virtualization:

Before installing windows in linux, I had a misunderstanding. I thought windows was graphic. How can I install windows without a graphical interface? Later I realized that the graphic interface can be seen through vnc connection. The installation of vnc configuration vnc is not described. The configuration is very simple. When the client connects to linux Through vnc, you must enter the ip Address: number (number = 1, 2 ...) only an ip address is input, and only a white screen is displayed.

Next, upload an iso file to the host machine. Here we will explain that there are various online statements about full virtualization, such as how to modify the configuration file and modify the startup project, I tried it several times and I suddenly found a solution.

Dd to output the imgfile,

Run the virt-install-n win2003-r 512 -- vcpus = 2 -- file =/xen/image/win2003.img -- vnc-v-c/root/windows2003_sp2.iso -- vnc -- vncport = 5902 -- OS-type = 'windows'

Then the win2003 configuration file is automatically generated.

Then you can install the system through vnc. (I was very excited when I saw a blue-white image)

When windows copies the required files, the system restarts and a problem occurs. The screen prompts an error and the installer will not continue. Delete the win2003 configuration file in the/etc/xen directory and then execute the preceding command, then, the win2003 configuration file is automatically generated and viewed through vnc. The installation program runs smoothly. After the system is restarted, go to the win2003 system. To ensure security, enable win2003 Remote Desktop and disable the host's vnc service.

Manage win2003.

The above briefly explains how to implement semi-virtualization and full virtualization. I hope you can understand it.

In addition, the I/O speed will be slow when files are used as the storage of xen virtual machines, which is basically half of the host machine. Therefore, there will be serious problems when used on production machines. I heard that the lvm virtual partition has a good effect, and I plan to have time to test it.

Related Article

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.