FC6/FedoraCore6

ɤʤˤϼĤƤäʤ褦ʤΤǡ

ʸ⤽Ǥ Xen 򤷤Ƥ͸ʸϤʤΤǡƤοͤˤʬŤ餤⤷ޤ󡣤ȤꤢȤ褦ˤʤޤFedora Core 6 ϥǥȥӥ塼Υ󥹥ȡ Xen ΥåȥåפԤɤǤΤǡäˤιܤɬפʤ⤷ޤ󡣤Ȥꤢ Xen ʤäɤ⡢ȤɬפʤȤ˻ͤˤʤ뤫ȻפޤäʬäƤ͸ʼʬϲǤˤνˤʤäƤޤλ

ݥȤϡFedora Core 5 Xen Fedora Core 6 Xen ϰ㤦ΤǤꡢߴʤȤǤϲƤХȥ֥ˤĤʤ뤫Ȼפޤ



Fedora Xen å FC6 - ܸ


Xen*1 ˤĤ

Xen ϥץ󥽡βۥޥۥƥǤXen ˤĤƤξܤ Xen Ȥ http://wiki.xensource.com/xenwiki/ ĺ Fedora Xen ڡ

Fedora Core Ǥ Xen 3.0.x ƤޤXen 3.0.0 2005 ǯ 12 ˸줿ΤǤޤ Xen 3.0 Υ OS ᡼ Xen 2.0 ȤϸߴޤΤǤդ

å

Fedora Core 6 ǤС Fedora Core 5 ȤϼۤʤäƤꡢ㴳ν礬ʲäƤޤʲΥɤǤϤɤΤ褦 Xen 򥻥åȥåפ뤫ơɤΤ褦 GUI 󥿡ե䥳ޥɥ饤夫饲 OS ֤ۡƴ뤫Ҥ٤Ƥޤ

ƥư

  • Fedora Core ɸΥ֡ȥȤ GRUB Ȥɬפޤ(*1)
  • OS ư뤿νʬʥϡɥǥζ̤ɬפǤFedora Core κǾƥʥޥɥ饤ΤߡˤƯǤ 600 MB ٤̤ɬפȤʤޤޤǥȥå״Ķ(X-Window)ѤȤˤ 3 GB ̤ɬפȤʤޤ
  • Ȥʤޤ OS Ȥɬ׺²Ŭư뤿ˤϡʤȤ⥲ OS 256 MB Υ(RAM)ɬפȤʤޤ

¹Բ(para-virtualized) OS ˤĤ(¹ԲѡPara-virtualized)

x86_64ia64 ƥб CPU ϡɤⲾ¹Բ(para-virtualized) OS βƯǽǤi386 Υ OS Ưˤ CPU PAE ĥ̿᥻å*2򥵥ݡȤƤɬפޤǤ¿θŤޥǤ PAE ĥбƤޤʿȤ Pentium Mobile / Centrino бƤޤˤΤդɬפǤPAE ĥбƤ뤫ɤϼΥޥɤ¹ԤĴ٤뤳Ȥޤ

$ grep pae /proc/cpuinfo
flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up ts

嵭Ǥ PAE ݡȤʤƤʬޤ⤷ɽƤʤ硢ޥ CPU PAE ĥˤбƤޤ

[] i386 OS Ķۤ뤿ˤ PAE ĥɬפȤʤ褦˻ͤѹƤޤ Xen С 2.x ǤפǤѹˤ¿Υ桼ƶǽϤޤ

۴(fully-virtualized) OS ˤĤ(HVM/Intel-V/AMD-V)

۴(fully-virtualized) OS ѤˤϥۥȤȤʤ CPU ۲бƤɬפޤŵŪȤޤƤϡIntel VT AMD-V ǤXen ξ CPU бƤŪ 'HVM' ءʥ쥤䡼ˤѤޤIntel VT 򥵥ݡȤƤ뤫Ĵ٤ˤ 'vmx' ե饰Ĵ٤ƤߤƤAMD-V ݡȤ 'svm' ե饰Ǥ

....CPU  Intel ξ....
# grep vmx /proc/cpuinfo 
flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht
  tm syscall nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
....CPU  AMD ξ....
# grep svm /proc/cpuinfo
flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx
  mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy

ޥɥ饤 root 桼¤ɬפʾ硢ԤƬʸϡ # ٤ȤʤäƤޤroot 桼ˤʤˤ 'su -' ޥɤȤΤŪǤޥϸ root ѥɤϤƤ

Xen Υ󥹥ȡ

Fedora Core 6 򿷵󥹥ȡ뤹ˤϡXen 礬ߤƤơ Xen 򥤥󥹥ȡ뤹뤫ɤ֤ȤǤޤ

⤦ Fedora Core 6 򥤥󥹥ȡ뤷ƤޤäƤǤ⡢Xen ͥġ뷲ϰʲΥޥɤ¹Ԥ뤳Ȥǥ󥹥ȡǽǤ

# yum install kernel-xen xen virt-manager

yum ޥɤˤ xen ɬפȤ륫ͥġʤɤΥѥå󥹥ȡ뤵ޤ'kernel-xen' ѥåˤϥϥѡХǤۥ OS 䥲 OS Ȥư륫ͥ뤬äƤޤƱͤ 'xen' ѥåǤϴץෲåȥåפޤ

yum Υ󥹥ȡˤ GRUB ɲäƤޤե /boot/grub/grub.conf ưԽ졢xen ͥ뤬ư褦ʵҤƤޤǤɸǥ֡Ȥ褦ˤꤵƤޤ󡣥֡Ȼ xen ͥ뤬Ư褦ˤˤ grub.conf ԽɬפǤ

GRUB ǥ֡Ȥݤ xen-kernel ɸǵư褦ˤˤϡե /boot/grub/grub.conf Խơxen ͥ֡Ȥ褦ԽƤ(*2)

ʲε /boot/grub/grub.conf Xen ۥޥΥͥ뤬ư褦ˤΤǤ

default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.18-1.2784.fc6)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.18-1.2784.fc6 ro root=LABEL=/1 rhgb quiet
        initrd /boot/initrd-2.6.18-1.2784.fc6.img 

title Fedora Core (2.6.18-1.2784.fc6xen)
        root (hd0,0)
        kernel /boot/xen.gz-2.6.18-1.2784.fc6
        module /boot/vmlinuz-2.6.18-1.2784.fc6xen root=LABEL=/1
        module /boot/initrd-2.6.18-1.2784.fc6xen.img

Xen ͭˤˡ

Xen ͥǥƥबưˡ˥ͥ뤬 xen бƤ뤫ɤǰΤ˳ǧŤʤޤXen ͥ뤬ưǤСʲΥޥɤ¹Ԥ fc6xen ȤҤ뤫ɤǧƤ

# uname -r
2.6.17-1.2600.fc6xen

# xm list
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0      610     1 r----- 12492.1

νϷ̤ϡXen ͥ뤬ɤ߹ޤƤȡDomain-0 (ۥ OS ) ƯǤʬޤ

ɸΥåȥåפǤϥ OS Υͥåȥ³ϡۥ OS ˼ưŪ˥֥åդƤƤĤޤꡢ OS ϼưŪ˥ۥ OS Ʊ IP ɥ쥹ưƤȤǤDHCP Ф IP ɥ쥹󶡤褦Ǥ뤫ΤͥåȥǤ顢 OS ФŬڤ IP ɥ쥹Ƥ褦꤬ɬפˤʤäƤޤͥåȥ³ˡϥե /etc/xen/xend-config.sxp եԽޤ

Fedora ȡƥι

Fedora Core 6 Ǥ Xen 󥹥ȡˤĤƤǤFedora Core 6 Υ OS anaconda(󥹥ȡ顼)򥵥ݡȤƤꡢȾѲǽˤʤäƤޤ󥹥ȡȤԤ xenguest-install ץѤ뤫GUI 󥿡ե virt-manager Ȥޤ

'xenguest-install' Ѥ Fedora ȡƥι

xenguest-install ץѤȡޥɥ饤Ǥ÷ʥ󥿥饯ƥ֡˥󥹥ȡȤȤʤޤ

# /usr/sbin/xenguest-install

OS ݤˤ͡ФƤǤ礦Τ褦ʾΤ --help ץ󤬽Ƥޤ®ǥ󥹥ȡȤ򽪤餻ʥåȡˤΤΥץ -x ks=options ⤢ޤ

  1. What is the name of your virtual machine? ٤ޤۥޥ̾ͤޤϥ OS ̤뤿˥٥ȸƤФˤʤꡢɬפȤʤΤǤ٥ xm ޥɤѤƲۥޥݤ䡢GNOME Xen ѥͥ(ץåȤǤ)ư virt-manager ɽ̾ˤʤޤ­Ƥޤȡǻꤷ̾եˤѤޤȤ /etc/xen/<̾> ե˥ OS Ф꤬Ҥޤ
  2. How much RAM should be allocated (in megabytes)? ټϤɤ (RAM)Ƥ뤫Ǥñ̤ MB(ᥬХ)ǻꤷޤȤ 256 MB ξ 256 ȤޤԥС Xen Ǥ 256 MB ʲ RAM ƤϿ侩ƤޤΤǤղ
  3. What would you like to use as the disk (path)? ٤μˤϥǥΥѥꤷޤ OS Ѥǥ᡼롦ǥΥեΥѥ̾ȤƻꤷޤȤ /home/joe/xenbox1 ȤäˡǤǻꤵ줿ե뤬 OS Υǥ᡼ƤȤʤޤ
  4. How large would you like the disk to be (in gigabytes)? ٥ǥ̤γƤ GB (Х)ñ̤ǻꤷޤɤ٤ŬڤǤ礦"ɸ"ʥǥեȡ˥󥹥ȡΤˤ 4 GB ٤̤ɬפȤʤޤ⤷Ǵ˥ѥ˥ե뤬¸ߤƤ硢μܤɽޤ
  5. Would you like to enable graphics support (yes or no): ٥ץꥱΥ󥹥ȡ顼򥰥եˤ뤫ɤyes no Ϥޤ
  6. What is the install location? ٥󥹥ȡ븵ȤʤϤɤǤμ Fedora Core 6 Υ󥹥ȡƱͤ anaconda ɤˡȤäƥ󥹥ȡ뤹뤫ˤʤޤϣĤꡢˤ NFSFTPHTTP ˤ⥵ݡȤƤޤʤξϥ󥹥ȡ롦ĥ꡼λŬڤ˹ԤäƤˡȤС줾켡Τ褦˻ꤷƤ

[] 󥹥ȡȤϥͥåȥͳǹԤʤƤϤޤ󡣥Υǥ CD-ROM ȤäƤΥ󥹥ȡϤǤʤΤǤǤۥ OS installation tree (󥹥ȥ졼󡦥ĥ꡼)ͽƤNFS ͭǥ쥯ȥȤѤˡ⤢ޤ

ơºݤΥ󥹥ȡȤϤ줫餬֤Ǥ⤷եʥ󥹥ȡĶѲǽǤ VNC ɥʤɤȤȤޤ⤷եʴĶǤʤȤ⡢ɸŪʥƥȷˤ륤󥹥ȡǽǤɤƱͤ˲ۥФ֤ǽǤ

'virt-manager' Ѥ Fedora ȡƥι

Υޥɤ root 桼¤ư뤳ȤˤäơGUI ˤ륰եʲۥޥեȤưǤޤ

# virt-manager

[] Gnome ˥塼 System Tools Virtual Machine Manager ¹Ԥݡ root ¤ǥ󤷤Ƥˤ root ѥɤϤɬפޤ󡣤⤷ root ¤̵ˤϥѥϤޤѥɤϤʤ read-only(꡼ɡ꡼򸫤) Ȥʤޤ

  1. "Open Connection"(³) ɥǡ"Local Xen Host"( Xen ۥ)ӡ"Connect"(³)򥯥åޤ
  2. virt-manager ɥβˤ "New" ()ܥ򲡤"File"(ե)"New"()Ӥޤ
  3. ܥ򲡤ȡޥɥ饤 xenguest-install (嵭Ǵ)ˤˤĤμ䤬ɽ륦ɷǥåȥåפʤߤޤɷǤϥեѤꤷƤޤΤǡޥɥ饤Τ褦Ϥ̤ɬפȤʤ뤳ȤϤޤ
  4. ɤκǽڡ "Finish"(λ)ܥ󤬤ޤܥ򥯥åȥ OS ޤ֤ФĤȡVNC ɥ̤̾Υ󥹥ȡ³ޤ

󥹥ȡκ

OS Υ󥹥ȡ GUI virt-manager ץफޥɥ饤Ǥ xm ޥɤѤƴ뤳Ȥˤʤޤ

'virt-manager' ǥե˲ۥޥ

Υޥɤ¹Ԥ뤳ȤǡGUI Virtual Machine Manager ( OS ޥ͡)ưǤޤ

# virt-manager

root 桼ưƤʤˤ root ѥɤϤޤѥɤϤʤ֤Ǥѹθ¤ʤƻ⡼ɤȤʤޤ

  • "Open Connection"(³) ɥǡ"Local Xen Host"( Xen ۥ)ӡ"Connect"(³)򥯥åޤ
  • ᥤ󡦥ɥDzۥޥΰɽޤ"Domain 0" ɽƤΤϥۥ OS (ۥȡԥ塼)Ǥ
  • ۥޥ󤬰ɽƤʤ硢ǽȤƲۥޥưƤʤͤޤۥޥƯˤ "File"(ե)"Restore a saved machine..."(ۥޥν)򤷤ơ OS Υǥ᡼ȤʤäƤե򤷤ޤ
  • ̾ˤϤ줾 CPU Ψʤɤɽޤɽܤѹ "View"(ɽ)˥塼Ǥ
  • ۥ󥽡(virtual console)򳫤ˤϡۥޥ̾ξǥ֥륯åޤ
  • ۥޥΥϡɥǽѹˤ "View"(ɽ)"Details"(ܺ) 򥯥åƤ
  • ꥢ롦󥽡(serial console)ľܥʥեʥʤˤˤ"View"(ɽ)"Serial Console"(ꥢ롦󥽡)Ǥ

virt-manager ˴ؤ뵡ǽܺپˤĤƤȯץȤΥ֥

virt-manager ΥХˤĤƤ BugZilla 'virt-manager' 𤤤ȹǤ

'virsh' ǥޥɥ饤󤫤鲾ۥޥ

virsh 桼ƥƥϥޥɥ饤DzۥޥδǽȤΤǤvirsh libvirt API ƤΤǡ Xen xm ġ¿Ƥޤ

  • virsh Xen ξ֤򹹿ݤˡäȤޥɷʸˡʸ(semantic)󶡤Ƥޤ
  • virsh Ȥø桼ǤʤȤ(root ¤ʤƤ)read-only (꡼ɡ꡼)ưǽʤΤǡۥޥΥɥᥤܺپɽǽǤ
  • virsh (Ū) libvirt ϥѡХǽġ(agnostic)ȤơƱͤδġǤ QEMUVMWare ʤɤβۥޥ Xen Ʊͤ˴Ǥ褦ˤʤǤ礦

ۥޥ XML vm եȤäƹۤ뤳ȤǤޤ

# virsh create <path to VM xml config>

߲Ưβۥޥɽˤϡ

# virsh list  

OS Ŭڤߤ뤿ˤϡ

# virsh shutdown <virtual machine (name | id | uuid)>

򤷤 OS βۥޥΥʥåסå*3¸ˤϡ

# virsh save <virtual machine (name | id | uuid)> <filename>  

¸Ƥ륹ʥåסåȤ줵ˤϡ

# virsh restore <filename>

ۥޥ˴Ϣ XML եǽϤˤϡ

# virsh dumpxml <virtual machine (name | id | uuid)

Τۤvirsh ѤˤäƤΥޥɥ饤Υץɽˤ

# virsh help 

嵭Υޥɤ¹Ԥ뤫뤤ϥޥ˥奢 virsh(1) 򻲾ȤƤ$ man virsh ˡ

virsh ΥХˤĤƤ BugZilla 'virsh' 𤤤ȹǤ

'xm' ǥޥɥ饤󤫤鲾ۥޥ

virsh ޥɰʳˤ⡢ۥޥ򥳥ޥɥ饤Ǵ뤿 xm 桼ƥƥѤ뤳ȤǤޤxm Xen òġǤۥޥ˥ꥢ롦󥽡³ˤϡ

# /usr/sbin/xm create -c <name of virtual machine> 

߲Ưβۥޥɽˤϡ

# xm list

OS ߤˤϡ

# /usr/sbin/xm shutdown <virtual machine name>

ե˥ХååפȤƲۥޥΥʥåסåȤ¸ˤϡ

# /usr/sbin/xm save <virtual machine name> /<filename>

¸줿ʥåסåȤ줹ˤϡ

# /usr/sbin/xm restore /<filename>

top ޥɤΤ褦ۥޥξɽˤϡ

# /usr/sbin/xm top

Τۤxm ѤˤäƤΥޥɥ饤Υץɽˤϡ

# /usr/sbin/xm help

xm ΥХˤĤƤ BugZilla 'xen' 𤤤ȹǤ

ȥ֥륷塼ƥ󥰡ʺäȤϡ

եˤĤ

Xen Ϣ褹뤿ᡢĤΥǥХåϤե뤬Ͽޤ/var/log/xen/xend.log ˤ xm.log Ʊ٤ΥϿޤǯʤ顢ե˵ϿûΤǡʬͤˤǤΤǤʤˤƤûΤǤޤͭѤȤϤʤΤǤʲ NetBSD/xen ͥ뤫饲 OS 褦ȤȤΤΤǤ

[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/xen/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

Xen ˴ؤƲ餫Υ顼ȯȤˤ /var/log/xen/xend.log /var/log/xen/xend-debug.log ˵Ͽޤ

۴(fully-virtualized)줿 OS (ɥᥤ)Ѥ㤨С¹ԻѹԲǽ OS Ѥˡξ /var/log/xen/qemu-dm*.log ȤƴϢ¸ޤ

ǸˡϥѡХ¦(ۥ OS Υƥ)ưϼΥޥɤdzǧǽǤ

# xm dmesg

ꥢ롦󥽡

ۥȤؤΥꥢ롦󥽡³

񤷤н褹硢ꥢ롦󥽡³˽ȤʤǤ礦Xen ͥ뼫ȤߤƤޤϥѡХ顼ȤʤäƤޤݤʤɡ餫Υ顼롦ۥȾ˵ϿƤޤꥢ롦󥽡³ˤäơ⡼ȡۥȤξǧ뤳ȤǤΤǤ

Xen ۥ OS Фƥꥢ롦󥽡ϤԤϥåȥå׺ȤɬפǤ뤳Ȥǡ⡼ȡۥȤξİǽȤʤޤΤˤ /etc/grub.conf ԽɬפǤʲϵǤ

title Fedora Core (2.6.17-1.2600.fc6xen)
        root (hd0,2)
        kernel /xen.gz-2.6.17-1.2600.fc6 com1=38400,8n1 sync_console
        module /vmlinuz-2.6.17-1.2600.fc6xen ro root=LABEL=/ rhgb quiet console=ttyS0 console=tty pnpacpi=off
        module /initrd-2.6.17-1.2600.fc6xen.img

λǤϥꥢ롦󥽡 com1 ݡȡLinux /dev/ttyS0ˤФ 38,400 bps ®٤̿ȤԤäƤޤ"sync_console" ϥϥѡХʥۥ OS ˾Υ󥽡ϤߤƤޤäƤݤͭѤȤʤΤǤ"pnpacpi=off" ϤưԤݤɬפȤʤ ACPI ̵ˤ륪ץǤ"console=ttyS0 console=tty" ΰ̣ϥͥνϤ륨顼å(̾ dmesg ǤǧǤޤˤ VGA 󥽡ľܷҤ줿ǥץ쥤ȡꥢ롦󥽡ФƤƱ˽ϤԤȤԤΤǤκȤѤޤƤСttywatch ץꥱfedora-extras ˼ǼƤޤˤѤơ⡼ȥۥȤΥ󥽡Υ顼ǥͳǼ뤳ȤǤޤ⡼ȾǤϡ

# ttywatch --name myhost  --port /dev/ttyS0  

뤳ȤǡϤ /dev/ttyS0 ե /var/log/ttywatch/myhost.log ˵Ͽѹ뤳ȤǤޤ

¹Բ OS ξ

¹Բ(para-virtulized) OS ξϡDomain-0 ۥ OS εǽȤƼưŪ˥ꥢ롦󥽡ϤƤޤޥɥ饤夫黲ȤˤϡΤ褦Ϥޤ

# xm console

뤤ϡե virt-manager ץȤäƥꥢ롦󥽡ϤԤȤޤñɽϥ˥塼С "View"(ɽ)"Serial console"(ꥢ롦󥽡)'console'(󥽡)'details'(ܺ)ɥ򻲾ȤƤ

۴ OS ξ

۴(fully-virtualized) OS ξ⼫ưŪ˥ꥢ롦󥽡ϤԤȤޤ OS Υͥϴ˥ܥå褦ꤵƤޤäƤ뤿ᡢΤޤޤξ֤ǤϾǧ뤳ȤǤޤLinux ۴줿֤ǤΥȤξ֤ǧ /etc/grub.conf Խ OS δҤ'console=ttyS0 console=tty0'ɲäɬפޤΤȤˤꡢꥢ롦󥽡롢ޤϥեʥġ夫ǧǤ褦ˤʤޤǧˡϲ¹Բ OS λƱͤǤ

# xm console

뤤ϡե virt-manager ץȤäƥꥢ롦󥽡ϤԤȤޤñɽϥ˥塼С "View"(ɽ)"Serial console"(ꥢ롦󥽡)'console'(󥽡)'details'(ܺ)ɥ򻲾ȤƤ

OS Υǥ᡼ΥǡؤΥ

lomount kpartx Ȥ OS Υǥ᡼˥ݤˤȤƤΩĥġ뤬ޤ OS Domain-0 ưƤ֤ǻѤʤǤ ⤷Ư˻ȤäƤޤȥǡ»뤪줬ޤ줰⤴ղ

  • lomount
# lomount -t ext3 -diskimage /xen/images/fc5-file.img -partition 1 /mnt/boot

lomount Ͼʥǥ᡼ȤưƤǤꡢLVM ܥ塼򰷤ȤϤǤޤ󡣤ʣԤˤ kpartx (device-mapper-multipath RPM) ѤƤ

  • kpartx
# yum install device-mapper-multipath
# kpartx -av /dev/xen/guest1
add map guest1p1 : 0 208782 linear /dev/xen/guest1 63
add map guest1p2 : 0 16563015 linear /dev/xen/guest1 208845

̾Υ֥åǥХФƤΤưΤǡ OS 󥹥ȡ뤵Ƥ륤᡼եΤǤϤʤȤղե롦᡼갷ˤϡޤ롼ץХåǥХʤƤϤޤ

# losetup -f
/dev/loop0
# losetup /dev/loop0 /xen/images/fc5-file.img
# kpartx -av /dev/loop0
add map loop0p1 : 0 208782 linear /dev/loop0 63
add map loop0p2 : 0 12370050 linear /dev/loop0 208845

Ǥϡɸ Fedora Core 󥹥ȡ뤵եޥåȤ줿˥᡼Ȥ߹Ǥޤ /boot ȣĤ LVM ܥ塼Ǥˤ /dev/mapper 򻲾Ȥޤ

# ls -l /dev/mapper/ | grep guest1
brw-rw---- 1 root disk 253,  6 Jun  6 10:32 xen-guest1
brw-rw---- 1 root disk 253, 14 Jun  6 11:13 guest1p1
brw-rw---- 1 root disk 253, 15 Jun  6 11:13 guest1p2
# mount /dev/mapper/guest1p1 /mnt/boot/

ܤΥѡƥǤ LVM ܥ塼˥뤿ˤ "vgscan" ȤäƾγǧԤޤɸ "VolGroup00" Ȥѡƥ̾ѹˤ "vgchange -ay" Ѥޤ

# kpartx -a /dev/xen/guest1
# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "VolGroup00" using metadata type lvm2
# vgchange -ay VolGroup00
  2 logical volume(s) in volume group "VolGroup00" now active
# lvs
  LV        VG         Attr   LSize   Origin Snap%  Move Log Copy%
  LogVol00  VolGroup00 -wi-a-   5.06G
  LogVol01  VolGroup00 -wi-a- 800.00M
# mount /dev/VolGroup00/LogVol00 /mnt/
...
# umount /mnt
# vgchange -an VolGroup00
# kpartx -d /dev/xen/guest1

[]"vgchange -an"Ȥäܥ塼˥ݤˤºݤΥܥ塼ȺƱʤ褦դʧäƤܥ塼̾ѹɤǤ礦ܥ塼κ "kpartx -d" 򡢡ѲǽǤС˥롼סǥХ "losetup -d" ȤäƺƺȤλΤɤǤ礦ˤϣĤͳޤĤϡFedora Core ɸΥ󥹥ȡѤܥ塼̾ VolGroup00 ȤκƱǤºݤˤϰۤʤäĤ LVM ܥ塼बưƤΤǤƱ̾äƤ֤ˤʤäƤ뤿Ǥƥ LVM Ŭڤưޤ䤿λȤ¦ˤȤäƤϺͤޤä˥ޥɥ饤ǤդɬפǤ
⤦ĤͳȤơ⤷ OS ѤʤʤäȤDomain-0 ˤϰ LVM ˤϣĤΥܥ塼बĤ³ˤʤޤ⤷dom0 ȥȤ줾Υܥ塼बƱư뤳ȤСˤäƤϥǡ»򾷤ͤʤǤ

FAQ(褯Ȳ)

  • 䡧xend ư褦ȤƤޤⵯޤ'xm list'ޥɤ¹ԤȼΤ褦ʥ顼ɽޤ
    Error: Error connecting to xend: Connection refused.  Is xend running?
    ǡȤ xend εưߤޤޤ顼ɽƤޤޤ
ERROR: Could not obtain handle on privileged command interface (2 = No such file or directory)
Traceback (most recent call last):
  File "/usr/sbin/xend", line 33, in ?
    from xen.xend.server import SrvDaemon
  File "/usr/lib/python2.4/site-packages/xen/xend/server/SrvDaemon.py", line 21, in ?
    import relocate
  File "/usr/lib/python2.4/site-packages/xen/xend/server/relocate.py", line 26, in ?
    from xen.xend import XendDomain
  File "/usr/lib/python2.4/site-packages/xen/xend/XendDomain.py", line 33, in ?
    import XendDomainInfo
  File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 37, in ?
    import image
  File "/usr/lib/python2.4/site-packages/xen/xend/image.py", line 30, in ?
    xc = xen.lowlevel.xc.xc()
RuntimeError: (2, 'No such file or directory')

ɤ Xen ϥѡХʲ۲бˤǤϤʤ Linux ͥưƤޤä褦˸ޤxen бͥ뤫ɤǧƤߤƤ
뤤ϡư xen ϥѡХбͥɤ߹褦򤷤Ƥʤ⤷ޤкȤƤ grub.conf Խ xen бͥɸɤ߹褦ꤷƤߤƤ

  • 䡧 OS 褦Ȥ "Invalid argument"(̵ʰ)ɽƤޤޤ

Ѥ褦ȤƤ륫ͥΥ᡼xen ϥѡХŬʲǽޤ⤷Fedora Core 5 Ǻ᡼PAE ĥбˤ Fedora Core 6(PAE ĥб)ǻѤ褦ȤȡΥ顼ޤ

  • 䡧yum ΥåץǡȤˤäƿͥꤷޤΤӤ grub.conf ˽񤭴ƤޤޤϾ xen бͥɤ߹ߤΤǤɤΤ褦нˡǤ礦

linux ͥ RPM ѥåϡ⤷ʤȤ grub.conf ǿΥͥ˽񤭴Ƥޤޤǡ/etc/sysconfig/kernel ե񤭴 'kernel-xen' ꤷ xen бͥɤ߹ޤ褦 grub.conf ɸȤ뤳ȤǤޤ

äȤˤϡ

嵭Υȥ֥롦塼ƥ󥰤ˤĤʤʤ褦Ǥ顢Red Hat Bugzilla Fedora Core 6 ˴ؤ Xen ΥݡȤǧƤߤƤ"Fedora Core" Ǥ xen Υȥ֥ "Linux ͥ" ˵Τȡ"xen" ΤΤ˵Хβǽ뤿ǤХ򤷤Ƥȡxen ôԤͭѤʥɥХ󼨤Ƥ뤫⤷ޤ

Xen ΤΤ˴ؤŪʾ˴ؤƤ Xen ץȤɥ᡼󥰥ꥹȤβ

ǸդäƤޤȡFedora ץȤǤ Xen ݡȤΤ᡼󥰥ꥹ Fedora Xen Mailing list ߤƤꡢǤˤĤĤʤƤޤ

­

  • *1 GRUB ѤΤϡ Xen Linux ۴Ķ¸뤿ˤѥͥλ꤬ɬפʤǤΤˤϡʣΥ֡ȤǽȤ֡ȥĤޤ GRUB ɬפȤޤGRUB ʳΥ֡ȥȤȤꤵƤޤˡ
  • *2 ե /etc/sysconfig/kernel Խǡɸ൯ư linux ͥ kernel-xen ѥåбΡʼưͭˤˤ뤳Ȥޤ

http://fedoraproject.org/wiki/FedoraXenQuickstartFC6?highlight=%28Xen%29%7C%28quickstart%29

*1 Xen֥פɤߤޤ
*2 PAEPhysical Address Extension֥ԡס 4 GB ʾΥ򥵥ݡȤ뤳
*3 ܥ塼٥δʥХååפλǤ̿򻣤褦ˤȤ̣ǥʥåסåȤȸƤФƤޤ

ȥå   Խ ʬ Хåå ź ʣ ̾ѹ   ñ측 ǽ   إ   ǽRSS
Last-modified: Tue, 29 May 2007 23:57:58 JST (6406d)