How to build Sun xVM 3.4.2 from source on top OSOL 1002-128a

Following bellow is step by step instruction how to clone Sun’s xvm 3.4.2 repository and build packages , required to setup xVM 3.4.2 Dom0 on top of OpenSolaris 1002-128a. View also manuals at opensolaris.org How to Build the Development gates
1. Install SunStudio 12U1 via package manager and create
symlink
# ln -s /opt/sunstudio12.1 /opt/SUNWspro

root@opensolaris:/opt# ls -l
total 8
drwxr-xr-x 31 root bin 50 2009-12-05 17:13 DTT
drwxr-xr-x 8 root bin 8 2009-12-11 09:40 onbld
drwxr-xr-x 13 root sys 13 2009-12-11 08:25 sunstudio12.1
drwxr-xr-x 4 root bin 5 2009-12-05 17:13 SUNWmlib
lrwxrwxrwx 1 root root 13 2009-12-11 08:41 SUNWspro -> sunstudio12.1

2. Install packages

# pkg install SUNWgcc
# pkg install SUNWmercurial
# pkg install SUNWgmake
# pkg install SUNWbcc
# pkg install SUNWlibtool
# pkg install SUNWgnome-common-devel
# pkg install SUNWgnu-automake-110
# pkg install SUNWaconf
# pkg install SUNWxwinc
# pkg install SUNWgit
# pkg install SUNWgnu-readline

3.Install onbld just to avoid failure during xVM build ( no bfu intends) :-

# wget http://dlc.sun.com/osol/on/downloads/b128/SUNWonbld.i386.tar.bz2
# bzcat SUNWonbld.i386.tar.bz2 | tar xf -
# pkgadd -d onbld

Next create /root/.hgrc to activate support mercurial queues :-

[extensions]
hgext.mq=

Set build environment :-

export EMAIL=username@yourdomain.com
export EDITOR=vi
export SOLARIS_BUILD_TOOLS=/opt

4. Clone Sun’s the most recent mercurial gate for xVM (800-900 MB)

# mkdir xvm-3.4
# cd xvm-3.4/
# hg clone ssh://anon@hg.opensolaris.org//hg/xen-gate/xvm-3.4+sunos.hg sunos.hg
# export XVM_WS=`pwd`
# ./sunos.hg/bin/update-gate

Process mercurial queue for each *.hg sub-folder, where it’s not empty

# cd xen.hg
# hg qpush -a

Biuld xVM gate:-

# ./sunos.hg/bin/build-all full &> build.txt &

When done verify logs under log folder:-

root@opensolaris:~/xvm-3.4# ls -l
total 2081
-rw-r--r-- 1 root root 893 2009-12-11 10:00 build.txt
drwxr-xr-x 17 root root 68 2009-12-11 09:56 libvirt.hg
drwxr-xr-x 2 root root 23 2009-12-11 19:57 log
drwxr-xr-x 13 root root 13 2009-12-11 10:00 packages-debug
drwxr-xr-x 13 root root 13 2009-12-11 09:51 packages-nondebug
drwxr-xr-x 5 root root 9 2009-12-11 19:52 proto
drwxr-xr-x 43 root root 377 2009-12-11 09:56 qemu.hg
-rw-r--r-- 1 root root 2037705 2009-12-10 20:51 readline-5.2.tar.gz
drwxr-xr-x 6 root root 9 2009-12-10 09:54 sunos.hg
drwxr-xr-x 4 root root 7 2009-12-11 10:00 urlgrabber.hg
drwxr-xr-x 4 root root 6 2009-12-10 22:10 vbox.hg
drwxr-xr-x 4 root root 6 2009-12-10 20:35 vdisk.hg
drwxr-xr-x 10 root root 27 2009-12-11 10:00 virtinst.hg
drwxr-xr-x 11 root root 22 2009-12-11 09:51 xen.hg

Make sure 11 packages are ready to go :-

root@opensolaris:~/xvm-3.4/packages-nondebug# ls -l
total 17
drwxr-xr-x 4 root root 6 2009-12-11 09:51 SUNWlibvirt
drwxr-xr-x 4 root root 6 2009-12-11 09:51 SUNWlibvirtr
drwxr-xr-x 4 root root 6 2009-12-11 09:51 SUNWurlgrabber
drwxr-xr-x 4 root root 6 2009-12-11 09:51 SUNWvdisk
drwxr-xr-x 4 root root 6 2009-12-11 09:51 SUNWvirtinst
drwxr-xr-x 3 root root 5 2009-12-11 09:51 SUNWxvmdomr
drwxr-xr-x 4 root root 6 2009-12-11 09:51 SUNWxvmdomu
drwxr-xr-x 4 root root 6 2009-12-11 09:51 SUNWxvmh
drwxr-xr-x 4 root root 6 2009-12-11 09:51 SUNWxvmhvm
drwxr-xr-x 4 root root 6 2009-12-11 09:51 SUNWxvmr
drwxr-xr-x 4 root root 6 2009-12-11 09:51 SUNWxvmu

Install packages

# pkgadd -d . SUNWxvmr
# pkgadd -d . SUNWxvmu
# pkgadd -d . SUNWlibvirtr
# pkgadd -d . SUNWlibvirt
# pkgadd -d . SUNWurlgrabber
# pkgadd -d . SUNWvdisk
# pkgadd -d . SUNWvirtinst
# pkgadd -d . SUNWxvmdomr
# pkgadd -d . SUNWxvmdomu
# pkgadd -d . SUNWxvmh
# pkgadd -d . SUNWxvmhvm

Finally :

# svcadm enable milestone/xvm

**************************
Update on 01/02/2010
**************************
By some reasons it might be more safe from the very beginning create separate BE for xvm

# pfexec beadm create xvm_342
# pfexec beadm activate xvm_342

and perform all actions above in new BE, avoiding “svcadm enable milestone/xvm” on osol-128a.
Then

# reboot -p

Check environment

boris@opensolaris:~$ xhost +
access control disabled, clients can connect from any host
boris@opensolaris:~$ pfexec su -
Sun Microsystems Inc. SunOS 5.11 snv_128 November 2008
root@opensolaris:~# xm info
host : opensolaris
release : 5.11
version : snv_128a
machine : i86pc
nr_cpus : 4
nr_nodes : 1
cores_per_socket : 4
threads_per_core : 1
cpu_mhz : 2833
hw_caps : bfebfbff:20100800:00000000:00000140:0408e3fd:00000000:00000001:00000000
virt_caps : hvm
total_memory : 8191
free_memory : 6041
node_to_cpu : node0:0-3
node_to_memory : node0:6041
xen_major : 3
xen_minor : 4
xen_extra : .2-xvm
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler : credit
xen_pagesize : 4096
platform_params : virt_start=0xffff800000000000
xen_changeset : Fri Dec 11 08:54:46 2009 +0300 19667:efeb205e29b8
cc_compiler : gcc version 3.4.3 (csl-sol210-3_4-20050802)
cc_compile_by :
cc_compile_domain :
cc_compile_date : Fri Dec 11 09:42:24 MSK 2009
xend_config_format : 4

root@opensolaris:~# svcs -a |grep xvm
disabled 17:07:11 svc:/system/xvm/ipagent:default
online 17:07:31 svc:/system/xvm/vnc-config:default
online 17:07:37 svc:/system/xvm/store:default
online 17:07:49 svc:/system/xvm/xend:default
online 17:07:49 svc:/system/xvm/console:default
online 17:07:50 svc:/system/xvm/virtd:default
online 17:07:50 svc:/system/xvm/domains:default
online 17:07:52 svc:/milestone/xvm:default

root@opensolaris:~# dladm show-link
LINK CLASS MTU STATE BRIDGE OVER
rge0 phys 1500 up -- --
yge0 phys 1500 down -- --

CS 19740 from xen-3.4-testing.hg appears to be applied to current xVM’s tree :-
xen_changeset : Fri Dec 11 08:54:46 2009 +0300 19667:efeb205e29b8
Build on 11/30/09 was still affected.







**************************
Update on 01/02/2010
**************************
In meantime virt-install hangs pretty often attempting to launch vncviewer to localhost:0
Workarounds :
1. virsh console DomName ( via different terminal session)
2. xVM 3.4.2 host reboot, followed by several virt-install attempts works for me , only when xVM packages are installed on OSOL128a , been built probably on higher OSOL version.
Looks pretty strange, however works always on b129,130



References
1. Sun xVM 3.4.2 available, dom0_min_mem
2.Xen 3.3.2/xVM: OpenSolaris snv_121

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: