2008年10月30日にUbuntu 8.10(Intrepid Ibex)がリリースされました。
従来通り、Ubuntu 8.10にもDesktop版とServer版があります。
仮想マシン関連での機能強化ポイントはXen 3.3対応コンポーネント搭載とVMBuilderのサポートです。
(1)Xen 3.3対応コンポーネント搭載関連
・明示的なXenカーネルは付属していません。
・しかしUbuntu 8.10 ServerカーネルはXen 3.3準仮想化ゲスト(PVゲスト)用カーネルとしても動作します(Xen専用カーネルの不要化)。
(このXen専用カーネルの不要化は他のディストリビューションに先駆けての実装ですがgeneric/rtカーネルは対象外です)
・Desktop版及びServer版共にDomain0にはなれません(Ubuntu 8.04から後退しています)。
・Domain0になれない代りにXenner(KVM上のXenエミュレータ)が付属しています(xenner 0.41)。
・Server版カーネルコンポーネント(vmlinuz, initrd.img, カーネルモジュール)はKVMゲストとXenゲストで共用できます。
(2)VMBuilder関連
・従来のubuntu-vm-builderコマンドがvmbuilderコマンドに置き変わりました。
※パッケージレベルではUbuntu 8.04のubuntu-vm-builder 0.4はpython-vm-builder 0.9とubuntu-vm-builder 0.9に置き変わりました。
・VMBuilder機能では多種多様なJeOS(仮想マシン環境用最小サーバOS)を自動生成できます。
※サポート対象の仮想マシン環境はKVM, Xen, VMware Workstation 6.x, VMware Server 2.0/1.x系, VMware Fusion 2.0です。
ここではUbuntu 8.10 日本語 Remix CD版でのVMBuilderの利用とKVMゲスト/Xenゲストカーネル共用方法を中心に紹介します。
尚、今回使用したCPUはIntel Core 2 Duo E6600です。
<interface type='network'>
<source network='default'/>
</interface>
|
<interface type='bridge'>
<source bridge='br0'/>
</interface>
|
|
# vmbuilder kvm ubuntu --suite intrepid --flavour virtual --arch i386 -o --libvirt qemu:///system |
|
# vmbuilder xen ubuntu --hostname pvubuntu --domain mydomain.net --suite intrepid --flavour virtual --arch i386 |
|
# vmbuilder vmserver ubuntu --hostname vmsvubuntu --domain mydomain.net --suite intrepid --flavour virtual --arch i386 |
# Configuration file for the Xen instance Ubuntu, created # by VMBuilder kernel = '/boot/vmlinuz-2.6.24-21-xen' ramdisk = '/boot/initrd.img-2.6.24-21-xen' memory = 128 root = '/dev/xvda1 ro' disk = [ 'tap:aio:/root/ubuntu-pv/root.img,xvda1,w', 'tap:aio:/root/ubuntu-pv/swap.img,xvda2,w' ] name = 'Ubuntu' vif = [ 'mac=00:0c:29:4a:5f:0d, bridge=eth0' ] #dhcp = 'dhcp' on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart' extra = 'xencons=tty console=tty1 console=hvc0' |
|
Linux kernel x86 boot executable RO-rootFS, root_dev 0x801, swap_dev 0x2, Normal VGA |
# Configuration file for the Xen instance Ubuntu, created # by VMBuilder kernel = '/root/ubuntu-xen/vmlinuz-2.6.27-7-server' ramdisk = '/root/ubuntu-xen/initrd.img-2.6.27-7-server' memory = 256 root = '/dev/xvda1 ro' disk = [ 'tap:aio:/root/ubuntu-pv/root.img,xvda1,w', 'tap:aio:/root/ubuntu-pv/swap.img,xvda2,w' ] name = 'Ubuntu' vif = [ 'mac=00:0c:29:4a:5f:0d, bridge=xenbr0' ] #dhcp = 'dhcp' on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart' extra = 'xencons=tty console=tty1 console=hvc0' |
root@ubt810sv:~# service xenner restart
* Stopping xenner xenner [fail]
/etc/init.d/xenner: line 123: /var/log/netbackd.log: No such file or directory
* Starting xenner xenner
* Starting evtchnd evtchnd [ OK ]
* Starting xensored xenstored [ OK ]
* Starting xenconsoled xenconsoled [ OK ]
* Starting xen block devices xenblkbackd [ OK ]
* Starting xen netblock netbackd [ OK ]
root@ubt810sv:~# ps aux|grep xen
root 7327 0.1 0.0 2188 644 ? S 21:30 0:00 /usr/sbin/xenstored --no-domain-init ※便宜上ここで折り返し
--pid-file /var/run/xenstored.pid --trace-file /var/log/xenstored.trace
root 7374 0.0 0.0 3236 792 pts/0 R+ 21:30 0:00 grep xen
root@ubt810sv:~#
|
|
[xenner,1] do_fork_exec: "/usr/lib/xen/bin/xenconsole" "7383" xenconsole: Could not contact XenStore: Connection refused |
|
evtchn_ioctl: write: -1/32 (Resource temporarily unavailable) xenconsole: Could not read tty from store: No such file or directory |
|
# vmbuilder kvm ubuntu --suite intrepid --flavour virtual --arch amd64 --hostname kvmu810x64 -o --libvirt qemu:///system --addpkg openssh-server |
# fdisk -lu disk0.img
You must set cylinders.
You can do this from the extra functions menu.
Disk disk0.img: 0 MB, 0 bytes
4 heads, 32 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x000abb15
Device Boot Start End Blocks Id System
disk0.img1 32 7998079 3999024 83 Linux
Partition 1 has different physical/logical endings:
phys=(1023, 3, 32) logical=(62484, 3, 32)
disk0.img2 7998080 9998079 1000000 82 Linux swap / Solaris
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(1023, 3, 32) logical=(62485, 0, 1)
Partition 2 has different physical/logical endings:
phys=(1023, 3, 32) logical=(78109, 3, 32)
# mount -o loop,offset=$((512*32)) disk0.img /mnt
# ls /mnt
bin dev home lib lost+found mnt proc sbin sys usr vmlinuz
boot etc initrd.img lib64 media opt root srv tmp var
仮想ディスクの操作後アンマウントを実行。
# umount /mnt
|