ทาง Linuxgray อนุญาติให้ copy บทความได้ แต่กรุณาอ้างอิง ชื่อผู้เขียน และทำ Link มาที่ http://www.linuxgray.com ขอบคุณครับ
โดย
มนตรี สีเทา ( RHCT , RHCE )
( Last update 12/02/2011 )
http://www.linuxgray.com
การติดตั้ง Xen และการสร้าง Domain0 และ ในบทความนี้ก็จะแสดงวิธีการสร้าง paravirtualized
[root@xen ~]# vi /etc/modprobe.conf
alias eth0 tg3
alias scsi_hostadapter ahci
alias snd-card-0 snd-hda-intel
options snd-card-0 index=0
options snd-hda-intel index=0
remove snd-hda-intel { /usr/sbin/alsactl store 0 >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-hda-intel
# เพิ่ม module ให้ xen
alias scsi_hostadapter xenblk
[root@xen ~]#
yum -y install xen kernel-xen
[root@xen ~]#
vi /etc/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 initrd paths are relative to /boot/, eg.
#
root (hd0,0)
#
kernel /vmlinuz-version ro root=/dev/Host/LogVol01
#
initrd /initrd-version.img
#boot=/dev/sda
# เปลี่ยน default kernel
default=
0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-8.1.1.el5xen)
root (hd0,0)
kernel
/xen.gz-2.6.18-8.1.1.el5
dom0_mem=512M
module /vmlinuz-2.6.18-8.1.1.el5xen ro root=/dev/Xen/Host00
module /initrd-2.6.18-8.1.1.el5xen.img
title CentOS (2.6.18-8.1.1.el5)
root (hd0,0)
kernel
/vmlinuz-2.6.18-8.1.1.el5 ro root=/dev/Xen/Host00
initrd
/initrd-2.6.18-8.1.1.el5.img
title CentOS (2.6.18-8.el5)
root (hd0,0)
kernel
/vmlinuz-2.6.18-8.el5 ro root=/dev/Xen/Host00
initrd
/initrd-2.6.18-8.el5.img
[root@xen ~]#
chkconfig xend on
[root@xen ~]#
chkconfig xendomains on
[root@xen ~]#
shutdown -r now
[root@xen ~]#
xm list
| Name |
ID |
Mem(MiB) |
VCPUs |
State |
Time(s) |
Domain-0
|
0 |
512 |
2 |
r----- |
12.6 |
|