/SWITCH-VM-CPU
is used to remove a CPU from a CPU pool and add it to a different CPU pool.
This command is reserved for the VM2000 administrator.
SWITCH-VM-CPU | ||||||||||||||||||||||||||||||||||||||||||||
|
CPU-IDENTIFICATION =
Determines the CPUs which are to be switched from the source CPU pool (FROM-CPU-POOL
operand) to the target CPU pool (TO-CPU-POOL
operand).
CPU-IDENTIFICATION = *SELECT(...)
Selects a set of CPUs from the source CPU pool (FROM-CPU-POOL
operand).
NUMBER-OF-CPUS = 1 / <integer 1..63> / *ALL
Number of CPUs.
ATTRIBUTE = *NORMAL / *EXTRA
CPU type.
STATE = *ATTACHED / *DETACHED / *OFFLINE
Reconfiguration status of the CPUs.
CPU-IDENTIFICATION = *ALL
All CPUs in the source CPU pool are selected.
CPU-IDENTIFICATION = list-poss(63): <x-text 1..2>
Selects the specified real CPUs.
FROM-CPU-POOL = *STDPOOL / <name 1..8>
Determines the source CPU pool from which the CPUs are to be deleted.
TO-CPU-POOL = *STDPOOL / <name 1..8>
Determines the target CPU pool to which the selected CPUs are to be added.
ATTACHED-VM-CPUS = *ACTIONS(...)
Determines the command execution and the implicit actions of VM2000.
SOURCE-CPU-POOL =
Determines the command execution and the implicit actions of VM2000 for the virtual CPUs of the VMs which are assigned to the source CPU pool.
The command is rejected if the last attached real CPU is to be deleted, but a VM is still assigned to the source CPU pool (on SU /390, in states RUNNING, IN HOLD or SETUP(MIGR)) (message/return code VMS4612
).
SOURCE-CPU-POOL = *CHECK-NUMBER
The command is executed if the number of attached virtual CPUs of each VM in the source CPU pool is less than or equal to the remaining number of attached real CPUs in the source CPU pool, see "Number of attached real and virtual CPUs in the CPU pool". Otherwise the command is rejected. Excess virtual CPUs which have already been detached cannot then be attached again to the guest system (state BLOCK).
SOURCE-CPU-POOL = *ADJUST-NUMBER
The command is executed.
VM2000 checks the state of the virtual CPUs of all VMs in the source CPU pool and, if required, initiates the following asynchronous actions:
If the number of attached virtual CPUs of a VM is greater than the number of attached real CPUs in the source CPU pool, VM2000 detaches the excess virtual CPUs of the VMs concerned (implicit
/DETACH-DEVICE
in the BS2000 guest system for a corresponding number of virtual CPUs). These detached CPUs cannot be attached again by the guest system; they are marked accordingly by VM2000 (state of the virtual CPU in the VM2000 information commands: BLOCK).If the number of attached virtual CPUs of a VM is less than the number of attached real CPUs of the source CPU pool (e.g. through CPU reconfiguration), VM2000 attaches the detached virtual CPUs of the VMs concerned (implicit
/ATTACH-DEVICE
in the BS2000 guest system for a corresponding number of virtual CPUs).
TARGET-CPU-POOL =
Determines the implicit actions of VM2000 for the virtual CPUs of the VMs which are assigned to the target CPU pool.
TARGET-CPU-POOL = *NONE
No further implicit actions are performed. The number of attached virtual CPUs in the VMs remains unchanged.
TARGET-CPU-POOL = *ADJUST-NUMBER
VM2000 checks the state of the virtual CPUs of all VMs in the target CPU pool and, if required, initiates the following asynchronous actions:
If the number of attached virtual CPUs of a VM is less than the (new) number of attached real CPUs of the target CPU pool, VM2000 attaches the detached virtual CPUs of the VMs concerned (implicit
/ATTACH-DEVICE
in the BS2000 guest system for a corresponding number of virtual CPUs).If the number of attached virtual CPUs of a VM is greater than the (new) number of attached real CPUs of the target CPU pool (e.g. through CPU reconfiguration), VM2000 detaches the excess virtual CPUs of the VMs concerned (implicit
/DETACH-DEVICE
in the BS2000 guest system for a corresponding number of virtual CPUs). These detached CPUs cannot be attached again by the guest system; they are marked accordingly by VM2000 (state of the virtual CPU in the VM2000 information commands: BLOCK).
Command return codes
(SC2) | Main code | Meaning |
0 | CMD0001 | Command successfully executed |
Guaranteed messages
VMS4608, VMS4620, VMS4621
Example
/switch-vm-cpu cpu-id=(02,03),from-cpu-pool=*stdpool,to-cpu-pool=pcust1,
attached-vm-cpus=*actions(source-cpu-pool=*adjust-number) ————————— (1)VMS4608 CPU '02' SWITCHED FROM CPU-POOL '*STDPOOL' TO CPU-POOL 'PCUST1'
VMS4608 CPU '03' SWITCHED FROM CPU-POOL '*STDPOOL' TO CPU-POOL 'PCUST1'VMS4621 IMPLICIT DETACH-DEVICE FOR VIRTUAL CPUS ON
VIRTUAL MACHINE (2,C1SYS1) STARTED ———————————————————————————— (2)
% VMS2037 NON-INTERRUPTIBLE WAIT STATE FOR VIRTUAL MACHINE (2,C1SYS1), CODE 80FFFFFF, CPU 02
% VMS2011 CPU 02 OF VIRTUAL MACHINE (2,C1SYS1) STOPPED
-----------------------------------------------------------------------------------------------------------------
(1) | The real CPUs |
(2) | The |
-----------------------------------------------------------------------------------------------------------------
See also the detailed "Example of managing CPU pools".