FedoraXenQuickstart - Fedora Xen å †Ϥˡ Xen ѲǽʤΤ Fedora Core 4 ǤΤǤդܤˤĤƤ http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html 䤿ϰǤǤϤʤ(ᤤ˰ 3.0 ޤ) Xen ι¤ˤĤƤޤ礦ΤȤưʤ⤢ޤǻ䤿ζ̣椭դ¸ߤǤ˰㤤ޤޤXen ϸ NetBSD/xen FreeBSD 5.0 ports Xen 2.0.x ١ȤΤưޤ Xen ư뤿ΥåȥåȤϤñʤΤǤǤ Fedora ȯƥ Xen ñΤΥ OS Ȥƥåȥåפ뤿γפҤ٤ޤ xen ¹Ԥˤϡxen ѥå˲äxen0 xenU ͥ롦ѥåɬѤȤʤޤäưʲξ郎ɬפǤ ơޤ xen kernel-xen ѥåȡ뤷ʤƤϤޤ٥ȡ뤷Ƥޤ xen0 ͥư뤿 grub.conf εҤǤ줫 xen0 ͥǥ֡Ȥ褦ФƵưޤ*3 Ƶư grub dom0 ͥ*4ưƤ줫顢xen ǡεưȥɥᥤɤ߹ޤޤ service xend start xm list ɥᥤƯƤ뤫ɤǧۤɤǤơ줫饷ץ Fedora ƥιۤƤߤޤ礦ޤϤˡkernel-xenU ѥåΥȡԤʤƤϤޤʤˤȡɥᥤϥ OS γ˥֤ͥʤƤϤʤΤǤˡˡFedora ȡ뤹뤿δפȤʤեޤʲǤ 1 GB ΥեƤޤ dd if=/dev/zero of=/root/fedora.img bs=1M count=1 seek=1024 줫顢ΥեФ ext3 ե륷ƥۤޤ mke2fs -F -j /root/fedora.img 줫鿷ե륷ƥ೬ؤŪǧ뤿ˡ /mnt ذŪ˥ޥȤޤ mount -o loop /root/fedora.img /mnt ǴŪʺȤϽޤxen ư뤿ˡ㴳ɸȤϰۤʤäŪʥե볬إƥåȥåפ뤳Ȥˤʤޤyum Ȥä chroot ȡԤǤˡƤϰʲ̤Ǥ a) initrd ѤƤʤ /dev ۲ɬѤȤǥХΡɤޤ for i in console null zero ; do MAKEDEV -d /mnt/dev -x $i ; done b) /etc/fstab ĴޤΤ褦ñʵҤưޤ /dev/sda1 / ext3 defaults 1 1 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 μϥޥȤ줿 /mnt /proc ޤgrupadd ޥɤˤϥХ뤿Ǥshadow-utils-4.0.7-7 ǤϽѤߤǤ mkdir /mnt/proc mount -t proc none /mnt/proc ơ chroot 줿 /mnt ؤɤΤ褦ʴܥƥǤ⥤ȡ뤹뤳ȤǤ褦ˤʤޤ⤷ʥߥ顼ȤѤͤƤΤǤ顢 yum.conf ɤơѤߥ顼Ȥξ˽Ƥ줫顢ɤΤ褦ʥ롼ȡ뤹뤫Ʋ Base Base ؤ Core ȤȤˡ⤢ޤǤ Ϥ뤳Ȥ侩ޤΤ褦˼¹Ԥޤ yum -c http://people.redhat.com/~katzj/yum-xen.conf --installroot=/mnt -y groupinstall Base ȡˤ¿λ֤ޤҡꤪۻҤ٤ƤƤ :-)
Ƥӥä줿ȤϽǤ/mnt ˺Ǿ¤ΥȡԤޤ*5 xen Υ OS initrd Ȥ鷺˵ư뤿ᡢguest OS Ǥ SELinux ̵ˤ٤Ǥ/mnt/etc/selinux/config եԽ SELINUX ιܤ permissive disabled ѹƤΥۥȤ SELinux ̵ˤƤΤǤСʲΤ褦ˤǤޤ cp /etc/selinux/config /mnt/etc/selinux/config ¾ե륷ƥޥȤޤ umount /mnt/proc umount /mnt Ȥեκ顢ʳ˿ʤळȤǤޤʬΥޥˤ /etc/xen/rawhide ʲΤ褦ԽƤȤƤñʤΤǤ kernel ="/boot/vmlinuz-2.6.12-1.1369_FC4xenU" memory = 64 name = "rawhide" nics = 1 disk = ['file:/root/fedora.img,sda1,w'] root = "/dev/sda1 ro"
ºݤ˥ɥᥤˤꡢdomain0 Ф xm balloon ȤäƥγƤԤޤޥ 'xm balloon 0 384' ¹Ԥ뤳Ȥˤäơdomain0 Τ RAM 384 MB Υ̤ݤޤºݤѥͤơdomain0 ˤϤɤ٤ΥΤɬפߤΤƤƤʬƤͤǤ礦 ơ 'xm create -c rawhide' ޥɤ¹ԤƿɥᥤޤǸ˥ɥᥤץץȤɽ뤫ɤǧroot ǥǤ뤫ɤ伫ͳ˥ޥɤȤ뤫ʤɳڤǤߤƤ
ƥεư˼ưŪ˥ɥᥤƯˤϡxend xendomains ӥͭˤơxen ե /etc/xen/auto ǥ쥯ȥ֤ɬѤޤ ʾ夬ʷơȤǤȤʤ٤ˤϤޤޤȤޤΥƥåפϤʤȤɤΤ褦 Xen ȴĶǼºݤ˥ȡԤȡե륷ƥǥͥư뤳Ȥ뤫ǤʤϤ⤦ޤǤɤ夤ƤΤǤʤϻפޤ ˡ Troubleshooting - ȥ֥륷塼ƥ xen Υƥ।ȡȤˤꡢdom0 ưǧȤʤ룲ĤΥե뤬ޤ/var/log/xend.log 'xm log' ¹ԤǵϿϤ졢ŪưˤĤƤξϿޤˤ˵ϿåʬûñʾϿƤޤʲν NetBSD/xen ͥ¹Ԥ褦ȤȤνϤǤ [2005-06-27 02:23:02 xend] ERROR (SrvBase:163) op=create: Error creating domain:(0, 'Error') Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/xen/xend/server/SrvBase.py", line 107, in _perform val = op_method(op, req) File "/usr/lib/python2.4/site-packages/xen/xend/server/SrvDomainDir.py", line 71, in op_create raise XendError("Error creating domain: " + str(ex)) XendError: Error creating domain: (0, 'Error') ⤦ĤΥե /var/log/xend-debug.log ǤΥեˤϾܺ٤ʾϿޤNetBSD/xen ͥư褦ȤȡΤ褦ʽϷ̤ˤʤޤ ERROR: Will only load images built for Xen v3.0 ERROR: Actually saw: 'GUEST_OS=netbsd,GUEST_VER=2.0,XEN_VER=2.0,LOADER=generic,BSD_SYMTAB' ERROR: Error constructing guest OS åȥå˥顼Сxend.logxend-debug.log ɽξΥμˤʤǤ礦 X in domain 0 㴳ΥƥǤ domain 0 ˱ X Window ƥư褦ȤƤ vm86 ֤ domain 0 ΤΥݤ뤳Ȥʤ礬ޤΤ褦ʾ X ưˤϡvm86 ڤΥƤޤȤǤޤǤ¾ X Ƥޤ⤢ޤ cd /usr/X11R6/lib/modules/linux/ mv libint10.a unused-libint10.a |