2008年1月16日にXen 3.2がリリースされました。
(Xen 3.2ではデスクトップユーザ向けに「HVMドメインでのVGA表示の高速化」が図られています)
2008年4月にはそのXen 3.2を搭載したUbuntu 8.04がリリースされました。
WubiでWindowsパーティションの仮想ディスクにインストールしたUbuntu 8.04でXen動作を確認してみました。
ここではubuntu-xen-desktopを利用してのXen 3.2環境構築手順を紹介します。
尚、今回使用したVGAカードはnVIDIA GeForce 7600GTです。
name = "ttylinux" memory = "64" kernel = "/root/ttylinux/boot/vmlinuz-2.6.9-42.0.3.EL.xs0.4.0.263xenU" vif = [ 'mac=00:00:00:00:00:12, bridge=eth0' ] disk = ['tap:aio:/root/ttylinux/ttylinux-xen,sda1,w'] root = "/dev/sda1 ro" |
# network device name INTERFACE="eth0" # set to "yes" to use DHCP instead of the settings below DHCP="no" # interface settings # IP address IPADDRESS="ttylinuxのIPアドレス" ※ホスト側の物理ネットワークアドレス体系が使用できます。 # netmask NETMASK="255.255.255.0" # broadcast address BROADCAST="xx.xx.xx.255" |
No filesystem could mount root, tried: cramfs Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1) |
Error: (2, 'Invalid kernel', 'xc_dom_compat_check: guest type xen-3.0-x86_32 not supported by xen kernel, sorry\n') |
kernel = "/boot/vmlinuz-2.6.24-19-xen" ramdisk = "/boot/initrd.img-2.6.24-19-xen" memory = 256 name = "Vine4U" vif = [ 'mac=00:16:3e:00:00:11, bridge=eth0' ] disk = [ 'tap:aio:/guest/vine40ideshare-flat.vmdk,xvda,w' ] root = "/dev/xvda1 ro" extra = "5 xencons=tty" |
kernel = "/boot/vmlinuz-2.6.24-19-xen" ramdisk = "/boot/initrd.img-2.6.24-19-xen" memory = 512 name = "Ubuntu804U" vif = [ 'mac=00:0c:29:4a:5f:0d, bridge=eth0' ] disk = [ 'tap:aio:/guest/altubt804-flat.vmdk,xvda,w' ] root = "/dev/xvda1 ro" extra = "xencons=tty" |
name = "xmLiveCDHVM" builder = "hvm" memory = 512 disk=['tap:aio:/root/mydisk.img,hda,w','phy:/dev/cdrom,hdc:cdrom,r'] vif=['type=ioemu,bridge=eth0'] device_model = "/usr/lib/xen/bin/qemu-dm" kernel = "/usr/lib/xen/boot/hvmloader" sdl=1 pae=1 boot= 'd' |
name = "xmubt804hvm" builder = "hvm" memory = 512 disk=['tap:aio:/guest/ubt804hvm.img,hda,w','phy:/dev/cdrom,hdc:cdrom,r'] vif=['type=ioemu,bridge=eth0'] device_model = "/usr/lib/xen/bin/qemu-dm" kernel = "/usr/lib/xen/boot/hvmloader" sdl=1 pae=1 |
Section "Monitor" Identifier "Configured Monitor" Option "DPMS" HorizSync 30-96 VertRefresh 50-160 EndSection |
xen-create-image \ --install-method=debootstrap \ --dir=/guest \ --kernel=/boot/vmlinuz-2.6.24-19-xen \ --initrd=/boot/initrd.img-2.6.24-19-xen \ --memory=512MB \ --size=6GB --swap=1GB \ --hostname=parau804 \ --ip=192.168.0.118 --netmask=255.255.255.0 --gateway=192.168.0.1 \ --mirror=http://jp.archive.ubuntu.com/ubuntu/ --dist=hardy --arch=i386 |
kernel = '/boot/vmlinuz-2.6.24-19-xen' ramdisk = '/boot/initrd.img-2.6.24-19-xen' memory = '512' root = '/dev/xvda2 ro' disk = [ 'file:/guest/domains/parau804/swap.img,xvda1,w', 'file:/guest/domains/parau804/disk.img,xvda2,w', ] name = 'parau804' vif = [ 'ip=192.168.0.118,mac=00:16:3E:AE:B1:A2' ] on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart' extra = '2 console=xvc0' |
# xm block-attach 0 tap:aio:/guest/domains/parau804/disk.img xvda2 w ※ Domain0へのアタッチ # mount /dev/xvda2 /mnt ※ マウント操作 # /mntの中の操作 # umount /mnt ※ アンマウント # # xm block-detach 0 xvda2 ※ Domain0からのデタッチ(切り離し) |
[daemon] RemoteGreeter=/usr/lib/gdm/gdmgreeter StandardXserver=/usr/X11R6/bin/Xvfb [security] AllowRoot=true AllowRemoteRoot=true DisallowTCP=false [xdmcp] Enable=true [gui] [greeter] [server-Standard] ※このセクション自体を追加して以下の行を指定します。 command=/usr/X11R6/bin/Xvfb |
service vncserver1 { disable = no socket_type = stream wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 1024x768 -depth 16 securitytypes=none -extension XFIXES } |
name = "xmLiveCDHVM" builder = "hvm" memory = 512 disk=['tap:aio:/root/mydisk.img,hda,w','phy:/dev/cdrom,hdc:cdrom,r'] vif=['type=ioemu,bridge=eth0'] device_model = "/usr/lib/xen/bin/qemu-dm" kernel = "/usr/lib/xen/boot/hvmloader" sdl=1 pae=1 boot= 'd' |
name = "hvmubt8041" builder = "hvm" memory = 768 disk=['tap:aio:/guest/kvmubt8041flat4gb.img,hda,w','phy:/dev/cdrom,hdc:cdrom,r'] vif=['type=ioemu,mac=00:16:3e:07:bf:fb,bridge=eth0'] # KVMでのMACアドレスに合わせます device_model = "/usr/lib/xen/bin/qemu-dm" kernel = "/usr/lib/xen/boot/hvmloader" sdl=1 pae=1 |
title Ubuntu 8.04.1, kernel 2.6.24-19-xen root (hd0,0) kernel /boot/vmlinuz-2.6.24-19-xen root=UUID=1652205d-0876-41e0-8b3f-f6c162afd7f3 ro quiet splash initrd /boot/initrd.img-2.6.24-19-xen quiet |
name = "pvubt8041" uuid = "1652205d-0876-41e0-8b3f-f6c162afd7f3" # GRUBでのUUIDに合わせます memory = 768 vcpus = 1 bootloader = "/usr/bin/pygrub" on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" vfb = [ "type=vnc,vncunused=1" ] disk = [ "tap:aio:/guest/kvmubt8041flat4gb.img,xvda,w" ] vif = [ "mac=00:16:3e:07:bf:fb,bridge=eth0" ] extra = '2 console=xvc0' |
name = "upvcent52" memory = 512 vcpus = 1 bootloader = "/usr/bin/pygrub" disk = [ "tap:aio:/guest/x33pvcent52flat4gb.img,xvda,w" ] vif = [ "mac=00:16:3e:4c:c4:43,bridge=eth0" ] on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" extra = "5 console=xvc0" |
title Ubuntu 8.04.1, kernel 2.6.24-19-xen root (hd0,0) kernel /boot/vmlinuz-2.6.24-19-xen root=UUID=906e293e-9e84-4f04-a559-908a75ac020d ro quiet splash initrd /boot/initrd.img-2.6.24-19-xen quiet |
/usr/bin/qemu -M pc -no-kqemu -m 512 \ -boot c -hda /guest/anyubt8041flat4gb.img -cdrom /dev/scd0 \ -net nic,macaddr=00:16:3e:6c:2e:95 \ -net user & |
/usr/bin/qemu -M pc -no-kqemu -m 512 \ -boot c -hda /guest/anyubt8041flat4gb.img \ -net nic,macaddr=00:16:3e:6c:2e:95 \ -net user -name "on Xen" & |
name = "hvmanyu8041" builder = "hvm" memory = 768 disk=['tap:aio:/guest/anyubt8041flat4gb.img,hda,w','phy:/dev/cdrom,hdc:cdrom,r'] vif=['type=ioemu,mac=00:16:3e:6c:2e:95,bridge=eth0'] device_model = "/usr/lib/xen/bin/qemu-dm" kernel = "/usr/lib/xen/boot/hvmloader" sdl=1 pae=1 |
name = "pvany8041" uuid = "906e293e-9e84-4f04-a559-908a75ac020d" memory = 768 vcpus = 1 bootloader = "/usr/bin/pygrub" on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" vfb = [ "type=vnc,vncunused=1" ] disk = [ "tap:aio:/guest/anyubt8041flat4gb.img,xvda,w" ] vif = [ "mac=00:16:3e:6c:2e:95,bridge=eth0" ] extra = '2 console=xvc0' |
kernel = "/usr/lib/xen/boot/pv-grub-x86_32.gz" name = "pvgrubanyu8041" memory = 512 disk = [ 'file:/guest/anyubt8041flat4gb.img,hda,w' ] vif = [ "mac=00:16:3e:6c:2e:95,bridge=xenbr0" ] extra = "(hd0,0)/boot/grub/menu.lst" |
/usr/bin/qemu-kvm -name "anyubt8041" -m 512 \ -smp 1 -monitor pty -no-acpi -boot c -hda /root/anyubt8041flat4gb.img \ -net nic,macaddr=00:16:3e:6c:2e:95,vlan=0 -net user,vlan=0 |
/usr/bin/xenner -M xenner -m 512 -name anyubt8041 -boot c \ -kernel /root/anyubt8041/vmlinuz-2.6.24-19-xen \ -initrd /root/anyubt8041/initrd.img-2.6.24-19-xen\ -hda /root/anyubt8041flat4gb.img -xenconsole \ -append "root=UUID=906e293e-9e84-4f04-a559-908a75ac020d ro" \ -network 00:16:3e:6c:2e:95,virbr0 |