File:  [NetBSD Developer Wiki] / wikisrc / ports / xen / howto-solaris.mdwn
Revision 1.1: download - view: text, annotated - select for diffs
Fri Dec 26 20:28:45 2014 UTC (6 years, 6 months ago) by gdt
Branches: MAIN
CVS tags: HEAD
Move solaris to own page.

    1: Solaris domU creation
    2: =====================
    3: 
    4: Download an Opensolaris [release](http://opensolaris.org/os/downloads/)
    5: or [development snapshot](http://genunix.org/) DVD image. Attach the DVD
    6: image to a MAN.VND.4 device. Copy the kernel and ramdisk filesystem
    7: image to your dom0 filesystem.
    8: 
    9:     dom0# mkdir /root/solaris
   10:     dom0# vnconfig vnd0 osol-1002-124-x86.iso
   11:     dom0# mount /dev/vnd0a /mnt
   12: 
   13:     ## for a 64-bit guest
   14:     dom0# cp /mnt/boot/amd64/x86.microroot /root/solaris
   15:     dom0# cp /mnt/platform/i86xpv/kernel/amd64/unix /root/solaris
   16: 
   17:     ## for a 32-bit guest
   18:     dom0# cp /mnt/boot/x86.microroot /root/solaris
   19:     dom0# cp /mnt/platform/i86xpv/kernel/unix /root/solaris
   20: 
   21:     dom0# umount /mnt
   22:           
   23: 
   24: Keep the MAN.VND.4 configured. For some reason the boot process stalls
   25: unless the DVD image is attached to the guest as a "phy" device. Create
   26: an initial configuration file with the following contents. Substitute
   27: */dev/wd0k* with an empty partition at least 8 GB large.
   28: 
   29:     memory = 640
   30:     name = 'solaris'
   31:     disk = [ 'phy:/dev/wd0k,0,w' ]
   32:     disk += [ 'phy:/dev/vnd0d,6:cdrom,r' ]
   33:     vif = [ 'bridge=bridge0' ]
   34:     kernel = '/root/solaris/unix'
   35:     ramdisk = '/root/solaris/x86.microroot'
   36:     # for a 64-bit guest
   37:     extra = '/platform/i86xpv/kernel/amd64/unix - nowin -B install_media=cdrom'
   38:     # for a 32-bit guest
   39:     #extra = '/platform/i86xpv/kernel/unix - nowin -B install_media=cdrom'
   40:           
   41: 
   42: Start the guest.
   43: 
   44:     dom0# xm create -c solaris.cfg
   45:     Started domain solaris
   46:                           v3.3.2 chgset 'unavailable'
   47:     SunOS Release 5.11 Version snv_124 64-bit
   48:     Copyright 1983-2009 Sun Microsystems, Inc.  All rights reserved.
   49:     Use is subject to license terms.
   50:     Hostname: opensolaris
   51:     Remounting root read/write
   52:     Probing for device nodes ...
   53:     WARNING: emlxs: ddi_modopen drv/fct failed: err 2
   54:     Preparing live image for use
   55:     Done mounting Live image
   56:           
   57: 
   58: Make sure the network is configured. Note that it can take a minute for
   59: the xnf0 interface to appear.
   60: 
   61:     opensolaris console login: jack
   62:     Password: jack
   63:     Sun Microsystems Inc.   SunOS 5.11      snv_124 November 2008
   64:     jack@opensolaris:~$ pfexec sh
   65:     sh-3.2# ifconfig -a
   66:     sh-3.2# exit
   67:           
   68: 
   69: Set a password for VNC and start the VNC server which provides the X11
   70: display where the installation program runs.
   71: 
   72:     jack@opensolaris:~$ vncpasswd
   73:     Password: solaris
   74:     Verify: solaris
   75:     jack@opensolaris:~$ cp .Xclients .vnc/xstartup
   76:     jack@opensolaris:~$ vncserver :1
   77:           
   78: 
   79: From a remote machine connect to the VNC server. Use `ifconfig xnf0` on
   80: the guest to find the correct IP address to use.
   81: 
   82:     remote$ vncviewer 172.18.2.99:1
   83:           
   84: 
   85: It is also possible to launch the installation on a remote X11 display.
   86: 
   87:     jack@opensolaris:~$ export DISPLAY=172.18.1.1:0
   88:     jack@opensolaris:~$ pfexec gui-install
   89:            
   90: 
   91: After the GUI installation is complete you will be asked to reboot.
   92: Before that you need to determine the ZFS ID for the new boot filesystem
   93: and update the configuration file accordingly. Return to the guest
   94: console.
   95: 
   96:     jack@opensolaris:~$ pfexec zdb -vvv rpool | grep bootfs
   97:                     bootfs = 43
   98:     ^C
   99:     jack@opensolaris:~$
  100:            
  101: 
  102: The final configuration file should look like this. Note in particular
  103: the last line.
  104: 
  105:     memory = 640
  106:     name = 'solaris'
  107:     disk = [ 'phy:/dev/wd0k,0,w' ]
  108:     vif = [ 'bridge=bridge0' ]
  109:     kernel = '/root/solaris/unix'
  110:     ramdisk = '/root/solaris/x86.microroot'
  111:     extra = '/platform/i86xpv/kernel/amd64/unix -B zfs-bootfs=rpool/43,bootpath="/xpvd/xdf@0:a"'
  112:            
  113: 
  114: Restart the guest to verify it works correctly.
  115: 
  116:     dom0# xm destroy solaris
  117:     dom0# xm create -c solaris.cfg
  118:     Using config file "./solaris.cfg".
  119:     v3.3.2 chgset 'unavailable'
  120:     Started domain solaris
  121:     SunOS Release 5.11 Version snv_124 64-bit
  122:     Copyright 1983-2009 Sun Microsystems, Inc.  All rights reserved.
  123:     Use is subject to license terms.
  124:     WARNING: emlxs: ddi_modopen drv/fct failed: err 2
  125:     Hostname: osol
  126:     Configuring devices.
  127:     Loading smf(5) service descriptions: 160/160
  128:     svccfg import warnings. See /var/svc/log/system-manifest-import:default.log .
  129:     Reading ZFS config: done.
  130:     Mounting ZFS filesystems: (6/6)
  131:     Creating new rsa public/private host key pair
  132:     Creating new dsa public/private host key pair
  133: 
  134:     osol console login:

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb