LDOM cheat sheet

SUN LDOMs aka Oracle VM for SPARC is a complete virtual machines that runs an independent operating systems and contains its own virtual CPUs, Storage, Memory, Cryptographic and console.

This document is designed to be a a quick platform specific cheat sheet to help engineers run important LDOM task on a SPARC systems (SPARC Tx,Mx)

Default LDOM services

svcs ldmd check ldom manager
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
ldm add-vcc port-range=x-y <vcc-name> <ldom>
# ldm add-vcc port-range=5000-5100 primary-vcc0 primary
add virtual console concentrator
ldm add-vsw net-dev=net0 primary-vsw0 primary add virtual network switch
ldm add-vds primary-vds0 primary add virtual disk server
zfs create -V 5G rpool/<ldom-name>_disk01 ldm add-vdsdev /dev/zvol/dsk/rpool/<ldom-name>_disk01 <ldom-name>_disk01@primary-vds0 add virtual storage device to virtual disk service (Add zfs filesystem to existing Guest domain)
ldm remove-vcc primary-vcc0 remove virtual console concentrator
ldm remove-vsw primary-vsw0 remove virtual network switch
ldm remove-vds primary-vds0 remove virtual disk server
ldm remove-vdsdev dvd-iso@primary-vds0 remove virtual storage device to virtual disk service
svcadm [enable|restart] ldmd start ldom manager
svcadm [enable|restart] vntsd start vntsd

Basic Guest LDOM Administration

ldm list-bindings <ldom-name> 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 <ldom-name> how to check 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
# ldm list-spconfig
guestdom1 [next poweron]
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
telnet localhost 5000 telnet> send brk issue send break
ldm stop <ldom-name> stop guest domain
ldm start <ldom-name> start guest domain
ldm unbind <ldom-name> unbind guest domain
ldm bind <ldom-name> bind guest domain
ldm add-domain <ldom-name> Add guest domain
ldm add-vcpu 6 <ldom-name> assign cpu threads to guest domain
ldm add-core, ldm set-core [number] [ldom] assign vcpu units of cores
ldm add-memory 4G <ldom-name> assign memory to guest domain
ldm add-vnet vnet1 primary-vsw0 <ldom-name> add vnet device to guest domain
ldm add-vdisk <ldom-name>-disk01 <ldom-name>-disk01@primary-vds0 <ldom-name> assign disk resource to guest domain
ldm remove-domain <ldom-name> Remove a guest domain
ldm remove-vdisk vdisk01 <ldom-name> Remove disk resource from guest domain
ldm remove-vnet vnet1 <ldom-name> Remove virtual network device from a guest domain
ldm remove-vcpu 8 <ldom-name> Remove CPU threads from a guest domain
ldm remove-core 2 <ldom-name> Remove virtual cpu units in cores from a guest domain
ldm remove-memory 8G <ldom-name> Remove memory from a guest domain

Save LDOM configuration

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


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 <ldom-name> 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 <ldom-name> Crash a guest domain from the control domain
ldm list-domain -l -S to check failed cpu or memory components from Control Domain