Sun xVM Hypervisor (Part I - Basic Installation)

The Sun xVM hypervisor is based upon the open-source Xen virtual machine monitor developed at the University of Cambridge and work done by the OpenSolaris Xen community. It's a core component of our forthcoming xVM Server product and is readily available today from the OpenSolaris online network package repository.
Sun started in the academic community and has always fostered a close relationship with researchers in academia. The Texas Advanced Computing Center (TACC) at UT Austin collaborated with Sun, other universities, and the open-source community to build and support a High Performance Computing (HPC) system (called Ranger) comprised of 3,936 servers and 15,744 processors — the most capable HPC resource for scientific research in the nation runs the xVM hypervisor.
In a recent entry, I posted a screen shot of my workstation running Windows XP (32-bit) and Windows 7 (64-bit), both virtualized within unprivileged guest domains (aka DomUs). Let's examine how to install the hypervisor and bring up an OpenSolaris 2008.11 control domain (aka Dom0) in 4 easy steps!
At the completion of this procedure, your system will be running the xVM hypervisor and an OpenSolaris 2008.11 Dom0 for control and mangement of the virtualized environment. In future installments, we'll explore how to provision and deploy DomUs.
$ pfexec /usr/lib/vna nge0 fe:00:11:22:33:44
vnic0
$ dladm show-link
LINK CLASS MTU STATE OVER
nge0 phys 1500 down --
bge0 phys 1500 up --
vnic0 vnic 1500 unknown nge0
$ pfexec /usr/lib/vna vnic0
$ dladm show-link
LINK CLASS MTU STATE OVER
nge0 phys 1500 down --
bge0 phys 1500 up --
$
Clone a new boot environment, name it xvm, and mount it to /mnt/xvm with the beadm utility. The new boot environment will consume approximately 2.6 gigabytes of storage.
$ pfexec beadm create -a -d 'Sun xVM Hypervisor' xvm
$ pfexec beadm mount xvm /mnt/xvm
Install the xvm, xvm-gui, SUNWxvmhvm, SUNWvdisk, SUNWxdt, and SUNWvncviewer packages onto the new xvm boot environment using the pkg command.
$ pfexec pkg -R /mnt/xvm install xvm xvm-gui SUNWxvmhvm SUNWvdisk SUNWxdt SUNWvncviewer
PHASE ITEMS
Indexing Packages 554/554
DOWNLOAD PKGS FILES XFER (MB)
Completed 11/11 643/643 9.17/9.17
PHASE ACTIONS
Install Phase 905/905
Reading Existing Index 9/9
Indexing Packages 11/11
$ pfexec beadm umount xvm
$ beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
opensolaris N / 6.33M static 2009-03-28 08:30
xvm R - 2.56G static 2009-03-28 09:28
$
When beadm created the new boot environment, it also added a new default entry to the GRUB boot loader configuration file /rpool/boot/grub/menu.lst:
title Sun xVM Hypervisor
findroot (pool_rpool,0,a)
splashimage /boot/solaris.xpm
foreground d25f00
background 115d93
bootfs rpool/ROOT/xvm
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
module$ /platform/i86pc/$ISADIR/boot_archive
Edit the new entry as appropriate for your system configuration. At a minimum, you must modify the highlighted line above and add an additional line for the hypervisor. It should resemble the following:
title Sun xVM Hypervisor
findroot (pool_rpool,0,a)
bootfs rpool/ROOT/xvm
kernel$ /boot/$ISADIR/xen.gz
module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=text
module$ /platform/i86pc/$ISADIR/boot_archive
Reboot the system.
$ pfexec shutdown -y -g0 -i6
Shutdown started. Sun Mar 29 23:40:56 PDT 2009
Changing to init state 6 - please wait
Broadcast Message from root (pts/2) on discovery Sun Mar 29 23:40:56...
THE SYSTEM discovery IS BEING SHUT DOWN NOW ! ! !
Log off now or risk your files being damaged
$
Enable the virtd and domains services. Display a list of all defined domains with the virsh command.
$ pfexec svcadm enable -r xvm/virtd
$ pfexec svcadm enable -r xvm/domains
$ pfexec virsh list
Id Name State
----------------------------------
0 Domain-0 running
$
Posted at 12:32AM Mar 30, 2009 by Paul Telles in Solaris |