Friday, March 9, 2012

LDOMS :Getting started Part 2

  • This post describes the steps to create 7 ldoms in a T4-2 core such that each LDOM uses a core from the first socket.
  •  
  • Start the required services on the primary domain
# ldm ls
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-c--  UART    128   130560M  0.0%  9m
# ldm list-services
# ldm add-vds primary-vds0 primary
# ldm add-vcc port-range=5000-51000 primary-vcc0 primary
# ldm add-vsw net-dev=net0 primary-vsw0 primary
# ldm list-services
VCC
    NAME             LDOM             PORT-RANGE
    primary-vcc0     primary          5000-5100
VSW
    NAME             LDOM             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID   MTU   MODE   INTER-VNET-LINK
    primary-vsw0     primary          00:14:4f:f9:59:1c net0      0    switch@0              1               1   1500         on        

VDS
    NAME             LDOM             VOLUME         OPTIONS          MPGROUP        DEVICe
    primary-vds0     primary


  • STart vntsd service
# svcadm enable vntsd
# svcs vntsd
STATE          STIME    FMRI
online         14:31:06 svc:/ldoms/vntsd:default
#

Add 7 disks for OS install for 7 ldoms

ldm add-vdsdev /dev/rdsk/c1t0d4s2  c1t0d4s2@primary-vds0
ldm add-vdsdev /dev/rdsk/c1t0d6s2  c1t0d6s2@primary-vds0
ldm add-vdsdev /dev/rdsk/c1t0d8s2  c1t0d8s2@primary-vds0
ldm add-vdsdev /dev/rdsk/c1t0d10s2  c1t0d10s2@primary-vds0
ldm add-vdsdev /dev/rdsk/c2t4d5s2  c2t4d5s2@primary-vds0
ldm add-vdsdev /dev/rdsk/c2t4d7s2  c2t4d7s2@primary-vds0
ldm add-vdsdev /dev/rdsk/c2t4d9s2  c2t4d9s2@primary-vds0

Or export ZFS volume for OS install
#ldm rm-vdisk disk1 ldom1
#zpool destroy ldom1P
zpool create ldom1P c1t0d4s2
zfs create ldom1P/ldom1
zfs create -V 20gb ldom1P/ldom1/disk0
ldm add-vdsdev /dev/zvol/dsk/ldom1P/ldom1/disk0 ldom1_disk@primary-vds0


zpool create ldom2P c1t0d6s2
zfs create ldom2P/ldom
zfs create -V 20gb ldom2P/ldom/disk0
ldm add-vdsdev /dev/zvol/dsk/ldom2P/ldom/disk0 ldom2_disk@primary-vds0


zpool create ldom3P c1t0d8s2
zfs create ldom3P/ldom
zfs create -V 20gb ldom3P/ldom/disk0
ldm add-vdsdev /dev/zvol/dsk/ldom3P/ldom/disk0 ldom3_disk@primary-vds0


zpool create ldom4P c1t0d10s2
zfs create ldom4P/ldom
zfs create -V 20gb ldom4P/ldom/disk0
zpool create -f ldom5P c2t4d5s2
zfs create ldom5P/ldom
zfs create -V 20gb ldom5P/ldom/disk0
ldm add-vdsdev /dev/zvol/dsk/ldom5P/ldom/disk0 ldom5_disk@primary-vds0



zpool create -f ldom6P c2t4d7s2
zfs create ldom6P/ldom
zfs create -V 20gb ldom6P/ldom/disk0
ldm add-vdsdev /dev/zvol/dsk/ldom6P/ldom/disk0 ldom6_disk@primary-vds0


zpool create -f ldom7P c2t4d9s2
zfs create ldom7P/ldom
zfs create -V 20gb ldom7P/ldom/disk0
ldm add-vdsdev /dev/zvol/dsk/ldom7P/ldom/disk0 ldom7_disk@primary-vds0

Set up the primary domain with 1 core and 7680M of memory

ldm start-reconf primary
ldm set-memory 7680M  primary
ldm set-core cid=0 primary
ldm add-config initial


Power cycle the server
 reset /SYS

Create the 7 ldoms as under:

ldm add-domain ldom1
ldm set-core cid=1 ldom1
ldm add-vdisk  disk1 ldom1_disk@primary-vds0 ldom1
ldm add-vnet vnet1 primary-vsw0 ldom1
ldm set-variable auto-boot\?=true ldom1
ldm set-variable  boot-device=disk1 ldom1
ldm add-domain ldom2
ldm set-core cid=2 ldom2
ldm add-vdisk  disk2 ldom2_disk@primary-vds0 ldom2
ldm add-vnet vnet2 primary-vsw0 ldom2
ldm set-variable auto-boot\?=true ldom2
ldm set-variable  boot-device=disk2 ldom2
ldm add-domain ldom3
ldm set-core cid=3 ldom3
ldm add-vdisk  disk3 ldom3_disk@primary-vds0 ldom3
ldm add-vnet vnet3 primary-vsw0 ldom3
ldm set-variable auto-boot\?=true ldom3
ldm set-variable  boot-device=disk3 ldom3
ldm add-domain ldom4
ldm set-core cid=4 ldom4
ldm add-vdisk  disk4 ldom4_disk@primary-vds0 ldom4
ldm add-vnet vnet4 primary-vsw0 ldom4
ldm set-variable auto-boot\?=true ldom4
ldm set-variable  boot-device=disk4 ldom4
ldm add-domain ldom5
ldm set-core cid=5 ldom5
ldm add-vdisk  disk5 ldom5_disk@primary-vds0 ldom5
ldm add-vnet vnet5 primary-vsw0 ldom5
ldm set-variable auto-boot\?=true ldom5
ldm set-variable  boot-device=disk5 ldom5
ldm add-domain ldom6
ldm set-core cid=6 ldom6
ldm add-vdisk  disk6 ldom6_disk@primary-vds0 ldom6
ldm add-vnet vnet6 primary-vsw0 ldom6
ldm set-variable auto-boot\?=true ldom6
ldm set-variable  boot-device=disk6 ldom6
ldm add-domain ldom7
ldm set-core cid=7 ldom7
ldm add-vdisk  disk7 ldom7_disk@primary-vds0 ldom7
ldm add-vnet vnet7 primary-vsw0 ldom7
ldm set-variable auto-boot\?=true ldom7
ldm set-variable  boot-device=disk7 ldom7
ldm add-domain park
ldm set-vcpu -c 8 park




Assign them memory

ldm add-memory 8G park
ldm add-memory 8G ldom1
ldm add-memory 8G park
ldm add-memory 8G ldom2
ldm add-memory 8G park
ldm add-memory 8G ldom3
ldm add-memory 8G park
ldm add-memory 8G ldom4
ldm add-memory 8G park
ldm add-memory 8G ldom5
ldm add-memory 8G park
ldm add-memory 8G ldom6
ldm add-memory 8G park
ldm add-memory 8G ldom7
ldm add-memory 8G park


Bind the domains:

ldm bind-domain ldom1
ldm bind-domain ldom2
ldm bind-domain ldom3
ldm bind-domain ldom4
ldm bind-domain ldom5
ldm bind-domain ldom6
ldm bind-domain ldom7
ldm bind-domain park


No comments:

Post a Comment