Document navigation

VM Operation and Routine Management

You can control VM operating states by powering VMs on, shutting them down, rebooting them, or pausing them as needed; use groups to organize and manage VMs; and specify in advance how VM failures are handled.

VM Power Management

A VM can be in the following power statuses: Running, Powering off, Shut Down, Pausing, Paused, Powering on, Rebooting, Resuming, Unknown, and Crashed.
  • Running, Shut Down, Paused, Unknown, and Crashed are final power statuses.
  • Pausing, Powering off, Powering on, Rebooting, and Resuming are transitional power statuses.
Final power statuses:
  • Running, Shut Down, and Paused: These statuses change based on power management operations, including Power On, Shut Down, Reboot, Resume, Pause, and Power Off.
    • If the original status is Running, Shut Down, Reboot, Pause, and Power Off are supported. If the operation succeeds, the final status changes to Shut Down, Running, Paused, and Shut Down, respectively.
    • If the original status is Shut Down, only Power On is supported. If the operation succeeds, the final status changes to Running.
    • If the original status is Paused, Shut Down, Resume, and Power Off are supported. If the operation succeeds, the final status changes to Shut Down, Running, and Shut Down, respectively.
  • Unknown: When the management node cannot obtain the VM status from the host, for example when the host management network is disconnected, the VM status becomes Unknown regardless of its previous status. In the Unknown status, only Force Shut Down is supported.
  • Crashed: When a running Windows VM has a blue screen or a Linux VM hangs, the VM status changes to Crashed. Based on the failure policy, the VM status changes as follows:
    • If the failure policy is No Action, the VM remains Crashed.
    • If the failure policy is Shut Down, the final VM status changes to Shut Down if shutdown succeeds. If shutdown fails, the VM remains Crashed.
    • If the failure policy is Reboot, the final VM status changes to Running if reboot succeeds. If reboot fails, the VM remains Crashed.

Transitional power statuses: Pausing, Powering off, Rebooting, and Resuming are intermediate statuses when Pause, Shut Down/Power Off/Force Shut Down, Reboot, and Resume operations change a VM from its original status to a final status. Power operations are not supported while a VM is in a transitional status.

VM Operations and Power Statuses

VM operations depend on the current power status. The following table lists the power status required before each VM operation:
Operation VM Status
Create a VM /
Edit a VM Running/Shut Down/Paused
Change Group Running/Shut Down/Paused
Power On a VM Shut Down
Shut Down a VM Running
Reboot a VM Running
Resume a VM Paused
Pause a VM Running
Force Shut Down a VM Unknown
Power Off Running
Launch Console Running
Clone a VM Running/Shut Down/Paused
Modify Hostname Running/Shut Down/Paused
Bind Tag Running/Shut Down/Paused
Unbind Tag Running/Shut Down/Paused
Change Host Running/Shut Down
Change Data Storage Running/Shut Down. Supported states depend on the migration scope and data storage type. For more information, see Change Data Storage.
Change Host and Data Storage Running/Shut Down
Modify CPU Hot Plug and Memory Hot Plug Running/Shut Down
Configure GPU Device Shut Down
Expand System Disk Running/Shut Down
Change Owner Running/Shut Down
Change System Shut Down
Reset System Shut Down
Configure Boot Order Running/Shut Down
Configure HA Running/Shut Down
Configure BIOS Clock Synchronization Running/Shut Down/Paused
Configure Time Synchronization Running/Shut Down/Paused
Configure Failure Policy Running
Set SSH Key Running/Shut Down
Change VM Password Running
Set Console Password Running/Shut Down
Switch Console Mode Running/Shut Down/Paused
Configure CPU and Memory Resource Priority Running/Shut Down/Paused
Cross-Cluster HA Policy Running/Shut Down/Paused
USB Redirection Running/Shut Down/Paused
Create Snapshot Running/Shut Down/Paused
Attach Disk Running/Shut Down
Detach Disk Running/Shut Down
Create Image Running/Shut Down
Attach ISO Running/Shut Down
Detach ISO Running/Shut Down
Join VM Scheduling Group Running/Shut Down
Remove from VM Scheduling Group Running/Shut Down
Export VM Shut Down
Delete VM (Move to Recycle Bin) Shut Down
Permanently Delete/Restore VM Deleted
Copy URL Running/Shut Down/Paused
Download Exported VM Running/Shut Down/Paused
Delete Export Record Running/Shut Down/Paused

VM Group Management

A VM group is a logical collection used to organize VMs based on business requirements. ZSphere provides a default group. When you create a VM without creating or selecting a group, the VM is added to the default group. This section describes how to create and use VM groups.

Create VM Groups and Subgroups

  1. In the navigation pane, choose Inventory > VM and Host.
  2. Select the target data center.
  3. Right-click the target data center and click New VM Group.
  4. In the New VM Group dialog, configure the following options:
    Option Description
    Name Enter a name for the VM group.
    Group Type Select a group type. Options include New Group and Subgroup.
    Upper-Level Group Specify an upper-level group when you select Subgroup.
  5. Click OK.

Manage Existing VM Groups

You can manage existing VM groups from the following entries:

  • In the navigation pane, choose Inventory > VM and Host, switch to Group View, and select the target VM group.
  • On the target VM page, click Actions > System Configuration > Change Group.
  • Go to the Virtual Machine tab of a data center resource and perform batch operations.
Operation Description
Add VMs to a Group You can add VMs to a group in the following ways:
  • In the navigation pane, right-click the target VM group and click New Virtual Machine. The newly created VM belongs to this group by default.
  • In the navigation pane, select the target VM group. Then, on the right side of the page, click New Virtual Machine. The newly created VM belongs to this group by default.
  • On the target VM page, click Actions > System Configuration > Change Group to change the current VM to the target group.
Modify a VM Group Name On the target VM group page, click Actions > Edit Name, and modify the group name.
Delete a VM Group On the target VM group page, click Actions > Delete to delete the group. You can also delete groups in batches on the Virtual Machine tab of a data center resource. After a group is deleted, VMs in the group are moved to the default group.

Configure a VM Failure Response Policy

A VM failure refers to a Windows VM blue screen or a Linux VM becoming unresponsive during operation due to excessive load or other issues. You can configure an automatic response policy for VM failures.

Before you begin

  • Failure response policies are supported only for VMs that use the x86_64 CPU architecture.
  • Before you configure a failure response policy, install VMTools on the VM and make sure that VMTools is running properly. For more information about VMTools, see Install and Use VMTools.
  • The failure response policy takes effect immediately after configuration and does not require a VM restart.

Procedure

  1. In the navigation pane, choose Inventory > VM and Host.
  2. Select the target VM and click Actions > Advanced Settings > Modify VMTools.
  3. In the Modify VMTools Settings dialog, modify the VM failure response policy as needed.
    • No Action (default): Keep the current state after the failure and take no action.
    • Reboot: Automatically reboot the VM after the failure. By default, after five reboot attempts within 30 minutes, the system stops rebooting the VM and keeps it in the failed state.
    • Shut Down: Automatically shut down the VM after the failure.
    Note:
    For Linux VMs, after this feature is enabled, the kdump module is disabled at the next startup.
  4. Click OK.