Skip to main content

3.2.13 Configuring Virtual CPUs


3.2.13 Configuring Virtual CPUs
Use the following commands to configure virtual CPUs.
Table 3-18  Commands for Configuring Virtual CPUs
Command Functional Outline
ldm add-vcpu Adds virtual CPUs in units of threads.
ldm set-vcpu Sets virtual CPUs in units of threads.
ldm remove-vcpu Removes virtual CPUs in units of threads.
ldm add-core Adds virtual CPUs in units of cores.
ldm set-core Sets virtual CPUs in units of cores.
ldm remove-core Removes virtual CPUs in units of cores.
ldm grow-socket Adds virtual CPUs associated with a specific CPU socket.
ldm shrink-socket Removes virtual CPUs associated with a specific CPU socket.
Note - CPUs cannot be assigned to a logical domain in units of cores and in units of threads simultaneously. Choose either of these units of assignment for each logical domain.
ldm add-vcpu command
Use the ldm add-vcpu command to add a virtual CPU to a logical domain.
# ldm add-vcpu number ldom
  1. number
    Specify the number of virtual CPUs (threads) to add.
  2. ldom
    Specify the logical domain. If it is the control domain, "primary" is the fixed setting.
The following example adds one virtual CPU to the control domain.
# ldm add-vcpu 1 primary
----------------------------------------------------------------

Notice: The primary domain is in the process of a delayed reconf
iguration.
Any changes made to the primary domain will only take effect aft
er it reboots.
----------------------------------------------------------------
ldm set-vcpu command
Use the ldm set-vcpu command to assign a virtual CPU to a logical domain.
# ldm set-vcpu number ldom
  1. number
    Specify the number of virtual CPUs (threads) to assign.
  2. ldom
    Specify the logical domain. If it is the control domain, "primary" is the fixed setting.
ldm remove-vcpu command
Use the ldm remove-vcpu command to remove a virtual CPU from a logical domain.
# ldm remove-vcpu number ldom
  1. number
    Specify the number of virtual CPUs (threads) to remove.
  2. ldom
    Specify the logical domain. If it is the control domain, "primary" is the fixed setting.
The following example deletes one virtual CPU from the control domain.
# ldm remove-vcpu 1 primary
----------------------------------------------------------------

Notice: The primary domain is in the process of a delayed reconf
iguration.
Any changes made to the primary domain will only take effect aft
er it reboots.
----------------------------------------------------------------
ldm add-core command
Use the ldm add-core command to add a specific core to a logical domain.
# ldm add-core num ldom
# ldm add-core cid=core-ID [,core-ID [,...]] ldom
  1. num
    Specify the number of CPU cores to add.
  2. ldom
    Specify the logical domain. If it is the control domain, "primary" is the fixed setting.
  3. cid=core-ID [,core-ID [,...]]
    Specify the ID of each CPU core to add.
Note - If you add a CPU core by specifying CID, the configuration cannot be changed through dynamic reconfiguration.
Note - For the relationship between the CPU core ID (cid) and the physical location of the CPU, see "CPU core ID specification" in "2.4.1 Consideration of Logical Domain Configuration."
Note - The add-core subcommand is not applicable to a domain that has a virtual CPU assigned with the whole-core constraint disabled. For information about the whole-core constraint, see "How to Apply the whole-core constraint" in the Oracle VM Server for SPARC Administration Guide.
The following example adds a 1-core CPU to the control domain.
# ldm add-core 1 primary
ldm set-core command
Use the ldm set-core command to set a specific core on a logical domain.
# ldm set-core num ldom
# ldm set-core cid=core-ID [,core-ID [,...]] ldom
  1. num
    Specify the number of CPU cores to set.
  2. ldom
    Specify the logical domain. If it is the control domain, "primary" is the fixed setting.
  3. cid=core-ID [,core-ID [,...]]
    Specify an ID for the set CPU core.
Note - If you set a CPU core by specifying CID, the configuration cannot be changed through dynamic reconfiguration.
Note - For the relationship between the CPU core ID (cid) and the physical location of the CPU, see "CPU core ID specification" in "2.4.1 Consideration of Logical Domain Configuration."
ldm remove-core command
Use the ldm remove-core command to remove a specific core from a logical domain.
# ldm remove-core num ldom
# ldm remove-core cid=core-ID [,core-ID [,...]] ldom
# ldm remove-core -g resource-group [-n num] ldom
  1. num
    Specify the number of CPU cores to set.
  2. ldom
    Specify the logical domain. If it is the control domain, "primary" is the fixed setting.
  3. cid=core-ID [,core-ID [,...]]
    Specify an ID for the set CPU core.
  4. -g resource-group

    This option removes CPU cores by specifying a resource group. The SPARC M12/M10 system supports this option for Oracle VM Server for SPARC 3.3 and later.
Note - The remove-core subcommand is not applicable to a domain that has a virtual CPU assigned with the whole-core constraint disabled. For information about the whole-core constraint, see "How to Apply the whole-core constraint" in the Oracle VM Server for SPARC Administration Guide.
In the following example, one CPU core is deleted from the control domain.
# ldm remove-core 1 primary
ldm grow-socket command
Use the ldm grow-socket command to add a virtual CPU associated with a CPU socket to a logical domain. This subcommand is supported by Oracle VM for SPARC 3.2 and later.
# ldm grow-socket vcpus=num socket_id=id ldom
# ldm grow-socket cores=num socket_id=id ldom
  1. num
    Specify the number of CPU threads or CPU cores to add.
  2. id
    Specify the CPU socket ID to add.
  3. ldom
    Specify the logical domain.
The following example adds a CPU core to the control domain from CPU socket#2.
# ldm grow-socket cores=1 socket_id=2 primary
ldm shrink-socket command
Use the ldm shrink-socket command to remove a virtual CPU associated with a CPU socket. This subcommand is supported by Oracle VM for SPARC 3.2 and later.
# ldm shrink-socket vcpus=num socket_id=id ldom
# ldm shrink-socket cores=num socket_id=id ldom
  1. num
    Specify the number of CPU threads or CPU cores to remove.
  2. id
    Specify the CPU socket ID to remove.
  3. ldom
    Specify the logical domain.
The following example removes a CPU core associated with CPU socket#2 from the control domain.
# ldm shrink-socket cores=1 socket_id=2 primary