/REMOVE-VM-DEVICES
is used to remove devices explicitly from a VM that were previously assigned explicitly or implicitly. 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.
The home pubset and other imported pubsets, paging disks and the final console cannot be removed from the monitor VM.
The deallocated devices are removed from the VM definition.
/DETACH-DEVICE
.
Alias devices (PAV/DPAV) and CRD devices cannot be explicitly removed.
REMOVE-VM-DEVICES | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
UNITS =
Defines the devices to be removed from the VM.
UNITS = *ALL(...)
All the devices assigned to this VM are removed. Alias devices (PAV) and CRD devices are also removed. If a device cannot be removed when *ALL
is specified, the command is not executed for this device.
CHECK-VM-STATE =
Determines whether the command is executed, depending on the current state of the VM.
CHECK-VM-STATE = *YES
The command is only executed if the VM is in the DOWN or INIT-ONLY state.
CHECK-VM-STATE = *NO
The command is executed regardless of the VM state.
UNITS = *PUBSET-DEVICES(...)
All devices of a pubset are to be removed from the VM.
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 the devices in this name range are to be removed from the VM.
<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 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)>
Defines the devices which are to be removed from the VM.
VM-IDENTIFICATION =
Identification of the virtual machine.
VM-IDENTIFICATION = *CURRENT
The VM identification assigned previously by means of /BEGIN-VM-DIALOG
is used.
VM-IDENTIFICATION = <integer 1..99> / <name 1..8>
Identifies the virtual machine by means of a VM index or VM name.
FORCE =
Specifies the conditions under which devices are removed.
FORCE = *NO(...)
The device is removed from the VM if the VM is in the DOWN or INIT-ONLY state or if the device is detached in the BS2000 guest system. The device is not removed, if there is an outstanding input/output for the device, or if the VM is in the wait state (after /HOLD-VM
) or if the guest system is in the startup phase.
No devices can be removed from a VM with FORCE=*NO
while it is being migrated (VM Migration).
WAIT-FOR-UNASSIGN = *NO
If the device is still attached in the guest system, it remains assigned explicitly to the VM.
WAIT-FOR-UNASSIGN = *YES
If the device is still attached in the guest system, it remains assigned implicitly to the VM until the BS2000 command /DETACH-DEVICE
releases this device implicitly in the guest system. The explicit assignment of the device to the VM is canceled.
FORCE = *YES
VM2000 tries to remove the device from the 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.
On SU /390 the IO-RESET
privilege of the VM must be noted (see "Initializing a VM").
Command return codes
(SC2) | Main code | Meaning |
0 | CMD0001 | Command successfully executed |
Guaranteed messages
VMS4003, VMS4009, VMS4021, VMS4022, VMS4031, VMS4085, VMS4086, VMS4087
Only if *PUBSET-DEVICES
is specified: VMS4223, VMS4225, VMS4226, VMS4235, VMS4236, VMS4237
Only if UNITS
is specified without *DEVICE-RANGE
and without wildcards: VMS4006, VMS4007
(but not in the case of UNITS
specification with *PUBSET-DEVICES
), VMS4190, VMS4195
Example
/remove-vm-devices vm-id=system2,units=*pubset-devices(pubset=4ivl) ——— (1)
VMS4085 DEVICE 'FC1C' STILL ATTACHED IN GUEST SYSTEM. DEVICE NOT REMOVED
VMS4085 DEVICE 'FC1D' STILL ATTACHED IN GUEST SYSTEM. DEVICE NOT REMOVEDVMS4223 VM2000 COMMAND /REMOVE-VM-DEVICES FOR PUBSET SPECIFIED BY PUBRES
DEVICE OR CATID '4IVL' REJECTED ——————————————————————————————— (2)
/remove-vm-devices units=*pubset-devices(pubset=4ivl),vm-id=system2,
force=*no(wait-for-unassign=*yes) —————————————————— (3) VMS4087 DEVICE 'FC1C' REMAINS ASSIGNED TO VM (2,SYSTEM2) UNTIL DETACH IN
GUEST SYSTEM HAS BEEN DONE
VMS4087 DEVICE 'FC1D' REMAINS ASSIGNED TO VM (2,SYSTEM2) UNTIL DETACH IN GUEST SYSTEM HAS BEEN DONE
VMS4235 SOME DEVICES OF PUBSET '4IVL' WITH PUBRES DEVICE 'FC1C' REMAIN
ASSIGNED TO VM (2,SYSTEM2) UNTIL DETACH IN GUEST SYSTEM HAS BEEN DONE
/remove-vm-devices units=(ch,ci,990f),vm-id=system2, —————————————————— (4)
VMS4009 DEVICE 'CH' REMOVED FROM VIRTUAL MACHINE (2,SYSTEM2)
VMS4009 DEVICE 'CI' REMOVED FROM VIRTUAL MACHINE (2,SYSTEM2)VMS4009 DEVICE '990F' REMOVED FROM VIRTUAL MACHINE (2,SYSTEM2)
-----------------------------------------------------------------------------------------------------------------
(1) | The VM2000 administrator wants to remove the pubset devices of pubset |
(2) | The devices cannot be removed because they are still attached in the guest system. |
(3) | By means of the |
(4) | Further devices are removed from VM2. |
-----------------------------------------------------------------------------------------------------------------
See also the detailed examples for device and pubset management ("Example of peripheral device management" and "Example of pubset management").