Build a linux Virtual Machine in vmlinux

Source: Internet
Author: User
At present, vmware is absolutely leading in the field of windows virtual machines. In contrast, virtualization on the linux platform can also be well implemented. Here we use the virtual platform xen, sometimes many linux virtual machines or multiple windows virtual machines are required to perform experiments on the linux platform. The emergence of xen can solve this problem well.

At present, vmware is definitely ahead in the windows Virtual Machine field, which corresponds toVirtualizationIt can also be well implemented. Here we use the xen virtual platform. Sometimes we need many linux virtual machines or multiple windows virtual machines to do experiments on the linux platform, the emergence of xen has effectively solved this problem. xen virtualization is divided into all virtualization and semi-virtualization. In reality, semi-virtualization is superior, here we will introduce how to use xen to build a semi-virtualized linux virtual machine on the linux virtual machine under vmware!

Method 1: Graphical

First, the installation kit and the installation process are required. Here, the yum method is used, because the local yum source has been configured.

 

[Root @ localhost ~] # Yum-y install xen kernel-xen (install virtual kit)

[Root @ localhost ~] # Yum-y install virt-manager (install virtualization management tools)

Then modify the corresponding STARTUP configuration

[Root @ localhost ~] # Vi/boot/grub/menu.LsT (after the installation process is completed successfully, add a startup option below)
# Grub. conf generatEdBy anaconda
#
# Note that you do not have to rerun grub after making changes to thisFile
# NOTICE: You have a/boot partition. This means that
# All kernel and iniTrD paths are relative to/boot/, eg.
# Root (hd0, 0)
# Kernel/vmlinuz-version ro root =/dev/VolGroup00/LogVol00
# Initrd-version.img/initrd
# Boot =/dev/sda
Default = 0 // The key here is that this startup option must be the System With virtualization started.
TimeOut = 5
Splashimage = (hd0, 0)/grub/splash.xpm.gz
HiDdEnmenu
Title Red Hat Enterprise Linux Server (2.6.18-164. el5xen) // This is the new menu option.
Root (hd0, 0)
Kernel/xen.gz-2.6.18-164. el5
MoDuLe/vmlinuz-2.6.18-164.el5xen ro root =/dev/VolGroup00/LogVol00 rhgb quiet
Module/initrd-2.6.18-164.el5xen.img
Title Red Hat Enterprise Linux Server-base (2.6.18-164. el5)
Root (hd0, 0)
Kernel/vmlinuz-2.6.18-164.el5 ro root =/dev/VolGroup00/LogVol00 rhgb quiet
Initrd/initrd-2.6.18-164.el5.img

Restart the system.

[Root @ localhost ~] # Reboot

Restart the system. After the system is started, create an installation tree (the installation tree platform can be apache orFtp) Apache is used here and installed.HttpdAfter the kit, start the service

[Root @ localhost ~] # Yum-y install httpd
[Root @ localhost ~] #/Etc/init. d/httpd restart
StopPingHttpd: [FAILED]
Starting httpd: [OK]
Mount the image file to the apache directory.

[Root @ localhost ~] #Mkdir/Var/www/html/iso
[Root @ localhost ~] # Mount/dev/hdc/var/www/html/iso/
Mount: block device/dev/hdc isWrite-Protected, mounting read-only

Enter http: // ip/iso in the browser to browse the image content.

Next, enter the graphic interface (the logon graphic interface is directly used here. remote users can use vNcThis kit has been installed and used in previous blog posts)

[Root @ localhost ~] # Init 5 (entering the graphic interface)

[Root @ localhost ~] #/Etc/init. d/httpd restart)

After everything is ready, perform the following operations on the GUI

AppliCatIons-> System Tools-> Virtual Machine Manager (The following describes the options that need to be configured. Because images cannot be described one by one, only important items are listed here)

Click localhost xen Active and then click the new options below. Follow the prompts to install the OS Type step by step and select your system version. In the Installation media URL, enter http: // ip/iso, modify the File (disk image) parameters as needed, and modify the Max memory size as prompted, you can go to a process similar to installing linux under vmware.

Here, a semi-virtualized linux virtual machine can be installed successfully. Note that the disk and memory of the host machine are larger.

Method 2:CommandMode

[Root @ localhost/] # virt-install-n vm02-f/data/vm02.img-s 4-r 128 nographics-l http: // 192.168.1.192/iso


These are the preliminary applications of xen and will be further explored in the future.

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.