Batch Operations on Virtual Machines
Perform batch operations such as starting, stopping, restarting, and deleting virtual machines.
Procedure
-
Access the Container Platform.
-
Click on Virtualization > Virtual Machines in the left navigation bar.
-
Locate the target virtual machine, click ⋮ to perform operations on a single virtual machine, or refer to the image below for batch operations on virtual machines.
Note:
-
The Start/Batch Start operation can be executed when the virtual machine is in a paused or stopped state; the Stop/Batch Stop operation can be executed when the virtual machine is in a Preparing, Starting, Running, Paused, Unknown, or Exception state; the Restart/Batch Restart operation can be executed when the virtual machine is in a Running state.
-
Performing a forced Restart/Stop operation on a virtual machine is equivalent to cutting off power to the virtual machine, which may result in loss of data that has not been written to disk.
-
-
Complete the operations according to the prompts on the interface. When the virtual machine changes to the states below, the operation is successful.
Using the API
ACP virtual machines hold their power state in the spec.running field. Start or stop by patching it; use virtctl for restart:
There is no batch object — apply the same command to each virtual machine in a loop. A forced stop or restart (virtctl stop --force) is equivalent to cutting power and may lose data that has not been written to disk.