Oracle VM for SPARC (LDOM) Quick Reference Guide (Prepared by Rajkumar www.unixrock.com) Descriptions Command Syntax with Examples Categories ldm # ldm -V Display version information of LDM and Hypervisor Bindings # ldm list-bindings [-e] [-p] [<ldom>...] List of resources that are bound to the Control Domain Services # ldm list-services [-e] [-p] [<ldom>...] List the Virtual services currently configure in the Control Domain # ldm list-constraints ([-x] | [-e] [-p]) [<ldom>...] Constraints Example : # ldm list-constraints -p <ldom1> Example : # ldm list-constraints -x "ldom1" > /path_to_backup.xml Example : # "ldm bind-domain -i /path_to_backup.xml" List the constraints for the Guest Domain in Mechine readable format To list the constraints for the Guest Domain in Mechine readable format Taking backup configuration which containing the constraints for guest in XML format To restore the configuration for guest domain # ldm list-devices [-a] [-p] [core] [cpu] [crypto|mau] [memory] [io] Devices Example : # ldm list-devices -a Example : # ldm list-devices -a cpu Example : # ldm list-devices -a memory Example : # ldm list-devices -a io # ldm list-domain [-e] [-l] [-o <format>] [-p] [<ldom>...] To list all the host server resources details To list all the host server CPU resources To list all the host server MEMORY resources To list all the host server IO resources To List the number of domains Example : # ldm list-domain # ldm add-domain (-i <file> |[mac-addr=<num>] [hostid=<num>][failurepolicy=<ignore|stop|reset|panic>][master=<master_ldom1,...,master_ldom4>] <ldom>...) To Create a frame work for a new guest domain Example : # ldm add-domain <ldom1> # ldm remove-domain (-a | <ldom>...) To Remove the Guest domain Example : # ldm remove-domain <ldom1> # ldm start-domain (-a | -i <file> | <ldom>...) To start the guest domain Example : # ldm start-domain <ldom1> Domain or dom # ldm stop-domain [-f] (-a | <ldom>...) To stop the guest domain # ldm bind-domain (-i <file> | <ldom>) To bind the guest domain Example : # ldm stop-domain <ldom1> Example : # ldm bind-domain <ldom1> # ldm unbind-domain <ldom> To unbind the guest domain Example : # ldm unbind-domain ldom1 # ldm panic-domain <ldom> # ldm migrate-domain [-f] [-n] [-p <password_file>] <source_ldom> [<user>@]<target_host>[:<target_ldom>] Example : # ldm migrate-domain ldom1 [email protected] To panic the guest domain To migrate the guest domain to another control domain Need to provide the Target server root passwd here, if we use "-n" option,t it will perform the check for the migrations, but the source domain is not migrated # ldm list-io [-l] [-p] To list the I/O devices Example : # ldm list-io -l I/O # ldm add-io <bus/device> <ldom> To add the I/O devices Example : # ldm add-io pci@500 ldom1 # ldm remove-io <bus/device> <ldom> Example : # ldm remove-io pci@500 ldom1 To Remove the I/O devices # ldm add-memory [--auto-adj] <number>[GMK] <ldom> To add the memory to the guest domain Example : # ldm add-memory 2G ldom1 Memory or mem # ldm set-memory [--auto-adj] <number>[GMK] <ldom> To reconfigure the memory to the guest or primary domain Example : # ldm set-memory 5G primary Example : # ldm set-memory 2G ldom1 # ldm remove-memory [--auto-adj] <number>[GMK] <ldom> Example : # ldm remove-memory 1G primary Example : # ldm remove-memory 1024M ldom1 # ldm list-spconfig [-r [<autosave>]] To decrease the amount of memory in a domain To decrease 1G memory from primary To decrease 1G memory from guest (used "M" which represent MB) To List and verify the configuration is ready to be used at the next reboot Example : # ldm list-spconfig Spconfig # ldm add-spconfig [-r <autosave>] <config_name> To save current configuration to the service Processor, the saved configuration will be used during the next reboot Example : # ldm add-spconfig config_intial # ldm remove-spconfig [-r] <config_name> To remove the configuration Example : # ldm remove-spconfig config_intial # ldm list-variable [<var_name>...] <ldom> To list the Variable settings of guest domain Example : # ldm list-variable auto-boot\? Ldom1 Example : # ldm list-variable boot-device Ldom1 Variable or var # ldm add-variable <var_name>=<value>... <ldom To add the new variable setting to the guest domain Example : # ldm add-variable boot-device Ldom1 # ldm set-variable <var_name>=<value>... <ldom> To set the "auto-boot" variable as false, this will leave the server at in OK prompt Example : # ldm set-variable auto-boot\?=false Ldom1 # ldm add-vconscon port-range=<x>-<y> <vcc_name> <ldom> vconscon or vcc Example : # ldm add-vconscon port-range=5000-5100 primary-vcc0 primary (Virtual console # ldm set-vconscon port-range=<x>-<y> <vcc_name> Example : # ldm set-vconscon port-range=5000-5100 primary-vcc0 concentrator # ldm remove-vconscon [-f] <vcc_name> service) Example : # ldm remove-vconscon primary-vcc0 # ldm add-vcpu [-c|--core] <number> <ldom> To add the Virtual console concentrator service to the control domain To set or modify the Virtual console concentrator service to the control domain To remove the Virtual console service from domain To add CPU to the guest domain Example : # ldm add-vpcu 8 ldom1 vcpu # ldm set-vcpu [-c|--core] <number> <ldom> To reconfigure the virtual CPU for any domain Example : # ldm set-vpcu 10 primary # ldm remove-vcpu [-f|--force] [-c|--core] <number> <ldom> Example : # ldm remove-vpcu 2 ldom1 To decrease the number of virtual CPU for any domain # ldm add-vdisk [timeout=<seconds>] [id=<diskid>] <disk_name> <volume_name>@<service_name> <ldom> vdisk To assign the Virual disk to the guest domain Example : # ldm add-vdisk vdisk0 vol0@primary-vds0 ldom1 Example : # ldm add-vdisk iso01 iso01@primary-vds0 ldom1 # ldm remove-vdisk [-f] <disk_name> <ldom> To remove the Virual disk on the guest domain Example : # ldm remove-vdisk vdisk0 ldom1 # ldm add-vdiskserver <service_name> <ldom> To add the Virtual disk Server services Example : # ldm add-vdiskserver primary-vds0 primary Example : # ldm add-vds primary-vds0 primary vdiskserver or vds # ldm remove-vdiskserver [-f] <service_name> To remove the Virtual disk Server services Example : # ldm remove-vds primary-vds0 # ldm add-vdiskserverdevice [-f] [options={ro,slice,excl}] [mpgroup=<mpgroup>] <backend> <volume_name>@<service_name> vdiskserverdevi ce or vdsdev To add or associating the resources to the Control domain's virtual disk services Example : # ldm add-vdsdev /dev/dsk/c0t1d0s2 vol01@primary-vds0 To add or associating the virtual disk resources to the Control domain's virtual disk services Example : # ldm add-vdsdev options=ro /export/home/solaris.iso iso01@primary-vds0 To add or associating the iso resources to the Control domain's virtual disk services # ldm remove-vdiskserverdevice [-f] <volume_name>@<service_name> To remove Virtual disk server devices Example : # ldm remove-vdsdev vol01@primary-vds0 Example : # ldm remove-vdsdev iso01@primary-vds0 # ldm add-vnet [mac-addr=<num>] [mode=hybrid] [pvid=<pvid>] [vid=<vid1,vid2,...>] [mtu=<mtu>] [linkprop=phys-state][id=<networkid>] <if_name> <vswitch_name> <ldom> vnet To add virtual network device which is associated with the virtual switch to the guest domain Example : # ldm add-vnet vnet0 primary-vsw0 ldom1 # ldm remove-vnet [-f] <if_name> <ldom> To remove the Virtual network device Example : # ldm remove-vnet vnet0 ldom1 vswitch or vws # ldm add-vswitch [default-vlan-id=<vid>] [pvid=<pvid>] [vid=<vid1,vid2,...>][mac-addr=<num>] To add the virtual switch services [net-dev=<device>] [linkprop=phys-state][mode=<mode>] [mtu=<mtu>] [id=<switchid>] <vswitch_name> <ldom> Example # ldm add-vswitch net-dev=e1000g0 primary-vsw0 primary # ldm remove-vswitch [-f] <vswitch_name> Example : # ldm remove-vswitch primary-vsw0 Command aliases: Alias Command cancel-op create modify destroy remove-reconf start stop bind unbind panic migrate cancel-operation add-domain set-domain remove-domain cancel-reconf start-domain stop-domain bind-domain unbind-domain panic-domain migrate-domain To remove the virtual switch services
© Copyright 2024