Sunday Apr 05, 2009

Sun xVM Hypervisor (Part II - Windows Vista DomU)

In Part I, we installed the xVM hypervisor and setup our OpenSolaris 2008.11 Dom0. Let's examine how to provision a fully virtualized DomU running Windows Vista with 1 command!

A fully virtualized DomU is also referred to as a Hardware-assisted Virtual Machine (HVM). HVM domains are capable of running an unmodified guest operating system that is not hypervisor aware. In order to support HVM domains, the hypervisor requires that the underlying hardware platform support either AMD's AMD-V or Intel's VT-x virtualization technology.

At the completion of this procedure, your system will be running the xVM hypervisor, an OpenSolaris 2008.11 Dom0, and a newly provisioned Windows Vista DomU.

Contents

Assumptions

  • Reader has completed the Basic Installation procedure as outlined in Part I.
  • Reader possesses basic UNIX and Windows system administration skills.
  • This procedure is intended to work with all versions of Windows Vista -- Business, Home Basic, etc., inclusive of 64-bit editions.
    • Windows Vista Home Premium SP1 (64-bit) was used for testing purposes.

Update The Boot Environment

Clone a new boot environment and update all installed packages using the pkg command. GRUB will boot the newly cloned boot environment by default.

$ pfexec pkg image-update
PHASE                                        ACTIONS
Removal Phase                                    1/1 
PHASE                                          ITEMS
Reading Existing Index                           9/9 
Indexing Packages                                1/1 

A clone of xvm exists and has been updated and activated.
On the next boot the Boot Environment xvm-1 will be mounted on '/'.
Reboot when ready to switch to this updated BE.


---------------------------------------------------------------------------
NOTE: Please review release notes posted at:
   http://opensolaris.org/os/project/indiana/resources/relnotes/200811/x86/
---------------------------------------------------------------------------

$ 

Reboot the system.

$ pfexec shutdown -y -g0 -i6

Shutdown started.    Sun Apr  5 14:40:56 PDT 2009

Changing to init state 6 - please wait
Broadcast Message from root (pts/2) on discovery Sun Apr  5 14:40:56...
THE SYSTEM discovery IS BEING SHUT DOWN NOW ! ! !
Log off now or risk your files being damaged

$

Create A DVD ISO Image

Insert the Windows DVD. The disc will be automatically mounted by the removable volume manager rmvolmgr. Using the rmformat utility, determine the optical drive device path. Unmount the disc and create an ISO image.

$ rmformat
Looking for devices...
     1. Logical Node: /dev/rdsk/c3t3d0p0
        Physical Node: /pci@0,0/pci8086,5358@1f,2/cdrom@3,0
        Connected Device: HL-DT-ST BD-RE  GGW-H20L  YL05
        Device Type: CD Reader
	Bus: 
	Size: 3.7 GB
	Label: 
	Access permissions: Medium is not write protected.
$ pfexec umount /dev/dsk/c3t3d0s2
$ dd if=/dev/rdsk/c3t3d0p0 of=/export/home/ptelles/iso/vista.iso bs=2k
1919440+0 records in
1919440+0 records out
3931013120 bytes (3.9 GB) copied, 1160.88 s, 3.4 MB/s
$ eject cdrom
cdrom /dev/dsk/c3t3d0s2 ejected
$ 

Provision A HVM Domain

We're now ready to provision our HVM domain with the virt-install program. If you prefer the use of a GUI, virt-manager (aka Virtual Machine Manager) is available, the use of which is outside the scope of this blog entry. Virtual Machine Manager and the virt-install program can also be used to provision, manage and monitor Logical Domains (aka LDoms) on Sun servers with CoolThreads technology.

Primary storage for DomUs can be provisioned in a multitude of different ways -- ZFS volumes, NFS shares, iSCSI LUNs, etc. In this example, we'll use a sparse file located in Dom0 as the primary storage for our HVM domain.

Create a HVM domain with 1 virtual CPU, 1GB of RAM, and a 20GB sparse file as primary storage.

$ pfexec virt-install -n vista --hvm --vcpus=1 -r 1024 --os-type=windows \\
--os-variant=vista --vnc -f /export/home/ptelles/xvm/vista.img -s 20 \\
-c /export/home/ptelles/iso/vista.iso


Starting install...
Creating storage file...  100% |=========================|   10 B    00:00     
Creating domain...                                                 0 B 00:03 

VNC Viewer Free Edition 4.1.2 for X - built Oct 16 2008 12:13:46
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.

Sun Apr  5 15:35:15 2009
 CConn:       connected to host localhost port 5900
 CConnection: Server supports RFB protocol version 3.3
 CConnection: Using RFB protocol version 3.3
 TXImage:     Using default colormap and visual, TrueColor, depth 24.
 CConn:       Using pixel format depth 6 (8bpp) rgb222
 CConn:       Using ZRLE encoding

Windows Vista will automatically boot and begin its installation process while displayed within a RealVNC window. Complete the Windows Vista installation process.

The following image was scaled down from 1920x1200 to 931x582.

Shutdown Windows Vista.

Remove the virtual CD-ROM device that the virt-install program created during the initial provisioning process using the virsh command. This will prevent Windows Vista from constantly mounting the ISO image at start-up.

$ pfexec virsh detach-disk vista hdc

$

If your system has an optical device and you would like to share it with the Windows Vista HVM domain, add the appropriate block device with virsh.

$ rmformat
Looking for devices...
     1. Logical Node: /dev/rdsk/c3t3d0p0
        Physical Node: /pci@0,0/pci8086,5358@1f,2/cdrom@3,0
        Connected Device: HL-DT-ST BD-RE  GGW-H20L  YL05
        Device Type: CD Reader
	Bus: 
	Size: 
	Label: 
	Access permissions: 
$ pfexec virsh attach-disk vista /dev/dsk/c3t3d0s2 hdb --driver phy --type cdrom --mode readonly

$

Domain Start-up

Start the Windows Vista HVM domain with the virsh command. Always shutdown Windows from within the operating system itself. /usr/bin/pfexec virsh shutdown domain will not gracefully shutdown Windows Vista.

$ pfexec virsh list 
 Id Name                 State
----------------------------------
  0 Domain-0             running
  - vista                shut off

$ pfexec virsh start vista
Domain vista started

$ pfexec virsh list
 Id Name                 State
----------------------------------
  0 Domain-0             running
  7 vista                running

$ 

Display the Windows Vista desktop using the vncviewer. Press F8 for a list of options within the viewer itself.

$ pfexec vncviewer :0 

VNC Viewer Free Edition 4.1.2 for X - built Oct 16 2008 12:13:46
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.

Sun Apr  5 19:23:56 2009
 CConn:       connected to host localhost port 5900
 CConnection: Server supports RFB protocol version 3.3
 CConnection: Using RFB protocol version 3.3
 TXImage:     Using default colormap and visual, TrueColor, depth 24.
 CConn:       Using pixel format depth 6 (8bpp) rgb222
 CConn:       Using ZRLE encoding
 CConn:       Throughput 20001 kbit/s - changing to hextile encoding
 CConn:       Throughput 20001 kbit/s - changing to full colour
 CConn:       Using pixel format depth 24 (32bpp) little-endian rgb888
 CConn:       Using hextile encoding
 CConn:       Throughput 20000 kbit/s - changing to raw encoding
 CConn:       Using raw encoding

$

Congratulations! Windows Vista is now fully virtualized within a xVM hypervisor HVM domain.

Other Resources

  • [1] Sun BluePrints Online: Solaris Operating System Hardware Virtualization Product Architecture

Saturday Apr 04, 2009

Live Free and Mobile

Free yourself from high cost proprietary operating system solutions, and feel the power of OpenSolaris innovation at your fingertips on some of the most robust laptops in the industry. Choose from the ultra-portable Toshiba Portégé R600 or the desktop replacement Toshiba Tecra M10 available in multiple configurations.

http://www.opensolaris.com/toshibanotebook/

Sunday Mar 29, 2009

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.

Contents

Assumptions

  • Reader has a basic understanding of virtualization on the x86 architecture.
  • Reader possesses basic UNIX system administration skills.
  • The target system has a freshly installed copy of OpenSolaris 2008.11 and a NIC driver capable of supporting Virtual NICs (VNICs).
    • You can quickly test to see if your NIC driver supports VNICs using the undocumented vna utility:
      • /usr/lib/vna interface [ MAC_address ]
        
        $ 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       --
        $
        

Create A New Boot Environment

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 Packages

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
$

Modify The GRUB Configuration File

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

$

Start The xVM Services

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

$ 

Other Resources

  • [1] BigAdmin System Administration Portal: Sun xVM Hypervisor Overview
  • [2] System Administration Guide: Virtualization Using the Solaris Operating System (Chapter 37, Sun xVM Hypervisor System Requirements)
  • [3] Sun BluePrints Online: Understanding the Sun xVM Hypervisor Architecture
  • [4] OpenSolaris xVM Documentation
  • [5] What's New in OpenSolaris 2008.11
  • [6] Getting Started With OpenSolaris 2008.11

Tuesday Mar 24, 2009

Multiboot Solaris on a MacBook Pro Redux

In my last entry, I used an early development build (build 63) of Solaris Express Community Edition (SXCE). SXCE is Sun's binary release for OpenSolaris developers (code named "Nevada"). The OpenSolaris 2008.11 release is based upon Nevada build 101b and is greatly improved. All of the issues that I previously identified have been resolved. Brian Leonard documented a simple, straightforward procedure to multiboot OpenSolaris and Mac OS X. I tested his procedure with the latest releases of OpenSolaris, Mac OS X, and rEFIt. It proved to be the simplest approach to date.

Tested Configuration

Friday Mar 20, 2009

The OpenSolaris Enthusiast Pool

I just stumbled upon a very cool collection of pictures posted by OpenSolaris enthusiasts on Flickr.

The Songbird wallpaper is my favorite.

Sunday Mar 15, 2009

OpenSolaris Meet Skulltrail

I built a new "V8 rig" to run OpenSolaris based upon the Intel D5400XS "Skulltrail" motherboard. With dual Quad-Core processors, it's an excellent enthusiast platform. OpenSolaris 2008.11 installs cleanly and quickly with great support for the on-board devices -- it's a marriage made in heaven.

A screen shot of OpenSolaris 2008.11 running on Skulltrail while virtualizing Windows XP SP3 (32-bit) and Windows 7 Beta 64-bit within Sun xVM Hypervisor guest domains.

Monday Feb 23, 2009

Missing BMC Driver in OpenSolaris

Perhaps you've noticed that your unable to issue IPMI commands to the local BMC interface under OpenSolaris?

# ipmitool chassis status
Could not open bmc device: No such file or directory
# 

Apparently the BMC driver is an encumbered piece of code. See Bug ID 6799081.

I downloaded the latest Solaris Express Community Edition (SXCE) and copied over the driver.

# cp /media/SOL_11_X86/Solaris_11/Product/SUNWckr/reloc/kernel/drv/amd64/bmc /kernel/drv/amd64
# cp /media/SOL_11_X86/Solaris_11/Product/SUNWckr/reloc/kernel/drv/bmc /kernel/drv
# cp /media/SOL_11_X86/Solaris_11/Product/SUNWckr/reloc/kernel/drv/bmc.conf /kernel/drv

Rebooted the system and ran devfsadm...problem solved.

# devfsadm
# ipmitool chassis status
System Power         : on
Power Overload       : false
Power Interlock      : inactive
Main Power Fault     : false
Power Control Fault  : false
Power Restore Policy : always-off
Last Power Event     : 
Chassis Intrusion    : inactive
Front-Panel Lockout  : inactive
Drive Fault          : false
Cooling/Fan Fault    : false
#

Sunday Feb 22, 2009

Sun Fire X2100 Service Processor Setup

The optional M3290 Service Management Daughter Card (SMDC) can be setup fairly easily. Ensure that your BIOS, SMDC firmware, and Broadcom Ethernet controller firmware are all up to date. Check the Sun Fire X2100 Server Supplemental CD for the latest revisions.

I'm sharing this information in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. Caveat emptor!

Contents

Tested Configuration

  • Sun Fire X2100 BIOS V1.1.8
  • SMDC Firmware V4.13
  • Broadcom 5721 Firmware V3.65
  • OpenSolaris 2008.11

Known Caveats

  • Per Appendix C of the Sun Fire X2100 Server User Guide, repeatedly sending escape sequences can hang the LAN on the SMDC card. If this occurs, you must manually reboot the system using the system reset button.

Update BIOS Settings

Enable Console Redirection in the BIOS.

Configure the SMDC

Run the BMC utility from the Sun Fire X2100 Server Supplemental CD to configure the SMDC's LAN settings and set passwords for the NULL, Operator, Admin, and OEM user accounts.

Update GRUB Configuration

Add serial and terminal entries to your GRUB configuration file and specify ttya as the OpenSolaris console:

Reboot and enjoy!

Other Resources

  • [1] My Sun Fire X2100 Wiki Page
  • [2] Sun Fire X2100 Server Supplemental CD Download
  • [3] GNU GRUB Manual
  • [4] Tyan M3290 Specifications
About

ptelles

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today