LDOM Cheat sheet

Display Default LDOM services

Command Purpose
# svcs ldmd Check ldom manager (ldmd)
# svcs vntsd Check vntsd is running
# ldm list-services primary Check Default Services are running
# ldm -V Check ldm software
# pkg info ldomsmanager check ldoms manager package in Solaris 11

 

Creating Default LDOM services

Command Purpose
# ldm add-vcc port-range=5000-5100 primary-vcc0 primary add virtual console concentrator (vcc)
# ldm add-vsw net-dev=net0 primary-vsw0 primary add virtual network switch (vsw)
#ldm  add-vds primary-vds0 primary add virtual disk server (vds)
# zfs   create -V   5G   rpool/ldom01_disk01

# ldm add-vdsdev  /dev/zvol/dsk/rpool/ldom01_disk01 ldom01_disk01@primary-vds0

add virtual storage device to virtual disk service (Add zfs filesystem to existing Guest domain)

 

Removing Default LDOM services

Command Purpose
# ldm remove-vcc  primary-vcc0 remove virtual console concentrator (vcc)
# ldm remove-vsw  primary-vsw0 remove virtual network switch (vsw)
# ldm remove-vds primary-vds0 remove virtual disk server (vds)
# ldm remove-vdsdev dvd-iso@primary-vds0 remove virtual storage device to virtual disk  service

 

Start Default Services

Command Purpose
# svcadm [enable|restart] ldmd start ldom manager
# svcadm [enable|restrat] vntsd start vntsd

 

Basic Guest LDOM Administration

Command Purpose
#ldm list-bindings ldom01 list resources binded to a Guest Domain
# virtinfo -a how to identify if the current domain role ? [Control,Guest,Service or Root]
# ldm list-io how to check status of I/O device
# ldm  list-domain -o domain ldom01 how to check logical domain (ldom) status
# ldm list list the status of all the guest domains on the system
# ldm list-bindings [ldom_name] how to manually list the LDOM config on a  system
# ldm list-spconfig list current LDOM configuration in Solaris
# ldm list-permits Check CPU activation
# svccfg -s ldmd listprop ldmd/autoreplacement_policy_cpu Check Autoreplacement policy for CPU

 

stop/start/break/unbind/bind

Command Purpose
# telnet localhost 5000

telnet> send brk

issue send break
# ldm stop ldom01 stop Guest Domain
# ldm start ldom01 start Guest Domain
# ldm unbind ldom01 unbind Guest Domain
# ldm bind ldom01 bind Guest Domain

 

Add/Create/Assign

Command Purpose
# ldm add-domain ldom01 Add Guest Domain
# ldm add-vcpu 6 ldom01 assign cpu threads to Guest Domain
# ldm add-core, ldm set-core  [number] [ldom] assign vcpu units of cores
# ldm add-memory 4G ldom01 assign memory to Guest Domain
# ldm add-vnet vnet1 primary-vsw0 ldom01 add vnet device to Guest Domain
# ldm add-vdisk ldom01-disk01  ldom01-disk01@primary-vds0 ldom01 assign disk resource to Guest Domain

 

Remove/Delete

Command Purpose
# ldm remove-domain ldom01 Remove a Guest Domain
# ldm remove-vdisk vdisk01 ldom01 Remove disk resource from Guest Domain
# ldm remove-vnet vnet1 ldom01 Remove virtual network device from a Guest Domain
# ldm remove-vcpu 8 ldom01 Remove CPU threads from a Guest Domain
# ldm remove-core 2 ldom01 Remove virtual cpu units in cores from a  Guest Domain
# ldm remove-memory 8G ldom01 Remove memory from a Guest Domain

 

Save LDOM Config

Command Purpose
# ldm add-spconfig newconfig save ldom configuration to the SP
# ldm list-constraints -x >  /var/tmp/guest-domain-name.xml

# ldm list-bindings > /var/tmp/full-bindings

# ldm ls -l > /var/tmp/guest-domain-list.xml”

backup of existing configuration from the control domain

 

Miscellaneous Commands

Command Purpose
# ldm list-constraints identify physical resources bindings
# telnet localhost 5001 login to the console of a Guest Domain
# ldm set-vcons log=[off|on]  [dom-name] Enable/Disable console loggging function for  a Guest Domain
# ldm list -o console ldom01 Display current console settings of a Guest  Domain
-> show /HOST/domain/configs date_created -t list all LDOM config from SP with timestamp
-> show /HOST/bootmode config -t list current LDOM config from SP
-> set  /HOST/send_break_action=dumpcore Generate crashdump from SP
# ldm panic-domain ldom01 Crash a guest domain from the control domain
# ldm list-domain -l -S to check failed cpu or memory components from Control Domain