Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

SWITCH-VM-CPU (Remove CPUs from a CPU pool and add them to another CPU pool)

&pagelevel(4)&pagelevel

/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 = *SELECT(...) / *ALL / list-poss(63): <x-text 1..2>


*SELECT(...)



|

NUMBER-OF-CPUS = 1 / <integer 1..63> / *ALL



|

,ATTRIBUTE = *NORMAL / *EXTRA



|

,STATE = *ATTACHED / *DETACHED / *OFFLINE

,FROM-CPU-POOL = *STDPOOL / <name 1..8>

,TO-CPU-POOL = *STDPOOL / <name 1..8>

,ATTACHED-VM-CPUS = *ACTIONS(...)


*ACTIONS(...)



|

SOURCE-CPU-POOL = *CHECK-NUMBER / *ADJUST-NUMBER



|

,TARGET-CPU-POOL = *NONE / *ADJUST-NUMBER


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.

For all VMs whose number of attached virtual CPUs is less than their multiprocessor level, VM2000 cancels state BLOCK for the relevant number of virtual CPUs of the VM. The virtual CPU can then be attached again in the guest system.

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)   SC1

Main code

Meaning

0
2             0
2             0
64

64
64
64
64
64
64
64

CMD0001
VMS3004
VMS4603
VMS3003

VMS4043
VMS4600
VMS4606
VMS4607
VMS4611
VMS4612
VMS4628

Command successfully executed
Multiple occurrence of elements in CPU list
No CPU belongs to the CPU pool
Invalid combination of operand values
(FROM-CPU-POOL = TO-CPU-POOL)
CPU not known in system
CPU pool not yet created
CPU switch rejected; command aborted
CPU does not belong to source CPU pool
Selected CPUs do not belong to source CPU pool
Too few attached CPUs remaining in source CPU pool
Spare CPU is not assigned to any CPU pool 


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 02 and 03 are switched from the standard CPU pool to the CPU pool PCUST1.

(2)

The SOURCE-CPU-POOL=*ADJUST-NUMBER operand causes VM2000 to check, whether the number of virtual CPUs of every VM in the source CPU pool remains less than or equal to the remaining number of real CPUs. In this example, VM2000 initiates a detach operation for virtual CPU 02 in the customer system as only two real CPUs are left in the standard CPU pool but three virtual CPUs are running in VM C1SYS1.

-----------------------------------------------------------------------------------------------------------------

See also the detailed "Example of managing CPU pools".