Friday, February 20, 2015

Oracle VM for SPARC

How I Built an Oracle Solaris VM for SPARC (aka Logical Domain or LDOM )

I accidentally deleted a rarely used Solaris 11 11/11 VM (or used to be called a Logical Domain, but it was renamed by Oracle) and now I have to rebuild it. I'll write this down so building a new one will be easier next time.

I am replacing it with a Solaris 11.2 VM. Since the first time I've learned to use an NFS mounted ISO for the virtual CD rather than copying the ISO locally to the host.
  • Make the domain, which holds everything
    • ldm add-domain sol-11_2-dev
  • Add virtual CPU
    •  ldm add-vcpu 1 sol-11_2-dev
  • Add memory
    •  ldm add-memory 2G sol-11_2-dev
  • Add networking (I did this already)
    • ldm add-vnet vnet0 primary-vsw0 sol-11_2-dev
  • Make a ZFS file system
    • zfs create -V 50G pool1/sol-11_2-dev
  • Make the device of that file system into a Virtual Disk Server device, vdsdev. 
    • ldm add-vdsdev /dev/zvol/rdsk/pool1/sol-11_2-dev sol-11_2-dev@primary-vds0
  • Make a virtual disk from that vdsdev
    • ldm add-vdisk vdisk sol-11_2-dev@primary-vds0 sol-11_2-dev
  • Make an ISO file using an NFS mount. If you add the "ro" option, then more than one domain can use the same virtual disk
    • ldm add-vdsdev options=ro /mnt/apps/sun/solaris-11_2/sol-11_2-text-sparc.iso iso112@primary-vds0
  • Bind and start the domain
    • ldm bind-domain sol-11_2-dev
    • ldm start-domain sol-11_2-dev 

No comments:

Post a Comment