您的位置:首页 > 运维架构

XEN on OpenSolaris (1) - 安装并配置Solaris Dom0

2007-07-03 14:55 441 查看

Installation instructions for Solaris Dom0:

NOTE: These instructions are for setting up Solaris on Xen from a fresh Solaris Install. Upgrading from a previous work-in-progress snapshot is not generally supported. However, we do have some notes for those who will try anyway ;-).

Install Solaris Express build 44.

Uncompress and add the packages

# cd /path/to/downloads/

# bunzip2 -d SUNWPython64.pkg.bz2

# pkgadd -d SUNWPython64.pkg

# bunzip2 -d SUNWPython64-devel.pkg.bz2

# pkgadd -d SUNWPython64-devel.pkg

# bunzip2 -d SUNWxenh.pkg.bz2

# pkgadd -d SUNWxenh.pkg

# bunzip2 -d SUNWxenr.pkg.bz2

# pkgadd -d SUNWxenr.pkg

# bunzip2 -d SUNWxenu.pkg.bz2

# pkgadd -d SUNWxenu.pkg

# bunzip2 -d SUNWonbld.pkg.bz2

# pkgadd -d SUNWonbld.pkg
[/code]
Remember, these packages must be the version we provide, not the generic OpenSolaris packages, as we have made modifications for Xen support.

3. Install the BFU archives of Solaris modified for Xen

If you built Solaris modified for Xen from source, your BFU archives can be found in the
archives/i386/nightly
directory of your OpenSolaris source tree.

If you did not build your own archives, you downloaded them from the download page for this community.

When deploying on a fresh Solaris install using downloaded archives, it will probably look something like:

# mkdir /archives

# cd /archives

# bunzip2 -d -c /path/to/downloads/osox-bfu-2006-08-16.tar.bz2 | tar xf -

# FASTFS=/opt/onbld/bin/`uname -p`/fastfs ; export FASTFS

# BFULD=/opt/onbld/bin/`uname -p`/bfuld ; export BFULD

# ACR=/opt/onbld/bin/acr ; export ACR

# GZIPBIN=/usr/bin/gzip ; export GZIPBIN

# DIRECTBOOT_BIN_DIR=/archives/osox-bfu-2006-08-16 ; export DIRECTBOOT_BIN_DIR

# /opt/onbld/bin/bfu /archives/osox-bfu-2006-08-16

# /tmp/bfubin/acr
[/code]
Be aware that the full pathname "/archives" is required for the correct functioning of BFU.

If you're using Live Upgrade, you may need to modify
/boot/grub/menu.lst
by hand. Make sure you've verified the changes are correct. The new entries to boot the non-Xen kernels should look something like this:

title Solaris Nevada snv_44 X86 64-bit

kernel /platform/i86pc/kernel/amd64/unix

module /platform/i86pc/boot_archive
[/code]
or for 32-bit boot:

title Solaris Nevada snv_44 X86 32-bit

kernel /platform/i86pc/kernel/unix

module /platform/i86pc/boot_archive
[/code]
For more detailed instructions on installing from a BFU archive, see the Developers' Reference.

4. Disable all IP checksum offload, as it doesn't interact well with the ethernet bridge and Xen.

# echo "set ip:dohwcksum = 0" >>/etc/system

# bootadm update-archive
[/code]
5. Prepare for reboot into either 32 or 64 bit Xen

BFU will update the default entries in
/boot/grub/menu.lst
to boot Solaris on metal, but as you want to boot Xen, you'll need to add two more entries as follows:

title Solaris on Xen 64-bit

kernel /boot/amd64/xen.gz dom0_mem=524288 console=com1 com1=9600,8n1

module /platform/i86xen/kernel/amd64/unix /platform/i86xen/kernel/amd64/unix -k

module /platform/i86pc/boot_archive
[/code]
and

title Solaris on Xen 32-bit

kernel /boot/xen.gz dom0_mem=524288 console=com1 com1=9600,8n1

module /platform/i86xen/kernel/unix /platform/i86xen/kernel/unix -k

module /platform/i86pc/boot_archive
[/code]
If you want, also change the "default" line to point to these. When you reboot, select a Xen entry from the grub menu. Note that the above examples assume you are using a serial port for the system console.

Link to more information on menu.lst changes

At this point the system is ready for rebooting into Xen with a Solaris dom0.

6. Set up
/etc/xen/xend-config.sxp


If you have more than one physical NIC configured, you may need to configure the network-bridge property in this file; see the example given in the file. The NIC must support the latest version of GLD. These include bge, e1000g, xge, nge, and rge.

If you want to allow migration to this machine from another dom0, you must change the
xend-relocation-hosts-allow
parameter in this file to allow that host.

7. Verify Xen devices are present

In some cases, the xen devices may not be present. For example, if you booted a i86pc kernel after BFU'ing the i86xen kernel, the reconfigure boot following the BFU would not create the xen devices (since the drivers do not exist in i86pc). Check that the following device links are present.

# ls -l /dev/xen

total 6

lrwxrwxrwx   1 root     root          36 Jun 28 16:05 evtchn -> ../../devices/xendev/evtchn@0:evtchn

lrwxrwxrwx   1 root     root          38 Jun 28 16:05 privcmd -> ../../devices/xendev/privcmd@0:privcmd

lrwxrwxrwx   1 root     root          36 Jun 28 16:05 xenbus -> ../../devices/xendev/xenbus@0:xenbus
[/code]
If they are not, you can fix this by doing the following (make sure you boot a i86xen kernel immediately after the reboot):

# touch /reconfigure

# reboot
[/code]
8. Verify the Xen Services are started

# svcs -a | grep xen

online         10:03:06 svc:/system/xen/store:default

online         10:03:16 svc:/system/xen/xend:default

online         10:03:16 svc:/system/xen/console:default
[/code]
If they are not, first verify you booted a i86xen kernel (uname -i), and if you did, enable them by doing the following:

# svcadm enable xen/store

# svcadm enable xen/xend

# svcadm enable xen/console
[/code]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: