/SWITCH-VM-DEVICES
removes devices from one VM and adds them to another VM. Individual devices are addressed using their mnemonic device names. The devices of a pubset are determined by means of the catalog ID of the pubset or the mnemonic device name of the pubres device.
If /ADD-VM-DEVICES
was used to define a device attribute (using the TYPE
operand), this will be retained when /SWITCH-VM-DEVICES
is used. For implicitly assigned devices the usage mode is preserved (EXCLUSIVE/SHARED
).
The home pubset and other imported pubsets, paging disks and the final console cannot be removed from the monitor VM.
The removed and assigned devices are deleted and noted in the VM definitions of the VMs.
/DETACH-DEVICE
.The devices must be attached in the guest system to which they are assigned so that they can be addressed in it.
Alias devices (PAV/DPAV) and CRD devices cannot be removed or assigned explicitly.
This command is reserved for the VM2000 administrator.
SWITCH-VM-DEVICES | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
UNITS =
Specifies the devices to be removed from the FROM-VM
and assigned to the TO-VM
.
UNITS = *ALL(...)
All devices assigned to the FROM-VM
are to be removed and reassigned. If a device cannot be removed, the command is not executed for this device. Alias devices and CRD devices are only removed (implicitly).
CHECK-VM-STATE =
Determines whether the command is executed depending on the current status of the FROM-VM
.
CHECK-VM-STATE = *YES
The command is only executed if the FROM-VM
is in the DOWN or INIT-ONLY state.
CHECK-VM-STATE = *NO
The command is executed regardless of the FROM-VM
state.
UNITS = *PUBSET-DEVICES(...)
All devices of the specified pubset are to be removed and reassigned.
PUBSET = *BY-PUBRES-DEVICE(...)
Determines the devices of the pubset by means of the pubres device.
UNIT = <alphanum-name 2..2> / <x-text 4..4>
Mnemonic device name of the pubres device.
PUBSET = <cat-id 1..4>
Catalog ID of the pubset. The pubset must be entered together with its pubres device in the monitor system’s MRS catalog.
UNITS = *DEVICE-RANGE(...)
All devices in this name range are to be removed and reassigned.
<x-text 4..4>
(in *DEVICE-RANGE
) are selected from FROM
to TO
in hexadecimal order. Otherwise, device names <alphanum-name 2..2>
are selected in alphabetical order.If UNITS
are specified with *DEVICE-RANGE
or with wildcards, the devices that are not assigned to the FROM-VM
are ignored.
On SU /390, alias devices (PAV/DPAV) and CRD devices are ignored additionally. |
FROM = <alphanum-name 2..2> / <x-text 4..4>
Defines the start of the name range.
TO = <alphanum-name 2..2> / <x-text 4..4>
Defines the end of the name range. The mnemonic device name must be in the same value range (2- or 4-digit mn) as the FROM
device name and must be greater than or equal to the FROM
device name in ascending order in the value range.
UNITS = <alphanum-name 1..4 with-wild(20)>
Specifies the devices that are to be removed and reassigned by the mnemonic device name.
FROM-VM = <integer 1..99> / <name 1..8>
Identifies by means of a VM index or VM name the VM from which the devices are to be removed.
TO-VM = <integer 1..99> / <name 1..8>
Identifies by means of a VM index or VM name the VM to which the devices are to be assigned.
FORCE =
Specifies the conditions under which devices are to be removed from the FROM-VM
.
FORCE = *NO
The device is removed from the FROM-VM
if the FROM-VM
is in the DOWN or INIT-ONLY state, or if the device is detached in the guest system. However, it is not removed if an input/output is outstanding for the device, if the FROM-VM
is in the wait state (after /HOLD-VM
) or if the guest system is in the startup phase.
The device configuration of a VM cannot be modified with FORCE=*NO
while it is being migrated (VM Migration).
FORCE = *YES
VM2000 tries to remove the device from the FROM-VM
, even if it is still in use. If this is not possible, message VMS4003
or VMS4031
is output. The operand should only be used in exceptional circumstances.
The IO-RESET
privilege of the FROM-VM
must be noted on SU /390 (see "Initializing a VM").
Command return codes
(SC2) | Main code | Meaning |
0 | CMD0001 | Command successfully executed |
Guaranteed messages
VMS4003, VMS4008, VMS4021, VMS4022, VMS4026, VMS4030, VMS4031, VMS4064,
VMS4069, VMS4081, VMS4085, VMS4086
Only if *PUBSET-DEVICES
is specified: VMS4223, VMS4228, VMS4229
.
Only if UNITS
is specified without *DEVICE-RANGE
and without with wildcards: VMS4006, VMS4007, VMS4190, VMS4195
.
Example
/switch-vm-devices from-vm=system2,to-vm=system3,
units=*pubset-devices(pubset=4ivi) ————————————————— (1)
VMS4008 DEVICE 'FC1E' SWITCHED FROM VIRTUAL MACHINE (2,SYSTEM2) TO VIRTUAL MACHINE (3,SYSTEM3)
VMS4008 DEVICE 'FC1F' SWITCHED FROM VIRTUAL MACHINE (2,SYSTEM2) TO VIRTUAL
MACHINE (3,SYSTEM3)
VMS4228 PUBSET '4IVI' WITH PUBRES DEVICE 'FC1E' SWITCHED FROM VM
(2,SYSTEM2) TO VM (3,SYSTEM3) ————————————————————————————————— (2)
-----------------------------------------------------------------------------------------------------------------
(1) | The VM2000 administrator removes the pubset devices of pubset |
(2) | VM2000 confirms the old and new assignments. |