반응형
Sorry for all these English notations.
1. Get Cent5.4 DVD iso file be prepared in local disk(download it!)
# wget http://blahblah/*.iso => save it to /home/vmimg_src/cent54dvd.iso
2. Prepare sparse file for disk image & get filesystem ready(24GB virtual disk image)
# dd if=/dev/zero of=/home/vmimg/centvdisk.img bs=6k seek=4096k count=1
# mkfs.ext3 /home/vmimg/centvdisk,img
3. Mount iso image to loop device
# losetup -f => Check free loop device number, consider its loop7
# losetup -f /home/vmimg_src/cent54dvd.iso => assign iso to /dev/loop7
# mkdir -p /mnt/iso/cent54dvd
# mount -t iso9660 /dev/loop7 /mnt/iso/cent54dvd
4. Make httpd be prepared and copy all the installation files
# mkdir /home/www/cent54
# vi /etc/apache2/default-server.conf, modify
<Directory “/home/www/cent54”>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# /etc/init.d/apache2 restart
# cp -a /mnt/iso/cent54dvd /home/www/cent54
5. Make VM boot loader be prepared
# cd /home/vmimg
# mkdir cent54boot; cd cent54boot
# cp /home/www/cent54/images/xen/vmlinuz ./vmlinuz-install-xen
# cp /home/www/cent54/images/xen/initrd.img ./initrd-install-xen
6. edit CentOS PV domu configuration
# cd ~/xen_config
# vi cent54domu.cfg
-----------------------------------------------------------------------------
name='centOSdomU'
# After installation boot, disable these 2 lines
kernel='/home/vmimg/cent54boot/vmlinuz-install-xen'
ramdisk='/home/vmimg/cent54boot/initrd-install-xen'
# After installation boot, enable below 1 line
#bootloader='/usr/bin/pygrub'
extra='text'
memory=1024
vcpus=1
# After installation boot, disable below 1 line
disk=['file:/home/vmimg/centvdisk.img,xvda,w']
# After installation boot, enable below 1 line
#disk=['tap:aio:/home/vmimages/centvdisk.img,xvda,w']
audio=0
vif=['bridge=br0']
# After installation boot, disable below 1 line
on_poweroff='destroy'
on_reboot='restart'
on_crash='restart'
-----------------------------------------------------------------------------
* As for this process, U need to make root/swap partition manually
7. Create VM with xm command
# xm create -c cent54domu.cfg => installation starts
* If reboot starts after installation, kill it!
# xm destroy domain_number
# cp cent54domu.cfg cent54domu_init.cfg
# vi cent54domu.cfg => Do as the comment says & save it
# xm create cent54domu.cfg
* Now VM starts as a normal boot process
* All done.
반응형
'Technical > Cloud, Virtualization, Containers' 카테고리의 다른 글
Fedora 14 Dom0 Kernel (Xen 4.0.1-6) 설치 - Virtual Machine 사용을 위한 준비 (2) | 2010.11.11 |
---|---|
OpenSUSE 11.3 kernel 2.6.34.7-0.5-xen, Xen 4.0.1에서 windows hvm quest 설치 (0) | 2010.11.06 |
Setting up Xen Dom0 kernel 2.6.31.12 on OpenSuse 11.2 (0) | 2010.06.09 |
가상화의 물결 (0) | 2010.05.19 |
OpenSuse 11.2, Xen Kernel(Dom-0) 상태에서 Nvidia 9800GT 잡기(kernel 2.6.31.12-0.2-xen) (0) | 2010.04.19 |