One or more VMs are terminated using /DELETE-VM
. The device assignment, the assignment to a CPU pool, the affiliation to a VM group and initialization of the VM are canceled. The VM definition of a non-persistent VM is deleted. The VM definition of a persistent VM is retained.
The monitor VM cannot be terminated by this command.
On SU x86, the main memory is released asynchronously and this can take several seconds. Not till then, the released memory is available for other or new VMs. |
When the /DELETE-VM
command is issued, all ADMIN dialogs with the VM and all VC dialogs with the guest system on the VM are terminated implicitly. The output of periodic monitored data (/SHOW-VM-STATUS PERIOD=<integer>
) for the VM is also terminated.
/DELETE-VM ...,CHECK-VM-STATE=*NO
terminates an active guest system immediately. As a result, files of the guest system which is running on the VM may be inconsistent. To prevent this from happening, a shutdown should be executed before the VM in the guest system is terminated.If /DELETE-VM
could not be executed, the VM remains in the state IN HOLD. It is not normally possible to resume guest system execution with /RESUME-VM
, as important resources may already have been removed from the VM.
DELETE-VM |
VM-IDENTIFICATION = *CURRENT / *ALL / <integer 1..99> / <name 1..8> ,CHECK-VM-STATE = *YES / *NO |
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 = *ALL
All VMs are to be terminated.
This operand is only permitted for the VM2000 administrator.
VM-IDENTIFICATION = <integer 1..99> / <name 1..8>
Identifies the virtual machine by means of a VM index or VM name.
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. A VM cannot be terminated with CHECK-VM-STATE=*YES
while it is being migrated (Live Migration).
CHECK-VM-STATE = *NO
The command is executed regardless of the VM state.
Command return codes
(SC2) | Main code | Meaning |
0 | CMD0001 | Command successfully executed |
Guaranteed messages
VMS3041, VMS4002, VMS4024, VMS4429, VMS4619
and the guaranteed messages for /REMOVE-VM-DEVICES
.
Example
/delete-vm vm-id=system2,check-vm-state=*no ———————————————————————————— (1)
VMS4009 DEVICE 'CG' REMOVED FROM VIRTUAL MACHINE (2,SYSTEM2)
VMS4009 DEVICE 'CH' REMOVED FROM VIRTUAL MACHINE (2,SYSTEM2)
VMS4009 DEVICE '505A' REMOVED FROM VIRTUAL MACHINE (2,SYSTEM2)
VMS4009 DEVICE '505F' REMOVED FROM VIRTUAL MACHINE (2,SYSTEM2)
VMS4009 DEVICE '5060' REMOVED FROM VIRTUAL MACHINE (2,SYSTEM2)
VMS4619 VIRTUAL MACHINE (2,SYSTEM2) REMOVED FROM CPU POOL '*STDPOOL'
VMS4024 VIRTUAL MACHINE (2,SYSTEM2) TERMINATED————————————————————————— (2)
-----------------------------------------------------------------------------------------------------------------
(1) | The VM with the name |
(2) | VM2000 confirms termination of VM2. |