半虚拟化OpenSolaris 2008.11 domU使用Debian Lenny
本指南将帮助您在Debian Lenny下创建一个OpenSolaris半虚拟Xen客户端。
安装
下载OpenSolaris 2008.11 Live CD:
cd /xen/opensolaris ; wget http://dlc.sun.com/osol/opensolaris/2008/11/osol-0811.iso
mount -o loop osol-0811.iso /mnt/loop
cp /mnt/loop/platform/i86xpv/kernel/amd64/unix /xen/opensolaris
cp /mnt/loop/boot/x86.microroot /xen/opensolaris
这将创建一个10GB的图像作为根:
dd if=/dev/zero of=/xen/opensolaris/disk.img bs=1024k count=1 seek=10000
vi /xen/opensolaris/opensolaris.cfg
name = "opensolaris" vcpus = 1 memory = 1024 kernel = "/xen/opensolaris/unix" ramdisk = "/xen/opensolaris/x86.microroot" extra = "/platform/i86xpv/kernel/amd64/unix -B console=ttya,livemode=text" disk = ['file:/xen/opensolaris/osol-0811.iso,6:cdrom,r','file:/xen/opensolaris/disk.img,0,w'] #disk = ['file:/xen/opensolaris/osol-0811.iso,6:cdrom,r','phy:/dev/sdc1,0,w'] vif = [''] on_shutdown = "destroy" on_reboot = "destroy" on_crash = "destroy"
使用控制台启动domU启动安装过程:
xm create -c opensolaris.cfg
Using config file "./opensolaris.cfg". Started domain opensolaris v3.2-1 chgset 'unavailable' SunOS Release 5.11 Version snv_101b 64-bit Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Hostname: opensolaris Remounting root read/write Probing for device nodes ... WARNING: g.e. still in use! Preparing live image for use Done mounting Live image USB keyboard 1. Albanian 22. Latvian 2. Belarusian 23. Macedonian 3. Belgian 24. Malta_UK 4. Bulgarian 25. Malta_US 5. Croatian 26. Norwegian 6. Czech 27. Polish 7. Danish 28. Portuguese 8. Dutch 29. Russian 9. Finnish 30. Serbia-And-Montenegro 10. French 31. Slovenian 11. French-Canadian 32. Slovakian 12. Hungarian 33. Spanish 13. German 34. Swedish 14. Greek 35. Swiss-French 15. Icelandic 36. Swiss-German 16. Italian 37. Traditional-Chinese 17. Japanese-type6 38. TurkishQ 18. Japanese 39. TurkishF 19. Korean 40. UK-English 20. Latin-American 41. US-English 21. Lithuanian To select the keyboard layout, enter a number [default 41]:
在这里您可以按Enter键继续,如果您使用的是美式键盘。
1. Chinese - Simplified 2. Chinese - Traditional 3. English 4. French 5. German 6. Italian 7. Japanese 8. Korean 9. Portuguese - Brazil 10. Russian 11. Spanish To select desktop language, enter a number [default is 3]:
在这里你可以再次输入英文。
User selected: English Configuring devices. Mounting cdroms Reading ZFS config: done. opensolaris console login:
使用凭证插孔
/ 插孔
(用户名/密码)登录:
opensolaris console login: jack Password: Sun Microsystems Inc. SunOS 5.11 snv_101b November 2008 jack@opensolaris:~$
运行VNC服务器并设置VNC密码:
mkdir .vnc
cp .Xclients .vnc/xstartup
vncserver
ifconfig -a
现在,您可以从任何客户端的VNC到IPADDRESS:1
。
通过安装步骤,等待直到屏幕要求重新启动。 在重新启动之前,您需要在rpool中找到bootfs的ZFS ID。 在VNC会话中打开终端(沿顶部的栏),并键入:
pfexec zdb -vvv rpool | grep bootfs
你会看到下面出现的一行:
bootfs = NUMBER
注意:在bootfs行出现之后,您可以按Ctrl + C取消,或者等待一段时间。
现在,您可以重新启动guest虚拟机,当您单击重新启动opensolaris域应该关闭。
现在OpenSolaris系统安装在磁盘映像上,我们可以使用它来引导。 从OpenSolaris 2008.11开始,根卷是ZFS。
vi /xen/opensolaris/opensolaris.cfg
name = "opensolaris" vcpus = 1 memory = 1024 kernel = "/xen/opensolaris/unix" ramdisk = "/xen/opensolaris/x86.microroot" extra = '/platform/i86xpv/kernel/amd64/unix -B console=ttya,zfs-bootfs=rpool/56,bootpath="/xpvd/xdf@0:a"' #disk = ['phy:/dev/sdc1,0,w'] disk = ['file:/xen/opensolaris/disk.img,0,w'] vif = [''] on_shutdown = "destroy" on_reboot = "destroy" on_crash = "destroy"
现在,这是rpool ZFS ID派上用场的地方。 在额外的行,你会看到有写着“BOOTFS =的rpool / 56”的条目,这就是我的ID是那么只是无论你的ID是代替56。
链接
http://blogs.sun.com/mrj/
http://bderzhavets.blogspot.com/2008/05/install-opensolaris-200805-domu-at-xen.html
http://www.opensolaris.com/
http://www.debian.org/