Quick Reference – LDOM Commands

Display Default LDOM services     ( SPARC T3/T4/T5/ M5/M6/ M10)
Check ldom manager (ldmd)    
#svcs ldmd
Check vntsd is running   
#svcs vntsd
Check Default Services are running
#ldm list-services primary
Check ldm software 
Usage :ldm -V

Example

#ldm -V
a
Logical Domains Manager (v 3.0.0.3)
Hypervisor control protocol v 1.11
Using Hypervisor MD v 1.4
 
System PROM:
Hostconfig  v. 1.3.5.c      @(#)Hostconfig 1.3.5.c 2014/03/21 19:04
Hypervisor  v. 1.12.5.b     @(#)Hypervisor 1.12.5.b 2014/02/07 13:52        
OpenBoot    v. 4.35.5.a     @(#)OpenBoot 4.35.5.a 2014/01/31 14:12
 
Usage: pkg info ldomsmanager

Example

eis@m10-1-igurkul-a:~$ pkg info ldomsmanager
              Name: system/ldoms/ldomsmanager
           Summary: Logical Domains Manager
       Description: LDoms Manager – Virtualization for SPARC T-Series
          Category: System/Virtualization
             State: Installed
         Publisher: solaris
           Version: 3.1.1.0.5
     Build Release: 5.11
            Branch: 0.175.2.0.0.34.0
    Packaging Date: March  3, 2014 02:18:20 PM
              Size: 3.87 MB
              FMRI: pkg://solaris/system/ldoms/
ldomsmanager@3.1.1.0.5,5.11-0.175.2.0.0.34.0:20140303T141820Z
    eis@m10-1-igurkul-a:~$
    eis@m10-1-igurkul-a:~$

 

Creating Default LDOM services
Add virtual console concentrator (vcc)
Usage: ldm add-vcc port-range=x-y  <vcc-name>  <ldom>
            
Example
#ldm add-vcc port-range=5000-5100 primary-vcc0 primary      
Add virtual network switch (vsw)
Usage: ldm add-vsw  net-dev=<device>  <vsw-name> <ldom-name>
            
Example#ldm add-vsw net-dev=net0 primary-vsw0 primary
Add virtual disk server (vds)
Usage ldm add-vds  <service-name>  <ldom-name>
            
Example
#ldm  add-vds primary-vds0 primary
Add virtual storage device to virtual disk service
Usage: ldm add-vdsdev <backend>  <volume@service>     
wherebackend: specify a physical disk path. In addition to a file, you can specify the path of a disk, disk slice etc for the backend.volume: specify a volume name that is unique within the virtual disk serverservice: specify a virtual disk service name
            
Example: 
### Primary domain. 
### Add zfs filesystem to existing Guest domain                    root@m10-1-igurkul-a:~# zfs   create -V   5G   rpool/ckt-disk2
root@m10-1-igurkul-a:~# ls /dev/zvol/dsk/rpool
ROOT    VARSHARE   ckt-disk2  dump       export     swap         
             
root@m10-1-igurkul-a:~# ldm add-vdsdev /dev/zvol/dsk/rpool/ckt-disk2 disk2@primary-vds0In this example  a 5G backend zfs partition is created called ckt-disk2
The volume name is ckt-disk2
The vds is called primary-vds0
         
Removing Default LDOM services ( T3/T4/T5/M5/M6//M10)
Remove virtual console concentrator (vcc)      
Usage: ldm remove-vcc [-f] <vcc_name>
            
Example
       root@m5-igurkul-a-pdom00:~# ldm list-services primary
VCC
NAME             LDOM             PORT-RANGE
primary-vcc0     primary          5000-5100
             
root@m5-igurkul-a-pdom00:~# ldm remove-vcc  primary-vcc0
root@m5-igurkul-a-pdom00:~# ldm list
NAME             STATE      FLAGS   CONS  VCPU  MEMORY UTIL  NORM  UPTIME
primary          active     -n-c-  UART    192   2047G  0.7%  0.6%  47m
Remove virtual network switch (vsw)
Usage: ldm remove-vsw  <vsw-service-name>
            
Example     root@m5-igurkul-a-pdom00:~# ldm list-services primary
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:fa:ee:e1  net0 0 switch@0   1 1 150 on         
root@m5-igurkul-a-pdom00:~# ldm remove-vsw  primary-vsw0
root@m5-igurkul-a-pdom00:~# ldm list-services primary
Remove virtual disk server (vds)
Usage: ldm remove-vds  <service-name>
            
Exampleroot@m5-igurkul-a-pdom00:~# ldm remove-vds primary-vds0
root@m5-igurkul-a-pdom00:~# ldm list-services primary
root@m5-igurkul-a-pdom00:~#
Remove virtual storage device to virtual disk  service
Usage: ldm remove-vdsdev [-f] <volume_name>@<service_name>
            
Example
                     root@m5-igurkul-a-pdom00:~# ldm list-services primary
VDS
NAME           LDOM    VOLUME   OPTIONS        MPGROUP        DEVICE
primary-vds0   primary  dvd-iso  /home/jack/sol-11_1-text-sparc.iso
root@m5-igurkul-a-pdom00:~# ldm remove-vdsdev dvd-iso@primary-vds0
root@m5-igurkul-a-pdom00:~# ldm list-services primary
VDS NAME   LDOM  VOLUME    OPTIONS          MPGROUP        DEVICE
primary-vds0     primary         
             
Start Default Services
Start ldom manager
Usage: svcadm enable ldmd
            
Example
                       root@m5-igurkul-a-pdom00:~# svcs  | grep ldmd
online         18:37:13 svc:/ldoms/ldmd:default
root@m5-igurkul-a-pdom00:~# svcadm disable ldmd
root@m5-igurkul-a-pdom00:~# svcs  | grep ldmd
root@m5-igurkul-a-pdom00:~# 
root@m5-igurkul-a-pdom00:~# svcadm enable ldmd
root@m5-igurkul-a-pdom00:~# svcs  | grep ldmd
online         19:17:57 svc:/ldoms/ldmd:default
root@m5-igurkul-a-pdom00:~#
Start vntsd
Usage: svcadm enable vntsd
            
Example
              jack@m5-igurkul-a-pdom01:~$ svcs vntsd
STATE          STIME    FMRI
disabled       18:49:36 svc:/ldoms/vntsd:default
jack@m5-igurkul-a-pdom01:~$ svcadm enable   vntsd
jack@m5-igurkul-a-pdom01:~$ svcs vntsd
STATE          STIME    FMRI
online         19:23:59 svc:/ldoms/vntsd:default
jack@m5-igurkul-a-pdom01:~$ 

 

 Basic Guest Domain Administration
List resources binded to a Guest Domain   
Usage: ldm  list-bindings <ldom-name>
            
Example#ldm list-bindings guestdomain2
How to identify if the current domain?
Usage: $virtinfo -a
            
Example         jack@m5-igurkul-a-pdom01:~$ virtinfo -a
Domain role: LDoms control I/O service root
Domain name: primary
Domain UUID: 5caf3abe-db20-cb75-8b2c-b4a62bef5a5f
Control domain: Unknown
Chassis serial#: Unknown
jack@m5-igurkul-a-pdom01:~$
How to check status of I/O device
Usage: $virtinfo -a
            
Example
jack@m5-igurkul-a-pdom01:~$ virtinfo -a
Domain role: LDoms control I/O service root
Domain name: primary
Domain UUID: 5caf3abe-db20-cb75-8b2c-b4a62bef5a5f
Control domain: Unknown
Chassis serial#: Unknown
jack@m5-igurkul-a-pdom01:~$
How to check status of I/O device
Usage: ldm list-io         

Example

root@m10-1-igurkul-a:~# ldm list-io
NAME                        TYPE   BUS                  DOMAIN   STATUS   
—-                        —-   —                  ——   ——   
PCIE0                       BUS    PCIE0                primary  IOV      
PCIE1                       BUS    PCIE1                primary  IOV      
/SYS/MBU/NET0               PCIE   PCIE0                primary  OCC      
/SYS/PCI0                   PCIE   PCIE0                primary  EMP      
/SYS/MBU/SASHBA             PCIE   PCIE0                primary  OCC      
/SYS/MBU/NET2               PCIE   PCIE1                primary  OCC      
/SYS/PCI1                   PCIE   PCIE1                primary  EMP      
/SYS/PCI2                   PCIE   PCIE1                primary  EMP      
root@m10-1-igurkul-a:~# 
root@m10-1-igurkul-a:~#

How to check logical domain (ldom) status
Usage: ldm list-domain -o domain <guest-domain-name>
            
Exampleroot@m10-igurkul-a:~# ldm  list-domain -o domain guest-dom1
List the status of all the guest domains on the system
Usage: ldm list
            
Example root@m10-1-igurkul-a:~# 
 root@m10-1-igurkul-a:~# ldm list
 NAME             STATE    FLAGS   CONS    VCPU  MEMORY UTIL  UPTIME
 primary          active   -n-cv-  UART    8     8G     0.1%  13d 14m
 ldom1            active   -n—-  5000    4     4G     0.0%  19d 23h 21m
 ldom2            active   -t—-  5001    4     4G     25%  19d 23h 21m
how to manually list the LDOM config on a  system
Usage: ldm list-bindings /  ldm list-bindings  <ldom-name>
            
Example       #ldm list-bindings#ldm list-bindings guestdom2
List current save LDOM config in Solaris
Usage: ldm list-spconfig
            
Exampleroot@t5-igurkul-a:~# ldm list-spconfig
factory-default
guestdom1 [next poweron]
root@t5-igurkul-a:~#
when do we need to initiate an LDOM reconfig reboot

Usage: ldm start-reconf primary

The “start-reconf” needs to be executed on the primary domain if changes [ add/remove ] is to be made to the resources [ cpu,io and memory] that is currently assigned to it.
            
Example
            

jack@t5-igurkul-a:~$ ldm list
NAME            STATE      FLAGS   CONS    VCPU  MEMORY       UTIL  NORM  UPTIME
primary          active     -n-c–  UART      1024   2095872M    0.0%  0.0%  1h 8m
jack@t5-igurkul-a:~$ ldm start-reconf primary
Initiating a delayed reconfiguration operation on the primary domain.
All configuration changes for other domains are disabled until the primary
domain reboots, at which time the new configuration for the primary domain
will also take effect.
jack@t5-igurkul-a:~$ ldm set-core 4 primary
———————————————————————–
Notice: The primary domain is in the process of a delayed reconfiguration.
Any changes made to the primary domain will only take effect after it reboots.
———————————————————————–
jack@t5-igurkul-a:~$ ldm set-memory 128G primary
Cannot enable FILE_DAC_READ privilege
jack@t5-igurkul-a:~$ su
Password:
Jun 26 16:10:26 t5-igurkul-a su: ‘su root’ succeeded for jack on /dev/console
root@t5-igurkul-a:~# ldm set-memory 128G primary
——————————————————————————
Notice: The primary domain is in the process of a delayed reconfiguration.
Any changes made to the primary domain will only take effect  after it reboots.
——————————————————————————
root@t5-igurkul-a:~# ldm ls
NAME         STATE      FLAGS   CONS    VCPU  MEMORY       UTIL  NORM  UPTIME
primary      active     -ndc–  UART    32    128G         0.0%  0.0%  1h 10m
root@t5-igurkul-a:~#
root@t5-igurkul-a:~# reboot
Jun 26 16:11:55 t5-igurkul-a reboot: initiated by jack on /dev/console
Jun 26 16:12:02 t5-igurkul-a syslogd: going down on signal 15
syncing file systems… done

Check CPU activation
Usage: ldm list-permits

Example           

eis@m10-1-igurkul-a:~$ uname -a
SunOS m10-1-igurkul-a.au.reddot.com 5.11 11.2 sun4v sparc sun4v
eis@m10-1-igurkul-a:~$ su 
Password: 
root@m10-1-igurkul-a:~# ldm list-permits
          
CPU CORE
PERMITS (PERMANENT)   IN USE      REST
16      (16)          8           8

Check Auto replacement policy for CPU
Usage:  svccfg -s ldmd listprop ldmd/autoreplacement_policy_cpu
            
Example
            
 o display autoreplacement_policy_cpu property value  use the  following command:
            
    #svccfg -s ldmd listprop ldmd listprop ldmd/autoreplacement_policy_cpu           Example (from M10-1 system)         root@m10-1-igurkul-a:~# svccfg -s ldmd listprop ldmd/autoreplacement_policy_cpu
ldmd/autoreplacement_policy_cpu integer     1
root@m10-1-igurkul-a:~# 
            
Note 1 == replacement policy enabled
     0 == replacement policy disabled       
Example to change replacement policy :           #svccfg -s ldmd listprop ldmd/autoreplacement_policy_cpu
#svcadm disable ldmd
#svccfg -s ldmd setprop ldmd/autoreplacement_policy_cpu=0
#svcadm refresh ldmd
#svcadm enable ldmd

 

 Add/Create/Assign Guest Domains
Add Guest Domain
Usage :ldm add-domain  <guest domain>
                       Exampleroot@t5-igurkul-a:/dev/dsk# ldm add-domain guestdom1  
root@t5-igurkul-a:/dev/dsk# ldm ls
NAME             STATE     FLAGS     CONS    VCPU  MEMORY  UTIL  NORM  UPTIME
primary          active    -n-cv-    UART    16    128G    0.2%  0.1%  40m
guestdom1        inactive  ——                                    
root@t5-igurkul-a:/dev/dsk# 
Assign cpu threads to Guest Domain
Usage: ldm add-vcpu  <number>  <guest-domain-name>
            Examplejack@m5-igurkul-a-pdom01:~$ 
jack@m5-igurkul-a-pdom01:~$ ldm list
NAME             STATE      FLAGS    CONS    VCPU  MEMORY     UTIL  NORM  UPTIME
primary          active     -n-cv-   UART    8     251648M    0.3%  0.2%  4h 22m
guest-dom1       active     -n—-   5001    8     4G         0.2%  0.2%  4m
            
jack@m5-igurkul-a-pdom01:~$ ldm add-vcpu  6 guest-dom1
jack@m5-igurkul-a-pdom01:~$ ldm list
NAME             STATE      FLAGS    CONS    VCPU  MEMORY      UTIL  NORM  UPTIME
primary          active     -n-cv-   UART    8     251648M     0.6%  0.5%  4h 23m
guest-dom1       active     -n—-   5001    14    4G          1.2%  0.3%  5m
jack@m5-igurkul-a-pdom01:~$
Asssign vcpu units of cores
Usage: ldm add-core, ldm set-core  <number> <ldom>
            
Note: CPUs cannot be assigned to an ldom in units of cores and in units of threads simultaneously. Choose either of these units of assignment for each ldom        
Assign memory to Guest Domain
Usage:  ldm add-memory <number>  <guest-domain-name>
            ldm set-memory <number>   <guest-domain-name>
            
Note that the Guest domain OS must be up and running to do memory DR.
                      
Example          root@t5-igurkul-a:~# ldm ls       
NAME  STATE   FLAGS   CONS    VCPU  MEMORY   UTIL  NORM  UPTIME
primary active -n-cv-  UART    32    2G     0.2%  0.1%  15h 3m
guestdomain1 active  -n—-  5000    64   8G 0.0%  0.0%  14h 9m
root@t5-igurkul-a:~# ldm add-memory 4G guestdomain1
root@t5-igurkul-a:~# ldm ls
NAME   STATE  FLAGS   CONS  VCPU  MEMORY   UTIL  NORM  UPTIME
primary active -n-cv- UART    32    2G  0.2%  0.2%  15h 4m
guestdomain1  active  -n—-  5000  64  12G   2.2%  1.0% 14h10m
root@t5-igurkul-a:~#
Add vnet device to Guest Domain
Usage: ldm add-vnet  <if-name> <vsw-name> <ldom-name>

adds a virtual network device to a domain
                              
Example

root@m10-1-igurkul-a:~# ldm  add-vnet vnet2 primary-vsw0 ldom1
root@m10-1-igurkul-a:~# ldm list-bindings ldom1
KPROP  
vnet1  primary-vsw0@primary   0  network@0  00:14:4f:f9:bb:ca  1          1500                       
PEER                  MAC               MODE  PVID VID    MTU   MAXBW  LINKPROP  
primary-vsw0@primary  00:14:4f:fa:21:9f        1          1500            
vnet0@ldom2           00:14:4f:f9:08:51        1          1500                       
vnet2@ldom1           00:14:4f:fa:66:56        1          1500                       
NAME  SERVICE  ID  DEVICE  MAC   MODE  PVID  VID  MTU   MAXBW LINKPROP  
vnet2 primary-vsw0@primary 1  network@100:14:4f:fa:66:56  1 1500         
PEER                 MAC MODE   PVID VID   MTU   MAXBW   LINKPROP  
primary-vsw0@primary 00:14:4f:fa:21:9f    1  1500 vnet1@ldom1           00:14:4f:f9:bb:ca   1  1500                       
vnet0@ldom2           00:14:4f:f9:08:51   1   1500                       
         

 

Assign disk resource to Guest Domain
ldm ls -o disk primary
NAME            
primary         
            
VDS
NAME               VOLUME          OPTIONS   MPGROUP  DEVICE
primary-vds0       S11iso                             /export/sol-11_1-text-sparc.iso
                   guestdom1bootdisk                  /dev/dsk/c13t4d0s0
                   guestdom2bootdisk                  /dev/dsk/c13t4d1s2
            
root@t5-igurkul-a:~# ldm ls -o disk guestdom3
NAME            
guestdom3       
            
root@t5-igurkul-a:~# 
root@t5-igurkul-a:~# ldm add-vdisk cdromiso  S11iso@primary-vds0 guestdom3
root@t5-igurkul-a:~# ldm ls -o disk guestdom3
NAME            
guestdom3       
            
DISK
NAME      VOLUME               TOUT ID       DEVICE  SERVER         MPGROUP      
cdromiso  S11iso@primary-vds0    0           disk@0  primary                     
            
root@t5-igurkul-a:~#
Assign ISO resource to Guest Domain
root@t5-igurkul-a:# ldm stop ldg0

root@t5-igurkul-a:ldm add-vdiskserverdevice /export/home/sol-11_2-text-sparc.iso    iso@primary-vds0

root@t5-igurkul-a:ldm add-vdisk iso iso@primary-vds0 ldg0
root@t5-igurkul-a:/export/home# ldm start ldg0
LDom ldg0 started
root@t5-igurkul-a:~# ldm ls -o disk primary
NAME             
primary          

VDS
    NAME             VOLUME         OPTIONS          MPGROUP        DEVICE
    primary-vds0     vol1                                           /ldg0-disk
                     iso                                            /export/home/sol-11_2-text-sparc.iso

root@t5-igurkul-a:~# telnet localhost 5000
Trying ::1…
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.

Connecting to console “ldg0” in group “ldg0” ….
Press ~? for control options ..
NOTICE: Entering OpenBoot.
NOTICE: Fetching Guest MD from HV.
NOTICE: Starting additional cpus.
NOTICE: Initializing LDC services.
NOTICE: Probing PCI devices.
NOTICE: Finished PCI probing.

SPARC T5-8, No Keyboard
Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.37.0.build_29, 64.0000 GB memory available, Serial #83521195.
Ethernet address 0:14:4f:fa:6e:ab, Host ID: 84fa6eab.

{0} ok
{0} ok
{0} ok
{0} ok
{0} ok
{0} ok
{0} ok ~
~ ?
{0} ok
{0} ok
telnet> quit
Connection to localhost closed.
root@t5-igurkul-a:~# telnet localhost 5000
Trying ::1…
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.

Connecting to console “ldg0” in group “ldg0” ….
Press ~? for control options ..

~ ?
{0} ok show-disks
a) /reboot-memory@0
b) /pci@440/pci@1/pci@0/pci@c/SUNW,qlc@0,2/fp@0,0/disk
c) /virtual-devices@100/channel-devices@200/disk@1    <<<—— ISO
d) /virtual-devices@100/channel-devices@200/disk@0
e) /iscsi-hba/disk
q) NO SELECTION
Enter Selection, q to quit: q
{0} ok

{0} ok devalias
iso                      /virtual-devices@100/channel-devices@200/disk@1   <<<—-
vdisk0                   /virtual-devices@100/channel-devices@200/disk@0
vnet0                    /virtual-devices@100/channel-devices@200/network@0
net                      /virtual-devices@100/channel-devices@200/network@0
disk                     /virtual-devices@100/channel-devices@200/disk@0
virtual-console          /virtual-devices/console@1name                     aliases

{0} ok boot iso -s    
Boot device: /virtual-devices@100/channel-devices@200/disk@1  File and args: -s
SunOS Release 5.11 Version 11.2 64-bit
Copyright (c) 1983, 2014, Oracle and/or its affiliates. All rights reserved.
Booting to milestone “milestone/single-user:default”.
Remounting root read/write
Probing for device nodes …

 

 

Stop/Break/Unbind Guest Domains
Issue send break
Usage: CTRL+]   type  “send break” followed by return then another return
            
Exampleroot@t5-igurkul-a:~# telnet localhost 5000
Trying ::1…
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
            
Connecting to console “guestdom1” in group “guestdom1” ….
Press ~? for control options ..
            
telnet> send brk
Debugging requested; hardware watchdog suspended.
c)ontinue, s)ync, r)eset? s
            
panic[cpu18]/thread=2a1018f1c60: sync initiated
Stop Guest Domain
Usage: ldm stop < guest domain name >
            
Exampleroot@t5-igurkul-a:~# ldm stop guestdom2
LDom guestdom2 stopped
root@t5-igurkul-a:~#
ubind Guest Domain 
Usage: ldm unbind <guest-domain-name>
 Exampleroot@t5-igurkul-a:~# ldm unbind guest-dom1

 

Remove/Delete Guest Domains
Remove a Guest Domain
Usage:    ldm remove-domain (-a |  <ldom>…)
            
Example          
      root@t5-igurkul-a:~# ldm ls
NAME      STATE      FLAGS   CONS  VCPU  MEMORY     UTIL NORM  UPTIME            primary   active     -n-cv-  UART    16    128G     0.1%  0.1%   1d 1h 13m
guestdom1 bound      ——  5000    128   128G                
guestdom2 inactive   ——          32    256G                
guestdom3 inactive   ——                                    
root@t5-igurkul-a:~# ldm remove-domain guestdom3
root@t5-igurkul-a:~# ldm ls
NAME      STATE      FLAGS   CONS    VCPU  MEMORY    UTIL  NORM   UPTIME
primary   active     -n-cv-  UART    16    128G      0.3%  0.3%   1d 1h 13m
guestdom1 bound      ——  5000    128   128G                
guestdom2 inactive   ——          32    256G                
root@t5-igurkul-a:~#     
Remove disk resource from Guest Domain
Usage:  ldm remove-vdisk [-f]  <disk_name> <ldom-name>
           
Example
            root@m10-1-igurkul-a:~# ldm remove-vdisk vdisk2 ldom1
root@m10-1-igurkul-a:~# ldm list-bindings ldom1
NAME        STATE      FLAGS   CONS    VCPU  MEMORY   UTIL   UPTIME
ldom1       active     -n—-  5000    4     6G       1.4%   2h 27m
            
UUID
537e8abe-6bf5-cac6-b1d6-f2670010a85b
            
MAC
         

            
DISK
NAME     VOLUME                  TOUT ID     DEVICE  SERVER    MPGROUP       
vdisk1   vol1@primary-vds0          0        disk@0  primary                      
            
VCONS
NAME     SERVICE                 PORT        LOGGING
ldom1    primary-vcc0@primary    5000        on      
            
root@m10-1-igurkul-a:~#
Remove virtual network device from a Guest Domain
Usage:   ldm remove-vnet [-f] <if_name>  <ldom>
            
Example
jack@m5-igurkul-a-pdom01:~$ 
jack@m5-igurkul-a-pdom01:~$ ldm remove-vnet vnet2 guest-dom1         
Remove CPU threads from a Guest Domain
Usage:   ldm remove-vcpu [-f|–force] [-c|–core] <number> <ldom-name>          
            
Exampleroot@t5-igurkul-a:~# ldm ls
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  NORM  UPTIME
primary          active     -n-cv-  UART    32    2G       0.1%  0.1%  15h 8m
guestdomain1     active     -n—-  5000    96    12G      0.1%  0.0%  14h 14m
root@t5-igurkul-a:~# ldm remove-vcpu 32 guestdomain1
root@t5-igurkul-a:~# ldm ls
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  NORM  UPTIME
primary          active     -n-cv-  UART    32    2G       0.2%  0.1%  15h 8m
guestdomain1     active     -n—-  5000    64    12G      1.3%  1.2%  14h 14m
root@t5-igurkul-a:~#
           
Remove virtual cpu units in cores from a  Guest Domain
Usage: ldm remove-core [-f|–force]  <number>|cid=<id>[,<id>[,…]]  <ldom-name>
            
Exampleroot@t5-igurkul-a:~# ldm ls
NAME             STATE      FLAGS   CONS    VCPU  MEMORY UTIL  NORM  UPTIME
primary          active     -n-cv-  UART    16    128G   0.3%  0.3%  1d 22h 29m
guestdom1        bound      ——  5000    128   128G                
guestdom2        active     -n—-  5001    32    256G   0.0%  0.0%  21h 3m
guestdom3        active     -t—-  5002    64    64G    1.6%  1.6%  9m
root@t5-igurkul-a:~# ldm remove-core 2 guestdom2
root@t5-igurkul-a:~# ldm ls
NAME             STATE      FLAGS   CONS    VCPU  MEMORY UTIL  NORM  UPTIME
primary          active     -n-cv-  UART    16    128G   0.2%  0.2%  1d 22h 29m
guestdom1        bound      ——  5000    128   128G                
guestdom2        active     -n—-  5001    16    256G   0.8%  0.8%  21h 4m
guestdom3        active     -t—-  5002    64    64G    1.6%  1.6%  9m
root@t5-igurkul-a:~#   
Remove memory from a Guest Domain
Usage: ldm remove-memory  <number>   <ldom-name>
          
Example
root@m5-igurkul-a-pdom01:~# ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY  UTIL  NORM  UPTIME
primary          active     -n-cv-  UART    8     251648M 1.8%  1.7%  4h 55m
guest-dom1       active     -n—-  5001    8     12G     1.1%  0.8%  4m
root@m5-igurkul-a-pdom01:~# ldm remove-memory 8G guest-dom1
root@m5-igurkul-a-pdom01:~# ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY  UTIL  NORM  UPTIME
primary          active     -n-cv-  UART    8     251648M 1.0%  1.1%  4h 58m
guest-dom1       active     -n—-  5001    8     4G      0.2%  0.2%  6m
root@m5-igurkul-a-pdom01:~#
Start a Guest Domain
Usage:  ldm start (-a | -i <file> |  <ldom>…
            Example          #ldm start guest-dom1 
Save LDOM Config
Usage:  ldm add-spconfig [-r  <autosave>] <config_name>     
            
Exampleroot@t5-igurkul-a:~# ldm list-spconfig
factory-default
guestdom1 [next poweron]
root@t5-igurkul-a:~#
root@t5-igurkul-a:~# ldm add-spconfig mynewconfiguration
root@t5-igurkul-a:~# ldm list-spconfig
factory-default
mynewconfiguration [current]
root@t5-igurkul-a:~# 
Backup of existing configuration from the control domain
Usage: ldm list-constraints -x > < file.xml >

Example

# 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

 

LDOM Resources
Identity physical resources bindings
00:10:e0:24:6a:b1

HOSTID
0x86246a9d

CONTROL
failure-policy=ignore
extended-mapin-space=on
cpu-arch=native
rc-add-policy=
shutdown-group=0

VCPU
COUNT: 288

MEMORY
SIZE: 3144448M

CONSTRAINT
threading=max-throughput

VARIABLES
boot-device=/pci@700/pci@1/pci@0/pci@c/pci@0/pci@4/scsi@0/disk@w5000cca0162f5cc5,0:a
pm_boot_policy=disabled=0;ttfc=22746;ttmr=0;
use-nvramrc?=true

IO
DEVICE OPTIONS
pci_16
pci_17
pci_18
pci_19
pci_24
pci_25
pci_26
pci_27
pci_20
pci_21
pci_22
pci_23
      

Bind resources to a Guest Domain
Usage: ldm bind [-f] [-q] (-i <file> |  <ldom>)
            
            
Example
root@m5-igurkul-a-pdom01:~# ldm list
NAME       STATE      FLAGS   CONS    VCPU  MEMORY  UTIL  NORM  UPTIME
primary    active     -n-cv-  UART    8     251648M 2.8%  1.6%  6m
guest-dom1 inactive   ——          8     4G                   
root@m5-igurkul-a-pdom01:~# 
root@m5-igurkul-a-pdom01:~# ldm bind guest-dom1
root@m5-igurkul-a-pdom01:~# ldm list
NAME       STATE      FLAGS   CONS    VCPU  MEMORY  UTIL  NORM  UPTIME
primary    active     -n-cv-  UART    8     251648M       2.8%  1.7%  6m
guest-dom1 bound      ——  5001    8     4G    
unbind resources to a Guest Domain
Usage:   ldm unbind <ldom-name>
            
            
Example
root@t5-igurkul-a:~# ldm ls
NAME       STATE      FLAGS   CONS    VCPU  MEMORY  UTIL  NORM  UPTIME
primary    active     -n-cv-  UART    16    128G    0.4%  0.4%  22h 43m
guestdom1   bound      ——  5000    128   256G                
guestdom2   bound      ——  5001    8     1G                  
root@t5-igurkul-a:~# ldm unbind guestdom2
root@t5-igurkul-a:~# ldm ls
NAME       STATE      FLAGS   CONS    VCPU  MEMORY  UTIL  NORM  UPTIME
primary    active     -n-cv-  UART    16    128G    1.2%  1.2%  22h 44m
guestdom1  bound      ——  5000    128   256G                
guestdom2  inactive   ——          8     1G                  
root@t5-igurkul-a:~#
           

 

Accessing Guest Domain
Login to the console of a Guest Domain
Usage: telnet localhost < console port # >
            
            
Example       
root@m10-1-igurkul-a:~# ldm list
NAME      STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary   active     -n-cv-  UART    8     8G       0.1%  22h 49m
ldom1     active     -n—-  5000    4     4G       0.0%  22h 47m
ldom2     active     -t—-  5001    4     4G        16%  4s
root@m10-1-igurkul-a:~# telnet localhost 5001
Trying ::1…
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
            
Connecting to console “ldom2” in group “ldom2” ….
Press ~? for control options ..
            
{0} ok 
{0} ok 
{0} ok 
{0} ok 
Exit from a Guest Domain console
Usage: CTRL+] then q
            
Exampleroot@t5-igurkul-a:~# telnet localhost 5001
Trying ::1…
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
            
Connecting to console “guestdom2” in group “guestdom2” ….
Press ~? for control options ..
            
            
{0} ok devalias
vdisk0                 /virtual-devices@100/channel-devices@200/disk@0
cdromiso               /virtual-devices@100/channel-devices@200/disk@1
vnet0                  /virtual-devices@100/channel-devices@200/network@0
net                    /virtual-devices@100/channel-devices@200/network@0
disk                   /virtual-devices@100/channel-devices@200/disk@1
virtual-console        /virtual-devices/console@1
name                   aliases
{0} ok boot vdisk0
Boot device:  /virtual-devices@100/channel-devices@200/disk@0  File and args:
SunOS Release 5.11 Version 11.1 64-bit
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.
Hostname: guestdom2
            
guestdom2 console login:
telnet> quit
Connection to localhost closed.
root@t5-igurkul-a:~#
Enable/Disable console loggging function for  a Guest Domain
usage: ldm set-vcons log=off | on  <ldom-name>
           ldm ls – o console < guest domain >The guest gomain console log will be stored in the following directory/var/log/vntsd
Display current console settings of a Guest  Domain
usage: ldm list -o console <ldom-name>
            
Example
root@m10-1-igurkul-a:~# ldm list -o console ldom1
NAME             
ldom1            
            
VCONS
NAME             SERVICE                     PORT               LOGGING
ldom1            primary-vcc0@primary        5000               on      
            
root@m10-1-mysd04-a:~# ldm list -o console
NAME             
primary          
            
VCC
NAME             PORT-RANGE
primary-vcc0     5000-5100
            
VCONS
NAME             SERVICE                     PORT               LOGGING
                                             UART
  
———————————————————————–
NAME             
ldom1            
            
VCONS
NAME             SERVICE                     PORT               LOGGING
ldom1            primary-vcc0@primary        5000               on     
          
———————————————————————
NAME             
ldom2            
            
VCONS
NAME             SERVICE                     PORT               LOGGING
ldom2            primary-vcc0@primary        5001               on      
            
root@m10-1-igurkul-a:~#
           

 

 

Support Data Collection
Collect System information via Explorer command        
T3,T4,T5 and  M10 : #/usr/sbin/explorer -w default
            
Mx-32 PDOM (primary) : #/usr/sbin/explorer -w default,\!ipmi -timeout 900

 

Display  LDOM Info
List all Service Domains in the platform from Solaris
Usage: ldm ls [-e] [-l] [-S] [-o <format>] [-p] [<ldom>…]

format’ is one or more of:
console,core,cpu,crypto,disk,domain,memory,network,physio,resmgmt,serial,status

          
Example:               
     

root@m10-1-igurkul-a:~# ldm ls -o console,network,disk

List all LDOM config from SP with timestamp        
Usage: [T3/T4/t5]  show /HOST/domain/configs date_created -t      

Note: For SPARC T3/T4 and T5  “/HOST/domain/configs” will list all the saved configurations and “/HOST/bootmode config”  for the current and active config.    

Example T3/T4/T5    

-> show /HOST/domain/configs date_created -t

Target       |       Property   | Value

———————————+————–+———————

/HOST/domain/configs/mydomain  | date_created | 2013-11-13 12:50:27

/HOST/domain/configs/guestdom1 | date_created | 2013-11-18 15:26:58 ->

Usage  [M5/M6]    show/HOSTx/domain/configs date_created -t  [where x=0..3 ]  

Note: For SPARC M5/M6  “/HOSTx/domain/configs” will list all the saved configurations and “/HOSTx/bootmode config”  for the current and active config.

Example M5/M6

> show  /HOST0/domain/configs date_created -t
     Target    |     Property  |  Value                                                                                       
————-+—————–+———————————–
/HOST0/domain/configs/beba   |   date_created   |   2014-02-27 06:56:13
/HOST0/domain/configs/101113 |   date_created   |   2013-11-10 05:09:55
/HOST0/domain/configs/final1 |   date_created   |   2014-01-13 22:39:04

List current LDOM config from SP
Usage [ T3/T4/T5]  show /HOST/domain/config -t

Example T3/T4/T5

-> show /HOST/bootmode config -t

Target                   | Property         | Value                                                                    

————————–+——————+——————–

/HOST/bootmode           | config           | guestdom1

->

Usage  [M5/M6]     show/HOSTx/domain/configs  -t  [where x=0..3 ]   

Example M5/M6      

-> show  /HOST0/domain/configs -t
Target      |     Property       |                    Value
————+——————–+————————————
/HOST0/domain/configs/101113 |   date_created      |   2013-11-10 05:09:55
/HOST0/domain/configs/101113 |   domains           |   2            

Usage [M10]  showdomainconfig -p PPAR-ID  where PPAR-ID=0 …15

XSCF> showdomainconfig -p 0
PPAR-ID     :0
Booting config
 (Current)  :initial
 (Next)     :initial
—————————————————————————–
Index       :1
config_name :factory-default
domains     :1
date_created:-
—————————————————————————–
Index       :2
config_name :mark1
domains     :3
date_created:’2015-05-01 20:34:00′
—————————————————————————–
Index       :3
config_name :mark2
domains     :3
date_created:’2015-05-01 19:18:56′
—————————————————————————–
Index       :4
config_name :initial
domains     :1
date_created:’2015-05-20 16:56:33′
—————————————————————————–
Index       :5
config_name :mark
domains     :1
date_created:’2015-04-29 22:17:15

 

Check virtualization info
Usage: virtinfo -a
             
The virtinfo  utility provides  current domain  information
            
Primary domain outputeis@m10-1-igurkul-a:~$ virtinfo -a
Domain role: LDoms control I/O service root
Domain name: primary
Domain UUID: 78b8eb2a-6a60-4ce7-a383-4fd27aafeac5
Control domain: Unknown
Chassis serial#: Unknown
eis@m10-1-igurkul-a:~$            
Guest domain outputroot@bookable-192-168-57-211:~# virtinfo -a
Domain role: LDoms guest
Domain name: ldom1
Domain UUID: 53066220-e871-6998-ed41-e13d7aa79745
Control domain: m10-1-igurkul-a
Chassis serial#: PZ31341009

 

Troubleshooting
Crash Dump : SPARC T3/T4/T5 Control Domain from ILOM
Usage:  set  /HOST/send_break_action=dumpcore
Crash Dump : SPARC M5/M6 Control Domain from ILOM
Usage:  set  /HOSTn/send_break_action=dumpcore           
               where n=0 …3Example-> pwd
Current default target: /HOST0
           
-> set send_break_action=dumpcore
Set ‘send_break_action’ to ‘dumpcore’
           
-> start /HOST0/console
Are you sure you want to start /HOST0/console (y/n)? y
           
Serial console started.  To stop, type #.
          
panic[cpu508]/thread=2a108c77c60: sync initiated
           
sched: trap type = 0x0
pid=0, pc=0x0, sp=0x0, tstate=0x0, context=0x0
o0-o7: 0, 0, 0, 0, 0, 0, 0, 0
Crash Dump : SPARC M10 Control Domain XSCF
Usage:  XSCF>reset -p <ppar_id> -g primary  panic
Crash a guest domain from the control domain
Usage:  ldm panic-domain <ldom-name>

Example

eis@m10-1-igurkul-a:~$ ldm panic-domain ldom2
eis@m10-1-igurkul-a:~$ ldm list
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
primary active -n-cv- UART 8 8G 0.6% 27d 1h 13m
ldom1 active -n—- 5000 4 6G 0.0% 11d 18h 57m
ldom2 active -t—- 5001 4 4G 100% 13d 21h 48m

 Crash Guest Domain from Service Processor
Usage: reset [ [-q]  -{y|n}]  -p ppar_id  -g domainname  sir             reset [ [-q]  -{y|n}]  -p ppar_id  -g domainname  panic               where ppar_id =0 …15 domainname = guest domain name sir = resets ldom panic = crashes the guest domainExampleXSCF> reset -p 0 -g ldom2 panicPPAR-ID :00GuestDomain to panic : ldom2Be sure to execute “ldm add-spconfig” before using this command when you have changed the ldm configuration.Otherwise, an unexpected domain might be reset.Continue? [y|n] :y00 ldom2 : ResettingNote:  Use XSCF command “showdomainstatus” to check result of panic.Guest Domain Console

# uname -a

SunOS 192.168-57-212.au.reddot.com 5.10 Generic_147147-26 sun4v sparc sun4v#

panic[cpu0]/thread=2a10001fc80: Panic – Generated at user request000002a10001f6a0 unix:process_nonresumable_error+2d8 (2a10001f890,0,ff,40,5,40)%l0-3: 0000000000000100 0000000003000000 0000000000000001000000000180c600%l4-7: 0000000000000000 0000000100000000 00000000ffffffff0000000000000000000002a10001f7e0 unix:ktl0+64 (0,1,0,100,1010101,12)%l0-3: 000000000180c000 0000000000000000 00000000110014040000000001029aa4%l4-7: 0000000000000000 0000000000000000 0000000000000000000002a10001f890000002a10001f930 unix:cpu_halt+f4 (180c000, 0, 19dd9b8,19dd888, 180c000, 0)%l0-3: 00000000019d73a4 0000000000000001 00000000000000160000000000000000%l4-7: 0000000000000000 0000000000000002 000000000180c1780000000000000001000002a10001f9e0 unix:idle+128 (1866c00, 4, 180c000,ffffffffffffffff,1,1865800)%l0-3: 00000000019d7380 000000000000001b 0000000000000000ffffffffffffffff%l4-7: 0000000000000001 0000000001a6ec00 000000000180c1780000000001045bac

syncing file systems… done

dumping to /dev/zvol/dsk/rpool/dump, offset 65536, content:kernel0:17

100% done

To check failed cpu or memory components from Control Domain
Usage:  

# ldm list-domain -l -S          
# ldm list-devices -S mem cpu

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us