This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
LDOM COMMAND REFERENCE
Contents Display Default LDOM services 2
Creating Default LDOM services 3
Removing Default LDOM services 5
Start Default Services 6
Basic Guest Domain Administration 7
stop/break/unbind 11
Add/Create/Assign 12
Remove/Delete 14
Start 17
Save LDOM Config 17
Resources 18
Accessing Guest Domain 20
Support Data Collection Explorer 23
SP snapshot 23
Display LDOM Info 23
Crashdump: Control Domain 26
Guest Domain 27
Checked for failed components (CPU/Memory) 29
Display Default LDOM services
Action
Command
Check ldom manager (ldmd)
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
#svcs ldmd
Check vntsd is running
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
#svcs vntsd
Check Default Services are running
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
#ldm list-services primary
Check ldm software
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Usage :ldm -V
Example
#ldm -V 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
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Usage: ldm list-bindings <ldom-name> Example
#ldm list-bindings guestdomain2
how to identify if the current domain?
[Control,Guest,Service or Root]
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Usage: $virtinfo -a Example jack@m5-32-sca11-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-32-sca11-a-pdom01:~$
how to check status of I/O device
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Usage: ldm list-io
Example
root@m10-1-syd04-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
when do we need to initiate an LDOM reconfig reboot
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
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-8-sin06-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-8-sin06-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-8-sin06-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-8-sin06-a:~$ ldm set-memory 128G primary Cannot enable FILE_DAC_READ privilege jack@t5-8-sin06-a:~$ su Password: Jun 26 16:10:26 t5-8-sin06-a su: 'su root' succeeded for jack on /dev/console root@t5-8-sin06-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-8-sin06-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-8-sin06-a:~# root@t5-8-sin06-a:~# reboot Jun 26 16:11:55 t5-8-sin06-a reboot: initiated by jack on /dev/console Jun 26 16:12:02 t5-8-sin06-a syslogd: going down on signal 15 syncing file systems... done
Check CPU activation Usage: ldm list-permits
Supported on SPARC T3/T4/T5 : No Supported on SPARC M5/M6: No Supported on SPARC M10: Yes
Example
eis@m10-1-syd04-a:~$ uname -a SunOS m10-1-syd04-a.au.oracle.com 5.11 11.2 sun4v sparc sun4v eis@m10-1-syd04-a:~$ su Password: root@m10-1-syd04-a:~# ldm list-permits CPU CORE PERMITS (PERMANENT) IN USE REST 16 (16) 8 8
Check Autoreplacement policy for CPU
Supported on SPARC T3/T4/T5 : No Supported on SPARC M5/M6: No Supported on SPARC M10: Yes
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
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Usage: ldm unbind <guest-domain-name>
Example
root@t5-8-sin06-a:~# ldm unbind guest-dom1
Add/Create/Assign
Action
Command
Add Guest Domain
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Support on SPARC M10: Yes
Usage :ldm add-domain <guest domain>
Example
root@t5-8-sin06-a:/dev/dsk# ldm add-domain guestdom1 root@t5-8-sin06-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-8-sin06-a:/dev/dsk#
assign cpu threads to Guest Domain
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Support on SPARC M10: Yes
Usage: ldm add-vcpu <number> <guest-domain-name>
Example
jack@m5-32-sca11-a-pdom01:~$ jack@m5-32-sca11-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-32-sca11-a-pdom01:~$ ldm add-vcpu 6 guest-dom1 jack@m5-32-sca11-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-32-sca11-a-pdom01:~$
assign vcpu units of cores
Supported on SPARC T3/T4/T5 : Yes Supported on
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
SPARC M5/M6: Yes Supported on SPARC M10: Yes
assign memory to Guest Domain
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
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-8-sin06-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-8-sin06-a:~# ldm add-memory 4G guestdomain1 root@t5-8-sin06-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% 14h 10m root@t5-8-sin06-a:~#
add vnet device to Guest Domain
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
root@m10-1-syd04-a:~# ldm add-vnet vnet2 primary-vsw0 ldom1 root@m10-1-syd04-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@1 00: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
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Usage: ldm add-vdisk [timeout=<seconds>] [id=<diskid>] <disk_name> <volume_name>@<service_name> <ldom> Example root@t5-8-sin06-a:~# 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-8-sin06-a:~# ldm ls -o disk guestdom3 NAME guestdom3 root@t5-8-sin06-a:~# root@t5-8-sin06-a:~# ldm add-vdisk cdromiso S11iso@primary-vds0 guestdom3 root@t5-8-sin06-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-8-sin06-a:~#
Remove/Delete
Action
Command
Remove a Guest Domain
Supported on SPARC T3/T4/T5 : Yes
Usage: ldm remove-domain (-a | <ldom>...) Example
root@t5-8-sin06-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
Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Usage: ldm remove-vdisk [-f] <disk_name> <ldom-name> Example root@m10-1-syd04-a:~# ldm remove-vdisk vdisk2 ldom1 root@m10-1-syd04-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-syd04-a:~#
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Usage: ldm bind [-f] [-q] (-i <file> | <ldom>) Example root@m5-32-sca11-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-32-sca11-a-pdom01:~# root@m5-32-sca11-a-pdom01:~# ldm bind guest-dom1 root@m5-32-sca11-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
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Usage: ldm unbind <ldom-name> Example root@t5-8-sin06-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-8-sin06-a:~# ldm unbind guestdom2 root@t5-8-sin06-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-8-sin06-a:~#
Accessing Guest Domain
Action
Command
login to the console of a Guest Domain
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Usage: telnet localhost < console port # > Example
root@m10-1-syd04-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-syd04-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
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Usage: CTRL+] then q Example
root@t5-8-sin06-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-8-sin06-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 >
Note: OVM 3.0 required
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
The guest gomain console log will be stored in the following directory
/var/log/vntsd
Display current console settings of a Guest Domain
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
usage: ldm list -o console <ldom-name> Example root@m10-1-syd04-a:~# ldm list -o console ldom1 NAME ldom1 VCONS NAME SERVICE PORT LOGGING ldom1 primary-vcc0@primary 5000 on root@m10-1-syd04-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-syd04-a:~#
Support Data Collection
Explorer
Action
Command
Collect System information via Explorer command
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Data collection from SPARC M5/M6 SP (service processor)
SPARC M5-32 Servers: M5-32 snapshot using ILOM 3.2.1.3.b and beyond [Doc ID 1538200.1]
Data collection from SPARC M10 SP (service processor)
Fujitsu M10 Servers (Doc ID 1540225.1)
Data collection from SPARC T3/T4/T5 SP (service processor)
Collect ILOM snapshot on T3-x and T4-x systems without an active network management connection (Doc ID 1518044.1)
Troubleshooting data needed for T3-x, T4-x & T5-x servers (Doc ID 1470580.1)
Display LDOM Info
Action
Command
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
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Example:
root@m10-1-syd04-a:~# ldm ls -o console,network,disk
list all LDOM config from SP with timestamp
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: No
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.
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Usage: virtinfo -a The virtinfo utility provides current domain information Primary domain output
eis@m10-1-syd04-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-syd04-a:~$
Guest domain output
root@bookable-10-187-57-211:~# virtinfo -a Domain role: LDoms guest Domain name: ldom1 Domain UUID: 53066220-e871-6998-ed41-e13d7aa79745 Control domain: m10-1-syd04-a Chassis serial#: PZ31341009
Crashdump:
Control Domain
Action
Example
SPARC T3/T4/T5 Control Domain from ILOM
Usage: set /HOST/send_break_action=dumpcore
SPARC M5/M6 Control Domain from ILOM
Usage: set /HOSTn/send_break_action=dumpcore where n=0 ...3
Example
-> 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
Supported on SPARC T3/T4/T5 : Yes Supported on SPARC M5/M6: Yes Supported on SPARC M10: Yes
Usage: ldm panic-domain <ldom-name>
Example
eis@m10-1-syd04-a:~$ ldm panic-domain ldom2 eis@m10-1-syd04-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 eis@m10-1-syd04-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 .. bookable-10.187-57-212.au.oracle.com console login: Jul 9 12:41:57 10.187-57-212.au.oracle.com savecore:Decompress the crash dump with Jul 9 12:41:57 10.187-57-212.au.oracle.com 'savecore -vf /var/crash/vmdump.0'
Crash Guesdt Domain from Service Processor
Supported on SPARC T3/T4/T5 : No Supported on SPARC M5/M6: No Supported on SPARC M10: Yes
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 domain
Example
XSCF> reset -p 0 -g ldom2 panic PPAR-ID :00 GuestDomain to panic : ldom2 Be 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] :y 00 ldom2 : Resetting
Note: Use XSCF command "showdomainstatus" to check result of panic.