Wednesday 4 April 2012

Getting started with LDOMS on the T2000

Ok, this post comes in a bit late in terms of the technology, ldoms 1.3 is behind the curve and the T2000 has been put out to pasture, but hey, its all I have! The work here collates the work of others into a process that fits my need, and I'll back track and find the references to add at some point soon.

Due to the changes that came about with Oracle's takeover of Sun, this is performed using the last OpenSolaris b134 dev release. Do a stock install as you normally would. This install will form your primary ldom.

So, to get started, install the packages.

pkg install ldoms/ldomsmanager

Once installed, enable the services.

svcadm enable ldmd
svcadm enable vntsd
svcadm enable drd

Show the currently defined ldoms.

ldm list




Configure the primary ldom.

ldm add-vdiskserver primary-vds0 primary
ldm add-vconscon port-range=5000-5100 primary-vcc0 primary
ldm add-vswitch net-dev=e1000g0 primary-vsw0 primary
ldm add-vswitch net-dev=e1000g1 primary-vsw1 primary
ldm add-vswitch net-dev=e1000g2 primary-vsw2 primary
ldm add-vswitch net-dev=e1000g3 primary-vsw3 primary
ldm set-crypto 1 primary
ldm set-vpu 4 primary
ldm set-memory 1g primary
ldm add-config initial

Confirm your config is now added.

ldm list-config

Now apply your settings.

shutdown -i 6 -g 0 -y (or init 6 if you prefer)

Once the server returns, confirm the settings from above are applied.

ldm list



root@opensolaris:/etc# ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      4     1G       3.8%  20m


Configure some disk backing devices.

zpool create ldompool mirror c2t2d0 c2t3d0
zfs create -V 10g ldompool/ldom1_vol1
zfs create -V 10g ldompool/ldom2_vol1


ldm add-vdiskserverdevice /dev/zvol/rdsk/ldompool/ldom1_vol1 ldom1_vol1@primary-vds0
ldm add-vdiskserverdevice /dev/zvol/rdsk/ldompool/ldom2_vol1 ldom2_vol1@primary-vds0

Add the dvd/cdrom device

ldm add-vdsdev options=ro /dev/rdsk/c3t0d0s2 cdrom@primary-vds0

Configure an actual ldom

ldm add-domain ldom1
ldm set-vcpu 8 ldom1
ldm set-mau 2 ldom1
ldm set-memory 4g ldom1
ldm add-vnet vnet0 primary-vsw0 ldom1
ldm add-vnet vnet1 primary-vsw1 ldom1
ldm add-vnet vnet2 primary-vsw2 ldom1
ldm add-vnet vnet3 primary-vsw3 ldom1
ldm add-vdisk vdisk1 ldom1_vol1@primary-vds0 ldom1
ldm add-vdisk cdrom cdrom@primary-vds0 ldom1
ldm set-variable autoboot=false ldom1
ldm set-variable boot-device=/virtual-devices@100/channel-devices@200/disk@0 ldom1
ldm bind-domain ldom1

Fire it up!

ldm start-domain ldom1

No comments: