How to install the XP system through the xen virtual machine in centOS

Source: Internet
Author: User
Tags dmesg
How to install the XP system through the xen virtual machine in centOS my test environment: 1. use the root user to log on 2. centOS minimizes installation for native DVDs. internet access 1. install xen # yum & amp; ndash; yinstallxen * to install services required by XEN # yum-yinstallkernel-x...
How to install the XP system through the xen virtual machine in centOS my test environment: 1. use the root user to log on 2. centOS minimizes installation for native DVDs. internet access 1. install xen # yum-y install xen * the services required for XEN installation # yum-y install kernel-xen * install the kernel related to XEN
2. check whether the boot option is started using the xen Kernel. 1. check whether the xen kernel file is properly installed: file located in/boot # ls-lh/boottotal 9.5M-rw-r -- 1 root 61 K Mar 16 config-2.6.18-8.el5-rw-r -- r -- 1 root 60 K Mar 16 config-2.6.18-8.el5xendrwxr-xr-x 2 root 1.0 K Aug 15 grub-rw ------- 1 root 1.5 M Aug 13 initrd-2.6.18-8.el5.img-rw ------- 1 root 1.5 M Aug 15 initrd-2.6.18-8.el5xen.imgdrwx ------ 2 root 12 K Aug 13 Lost + found www.2cto.com-rw-r -- 1 root 79 K Apr 1 message-rw-r -- 1 root 82 K Mar 16 symvers-2.6.18-8.el5.gz-rw-r -- r -- 1 root 83 K Mar 16 symvers-2.6.18-8.el5xen.gz-rw-r -- r -- 1 root 865 K Mar 16 System. map-2.6.18-8.el5-rw-r -- r -- 1 root 848 K Mar 16 System. map-2.6.18-8.el5xen-rw-r -- r -- 1 root 1.7 M Mar 16 vmlinuz-2.6.18-8.el5-rw -R -- 1 root 2.0 M Mar 16 vmlinuz-2.6.18-8.el5xen-rw-r -- r -- 1 root 269 K Mar 16 xen.gz-2.6.18-8. el5-rwxr-xr-x 1 root 595 K Mar 16 xen-syms-2.6.18-8.el5 2. check grub configuration # cat/boot/grub. conf # grub. conf generated by anaconda # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a/boot partition. this means that # all kernel and I Nitrd paths are relative to/boot/, eg. # root (hd0, 0) # kernel/vmlinuz-version ro root =/dev/sda3 # initrd/initrd-version.img # boot =/dev/sdadefault = 1 timeout = 5 splashimage = (hd0, 0) /grub/splash.xpm.gz hiddenmenutitle CentOS (2.6.18-8. el5xen) root (hd0, 0) www.2cto.com kernel/xen.gz-2.6.18-8. el5module/vmlinuz-2.6.18-8.el5xen ro root = LABEL =/module/initrd-2.6.18-8.el5xen.imgtitle CentOS (2.6.18-8. el5) root (Hd0, 0) kernel/vmlinuz-2.6.18-8.el5 ro root = LABEL =/initrd/initrd-2.6.18-8.el5.img modify where default = 1 is default = 0, enable xen kernel 3. restart the computer 4. log on to the system after restart, and check whether XEN runs normally 4.1 # xm listName ID Mem (MiB) VCPUs State Time (s) domain-0 0 3919 4 r ----- 16.9 the above result indicates that xen starts the normal 4.2 check log: # ls-lh/var/log/xentotal 8.0K-rwxr-xr-x 1 root 36 Aug 15 xend-debug.log-rw-r -- r -- 1 root 1.8 K Aug 15 xend. log # cat/var/log/xen/ Xend-debug.logNothing to flush. Nothing to flush. indicates that everything is normal and the XEN service in our CentOS5 has been started successfully. So far, our CentOS5 host machine is ready for installation.
3. install the XEN Linux client system-CentOS 5.x 1. create the image file 1.1 using dd to create # dd if =/dev/zero of = centos5.img bs = 2 k seek = 4096 k count = 1 Create the main disk of the client # dd if =/dev/zero of = swap. img bs = 2 k seek = 512 k count = 1 create a client exchange disk www.2cto.com 2. create a configuration file 2.1 required installation tool because the previous installation was based on minimal installation, in this case, you need to add a software virt-manager for installing the client system. now install: # yum-y install virt-manager. Note that this software package is a graphical management program under gnome, therefore, you need to install a large number of dependent packages ...... I forgot the package name. The delay was 2 hours ...... 2.2 start to install the client # virt-install-n centos5-r 512 -- vcpus = 2 -- file = centos5.img -- file = swap. img -- nographics-l [url] http://192.168.0.11/yum/ba ... [/Url] (the address of the yum source you set up) at this time, if the machine CPU supports VT technology, it will ask whether to enable VT Support. generally, select no. If yes, in this case, you must enter the optical drive or optical drive. Wocould you like a fully initialized alized guest (yes or no )? This will allow you to run unmodified operating systems. noStarting install... 2.3 start the installation program of the client. due to remote and text installation, some ssh clients may be in disorder. please try. the installation of the operating system on this part is the same as that on the general network, we will not describe it in detail here. We recommend that you use swap to swap partitions. The primary partition has one boot and one root partition. add 2.4 to the installation source (the simplest method). enable the httpd service on a server with CentOS5 installed, copy the entire CentOS5 DVD disk to/var/www/html/yum/base. after installing the client, a centos5 file is generated under/etc/xen. refer to the configuration file centos5: name = "centos5" memory = "768" disk = ['tap: ai/opt/xen/centos5/centos5.img, xvda, w', 'tap: ai/opt/xen/centos5/swap. img, xvdb, w',] vif = ['Bridge = xenbr0',] bootloader = "/usr/bin/pygrub" vcpus = 2 www.2cto.com on_reboot = 'R Estart 'on _ crash = 'restart' 4. prerequisites for XEN installation: the CPU of the host computer supports intel VT or AMD-v of amd, the corresponding options are enabled in the BIOS. 1. check if support for VT: # xm info | grep xen_capxen_caps: xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p # xm dmesg | grep-I vmxon (XEN) VMXON is done (XEN) VMXON is done: if the above field is displayed, the computer supports VT. Otherwise, it is likely that it is not supported or the BIOS is disabled. You can also use xm dmesg or cpuinfo to query the data. 2. enable vnc # yum-y install vnc * # vi/etc/xen/xend-config.sxp for graphical remote installation to edit the following content (please modify as needed) :( vnc-listen '2017. 168.0.xxx ') (vncpasswd 'password') the modification can also be modified in the file of the corresponding client. 3. restarting the computer actually does not require restarting the computer. you only need to restart the xend service, but it is difficult to restart the service successfully, so simply restart: 4. install windows and prepare the disk image file, run # virt-install-n mini-r 768 -- vcpus = 2 -- file = mini. img -- vnc-v-c/opt/yum/pwinxp. the following prompt should appear in iso: www.2cto.com Starting install... unable to connect to graphical console; DISPLAY is not set. please connect to localhost: 5900 Domain installation still in progress. you can reconnect to the console to complete The installation process .!! Note that this method is suitable for host machines to enable the xwin graphics system and operate on the host machine. 4.1 check the vnc listener # netstat-anp | grep 5900tcp 0 0 192.168.0.xxx: 5900 0.0.0.0: * The preceding result of LISTEN 2748/qemu-dm indicates that vnc is enabled (xwin is not required for remote host ). The listening port may change. The default value is 590X. 4.2 we recommend that you use the realvnc client to connect to the vnc client! Ultravnc will be flushed after connection, which is almost impossible to operate. The password is the password set in step 2 or in the configuration file. 4.3 during windows installation, if the screen is stopped on the following screen or restarted continuously: The screen is mainly stopped on starting windows... this problem is generally caused by ACPI on the blue interface of. Please Press F7 when prompted to press F2 or F6 after the boot disc starts, disable ACPI, or use the following configuration file mini. hvm is forced to close directly: import OS, rearch = OS. uname () [4] if re. search ('64', arch): arch_libdir = 'lib64' else: arch_libdir = 'Lib' kernel = "/usr/lib/xen/boot/hvmloader" name = "mini" builder = "hvm" memory = "768" shadow_memory = 8 disk = ['File: /opt/xen/mini. img, hda, w', 'file:/opt/yum/pwinxp. iso, hdc: cdrom, R',] vif = ['type = ioemu, bridge = xenbr0',] device_model = "/usr/lib/xen/bin/qemu-dm" kernel = "/usr/lib/xen/boot/hvmloader" vnc = 1 vnclisten = "192.168.0.xxx" vncdisplay = 1 certificate = 'password' vncunused = 1 apic = 0 acpi = 0pae = 1 boot = "dc" vcpus = 2 serial = "pty" # enable serial restart leon_reboot = 'start' www.2cto.com on_crash = 'restart'
Please note that we didn't use the separate cdrom = "/opt/yum/en2003entsp2. the following error occurs when using iso: the error is a cdrom startup error. Error code 0002: quickly start the vnc client to view the startup information (modify the configuration file ), note that the installation will restart after the configuration file is modified for the first time. correct the boot sequence to boot = "c" before the restart to enter the normal installation mode. In the future, you can remove or modify the cdrom option in the disk, or add or delete disk information. 5. other instructions can also be used to install linux systems with xwin. enabling vnc is only required for installation. we recommend that you disable it in general! After Windows is installed, install remote control software such as vnc or radmin on the client and disable the vnc option in the configuration file to ensure the security of the host. Author: yinjiabin
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.