20. 20
Red HatのKVMによりサポートされるゲストOS
• virtioドライバ(ゲストOS用ドライバ)が提供されており、
パフォーマンスが期待できるもの
– EL3.9 (32bit, 64bit), EL4.7(32bit, 64bit), EL5.3 (32bit, 64bit)
– Windows Server 2003 (32bit, 64bit), 2008 (32bit, 64bit)
– Windows XP (32bit) – Network driver only
– Windows 2000=NG Windows Vista, 7=?
• RHEL5により公式サポートされるもの
– EL3(32bit), EL4(32bit or 64bit), EL5(32bit or 64bit)
– Windows Server 2003 (32bit, 64bit), 2008 (32bit, 64bit)
– Windows XP (32bit)
※公式なサポート状況はRed Hatにご確認ください
40. 40
仮想化環境におけるメモリ利用イメージ
非仮想化
環境の場合
0GiB -
OS Kernel
Process 2
ユーザプロセスから
見えるメモリ空間物理メモリ
Hypervisor
Guest OS 1
Guest OS 2
Guest OS 3
Guest OS 4
OS Kernel
Process 1
Process 2
Process 3
Process 4
ゲストOSの
メモリ空間
OS Kernel
Process 1
Process 2
Process 3
Process 4
64GiB -
仮想化環境の場合
物理メモリ
41. 41
KVM, QEMUにおける
VMへのメモリ領域割当 #1
• VMのメモリ空間はqemu-kvm
( QEMU)のデータ領域として確保さ
れる
– 他の一般なプロセスと同じ扱い
• Linuxカーネルから見ればただのユー
ザスペースのデータ領域に過ぎない
• VM割り当てメモリサイズの上限
– qemu-kvm + VM Imageの合計が
プロセス最大メモリサイズに収まる
必要がある
– 32bit / 32bit PAE …… < 4GB
– x86_64 …… 4GB以上可能
Linux Kernel
qemu-kvm (or QEMU)
VM Image
process
process
process
物理メモリ
52. 52
Serial
Port
Serial
Port
Parallel
Port
Parallel
Port
PIIX3 PCI IDEPIIX3 PCI IDE
PIIX3 PCI USBPIIX3 PCI USB
PCI SlotPCI Slot
PCI SlotPCI Slot
LSI Logic
LSI53c895a
LSI Logic
LSI53c895a
System MemorySystem Memory
Bochs
Flash BIOS
Bochs
Flash BIOS
Real Time
Clock
Real Time
Clock
Cirrus Logic
CL-GD5446
Cirrus Logic
CL-GD5446
Realtek
RTL8029
Realtek
RTL8029
Ensoniq
ES1370
Ensoniq
ES1370
ISA
Bus
ISA
Bus
ISA
I/O Interface
ISA
I/O Interface
FloppyFloppy
PC SpeakerPC Speaker
PCI
Bus
PCI
Bus
Intel 82371 PIIX3
(South-bridge)
Intel 82371 PIIX3
(South-bridge)
CPUCPU
VGAVGA
EthernetEthernet
SpeakerSpeaker
SCSI HDDSCSI HDD
IDE HDDIDE HDD
CD-ROMCD-ROM
USBUSB
KeyboardKeyboard
MouseMouse
PS/2PS/2
QEMUによる
x86ハードウェアエミュレーション
出典: KVM徹底入門 (2010年 翔泳社)
Intel 82441FX
(North-bridge)
Intel 82441FX
(North-bridge)
80. 80
(番外編)ZFSを正しく動かすのは難しい
• ZFSをPC, PCサーバ, 仮想マシンの上で正しく動かすのは難しい
– ZFSの設計思想のひとつ:信頼性
– End to End Checksum
• 上記実現のために前提条件として要求されるもの
– 正しいエラー通知をするハードウェア、ドライバ
– 必要なライト操作は同期I/Oで行われること
– “絶対に壊れないZFS Intent Log(ZIL)” ※ZIL利用時
• Xenの上で実行するにあたり
– blktapの”tap:aio:…”もしくは”tap:sync:…”を使う
81. 81
RAID-Z障害の例(1)
root@os200811:~# zpool status array1
pool: array1
state: DEGRADED
status: One or more devices are faulted in response to persistent errors.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Replace the faulted device, or use 'zpool clear' to mark the device
repaired.
see: http://www.sun.com/msg/ZFS-8000-K4
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
array1 DEGRADED 0 0 0
raidz1 DEGRADED 0 0 0
c3d1p1 ONLINE 0 0 0
c3d2p1 FAULTED 8 7.56M 0 too many errors
c3d3p1 ONLINE 0 0 0
84. 84
いまは平和に動いています
toor@vm230:~$ pfexec zpool status array1
pool: array1
state: ONLINE
status: The pool is formatted using an older on-disk format. The pool can
still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'. Once this is done, the
pool will no longer be accessible on older software versions.
scrub: scrub completed after 3h40m with 0 errors on Fri Mar 12 01:20:10 2010
config:
NAME STATE READ WRITE CKSUM
array1 ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
c6t1d0p0 ONLINE 0 0 0
c6t2d0p0 ONLINE 0 0 0
c6t3d0p0 ONLINE 0 0 0
logs
c6t4d0p0 ONLINE 0 0 0
errors: No known data errors
88. 88
外部リソース集 (3/3)
– 書籍『Virtual Machines: Versatile Platforms for Systems and Processes
(The Morgan Kaufmann Series in Computer Architecture and Design)』
http://www.amazon.com/dp/1558609105/
※ハードカバー&分厚いので amazon.com から Kindle 版の購入をお勧め!