> For the complete documentation index, see [llms.txt](https://docs.platform9.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.platform9.com/private-cloud-director/virtualized-clusters/virtualmachine/virtual-machine-actions.md).

# Virtual Machine Actions

### Rebuild VM

The rebuild operation allows for the re-creation of virtual machine from a new or existing image while preserving the VM's:

* UUID
* Storage Volumes
* IP addresses (private or public)
* Network ports

If the VM utilizes ephemeral storage (local disks), rebuilding will result in the loss of data on those disks. However, if the VM uses block storage volumes or shared storage for its root disk and other data, those volumes are reattached to the rebuilt virtual machine, and data should be preserved.

### Rescue / Unrescue VM

Rescue mode is a powerful operation that allows you to access and repair a non-bootable virtual machine. When activated, this action boots your virtual machine into a temporary environment using the image that was used to create the vm, with full root access to the file system. This mode is useful for:

* Troubleshooting and fixing configuration file issues
* Recovering or copying data to a remote location
* Gaining emergency access similar to single-user mode or safe mode with networking

You can rescue a virtual machine using a new or different image from the one used to create it. When you select this option in the UI, the image list only shows active images that have both the `hw_rescue_device` and `hw_rescue_bus` properties set, since only those images are valid rescue images. The VM's current image is excluded from the list.

To enable an image to be used for rescuing VMs, add the following metadata keys to the image:

* **`hw_rescue_device`** – The type of device to attach the rescue image as (`cdrom`, `disk`, or `floppy`)
* **`hw_rescue_bus`** – The bus the rescue device should use (`scsi`, `virtio`, `ide`, or `usb`)

For a typical VM qcow2 image to be used as rescue image, the values you would use would be `hw_rescue_device: disk` and `hw_rescue_bus: scsi.`

Once your maintenance or recovery tasks are complete, you can return the VM to normal operation by unrescuing the VM. To do that using the UI, select the VM in the VM grid view, then choose the `unrescue` action from the power actions drop down menu.

### Stop

Performs a graceful shutdown of the virtual machine by sending an ACPI shutdown signal to the guest operating system. The VM will attempt to shut down cleanly, allowing running processes to terminate properly and data to be flushed to disk. If the guest OS does not respond to the ACPI signal, the VM may not shut down. In such cases, use Hard Reboot instead.

### Reboot

Performs a graceful restart of the virtual machine by sending an ACPI reboot signal to the guest operating system. This allows the OS to restart cleanly, preserving data integrity.

### Hard Reboot

Forces an immediate restart of the virtual machine without waiting for the guest OS to shut down cleanly. This is equivalent to pressing the physical reset button on a server and immediately powers the VM back on. This action may result in data loss or corruption as running applications do not have time to shut down properly. Use only when a normal reboot fails or the VM is unresponsive.

### Suspend

Saves the current running state of the virtual machine to disk, including memory contents and CPU state, then stops the VM. When resumed, the VM will continue exactly where it left off, with all applications and data in the same state.

### Pause

Freezes the virtual machine execution by halting the virtual CPU without writing the state to disk. The VM's memory remains allocated in RAM, but no CPU cycles are consumed. This is a temporary state intended for short pauses.

### Rename

Changes the display name of the virtual machine. This updates only the VM's label in the <code class="expression">space.vars.product\_name</code> interface and does not affect the guest OS hostname or network identity.

### Change Owner

Transfers ownership of the virtual machine to a different user account. The new owner will have full control over the VM and its associated resources. Please ensure that the new owner has available quota to take ownership of the VM before transferring ownership.

### Change Tenant

Moves the VM, along with its attached volumes and network ports, to a different tenant. Unlike Change Owner, which reassigns the VM to a different user within the same tenant, Change Tenant changes the tenant itself. See [Transfer a VM to Another Tenant](/private-cloud-director/virtualized-clusters/virtualmachine/vm-tenant-transfer.md) for the full prerequisites and procedure.

### Edit Metadata

Allows you to add, modify, or remove custom key-value metadata tags associated with the virtual machine.

### Resize

Allows you to choose a new flavor to resize the VM to. Resizing a VM results in the VM being rebuilt (powered off, then recreated using the source image on the same or different host) using the new flavor. The new flavor's disk size must be larger than or equal to the current flavor's disk size.

If the VM uses ephemeral storage for its root disk, the rebuild replaces the ephemeral disk with a new one — any data stored on the ephemeral root disk is lost. If the VM uses a block storage volume as its root disk, the volume is reattached to the resized VM and data is preserved.

Once the rebuild finishes, the VM enters the **Pending resize confirmation** state instead of finalizing on the new flavor right away. See [Confirm Resize](#confirm-resize) and [Revert Resize](#revert-resize) for how that state resolves. By default, an unconfirmed resize auto-confirms after 24 hours.

### Confirm Resize

Finalizes a resize, moving the VM out of the **Pending resize confirmation** state and onto the new flavor for good.

**Confirm Resize** is disabled, with a tooltip explaining why, unless the VM is actually pending resize confirmation:

> You can only confirm resize for VMs that are in a resized state

By default, an unconfirmed resize is automatically confirmed 24 hours after the VM entered the **Pending resize confirmation** state, so a resize is never left pending indefinitely.

### Revert Resize

Cancels a pending resize and restores the VM to the flavor and host it had before the resize. **Revert Resize** is only available while the VM is pending resize confirmation. Once a resize is confirmed, whether you confirm it yourself or it auto-confirms after 24 hours, the VM is already running on the new flavor, and reverting is no longer possible.

### Clone

Creates a complete copy of the virtual machine, including its disks and configuration. The new VM is independent of the original and can be modified without affecting the source VM.

### Migration Priority

Sets the priority level for VM migrations triggered by Dynamic Resource Rebalancing (DRR). Higher priority migrations are processed first during automated resource rebalancing or operations. You can specify migration priority as Low, Normal, High, or Excluded. If a migration priority is not set for a VM, it defaults to Normal priority. Selecting Excluded excludes the VM from any DRR migrations.

### Assign Failure Domain

Available for a VM with no failure-domain affinity, on a cluster configured with [Stretched Clusters](/private-cloud-director/virtualized-clusters/stretched-clusters.md). A VM can only be assigned to the failure domain of the host it is currently running on.

### Change Failure Domain

Available for a VM that already has a failure-domain affinity. Because a VM always belongs to its host's failure domain, changing it is a three-step move: remove the current failure domain, live-migrate the VM to a host in the target domain, then assign that domain. See [Stretched Clusters](/private-cloud-director/virtualized-clusters/stretched-clusters.md) for the full behavior.

### Mount ISO

Attaches an ISO from the image library to a VM in a powered-off state. This action presents the mounted ISO as a read-only optical drive to the guest OS.

### Unmount ISO

Detaches an ISO that was previously attached to the VM. This action requires the VM to be powered off before the ISO can be detached.

### Delete VM

Permanently removes the VM, its ephemeral disks, and any volumes or ports that are already marked for removal when the VM is deleted, such as a volume with delete-on-termination enabled or an automatically created port like a DHCP port. This action cannot be undone.

You can also delete the VM's other associated volumes and ports in the same operation, instead of leaving them behind. See [Delete a VM and Its Associated Volumes and Ports](/private-cloud-director/virtualized-clusters/virtualmachine/delete-vm-and-associated-resources.md).

You can delete a VM from the VM grid view: select the VM, then choose **Delete** from the Actions menu. You can also delete a VM from its details page by choosing **Delete** in the page header. To delete more than one VM at once, select multiple VMs in the VM grid view, then choose **Delete** from the Actions menu; this removes every selected VM in a single operation. Confirm the deletion in the dialog that follows.

**Delete** is disabled, with a tooltip explaining why, when a VM is Active, Paused, or Suspended and its host is responding:

> You cannot delete an active, paused, or suspended VM

A VM with no reported power state also cannot be deleted. VMs in any other state, for example Stopped, Shelved, Error, or Rescued, can be deleted normally. If the VM's host is offline or no longer registered, **Delete** stays available even for an Active, Paused, or Suspended VM, since a VM on an unreachable host cannot be stopped first.

For a batch delete, if any VM in the selection is Active, Paused, or Suspended with a responding host, **Delete** is disabled for the entire selection, not only for the blocked VMs.

#### Delete Attached Volumes and Ports

When you delete a VM, its attached volumes and network ports are pre-selected for deletion only if their **Delete on Termination** setting is enabled. Volumes and ports set to be kept are left unselected, so they are not deleted with the VM. You can adjust the selection before confirming.

If a VM is Active, Paused, or Suspended, move it to a deletable state first:

| VM State  | To Delete It                                        |
| --------- | --------------------------------------------------- |
| Active    | Choose **Stop**, then **Delete**.                   |
| Suspended | Choose **Resume**, then **Stop**, then **Delete**.  |
| Paused    | Choose **Unpause**, then **Stop**, then **Delete**. |

#### Delete Associated Volumes and Ports

By default, deleting a VM removes the VM and its ephemeral disks but leaves any additional block-storage volumes and network ports in place. Those volumes stay in the available state, and you have to track and clean them up separately. The Delete VM confirmation dialog can remove these associated resources in the same operation.

The dialog reports how many resources are attached to the selected VMs, listing **Associated volumes** and **Associated ports** counts. It also notes that deletion takes longer when a volume being removed has a dependent snapshot, because the snapshot is cleaned up first.

To remove every associated volume and port along with the VM, select the **Also delete associated resources** checkbox, then confirm.

To choose which resources to remove, select **Select Resources**. This opens a detailed view where all associated volumes and ports are selected by default; clear the checkbox next to any resource you want to keep. The resources appear in two groups:

* **Volumes selected for deletion:** each row shows the volume name, type, owning VM, device, size, and whether the volume is bootable.
* **Ports selected for deletion:** each row shows the port name, network name, IP address, and owning VM.

A volume that is already set to delete on VM termination is always removed with the VM and cannot be deselected. A DHCP port is deleted automatically and cannot be deselected. The root (boot) volume is never affected by this action, and any volume you detach before deleting the VM survives regardless of these settings.

After you confirm, the dialog reports the outcome for each VM and its selected resources. If any volume or port cannot be removed, select **Show Details** to see which ones failed.

## Related Pages

* [Delete a VM and Its Associated Volumes and Ports](/private-cloud-director/virtualized-clusters/virtualmachine/delete-vm-and-associated-resources.md): optionally delete a VM's volumes and ports along with the VM
* [Virtual Machine Leasing](/private-cloud-director/virtualized-clusters/virtualmachine/virtual-machine-leasing.md): a separate, automatic way a VM can be deleted when its lease expires
* [Maintenance Mode](/private-cloud-director/virtualized-clusters/add-hosts-virtualized-cluster/maintenance-mode.md): why a VM pending resize confirmation is skipped until the resize is confirmed
* [Virtual Machine High Availability (VM HA)](/private-cloud-director/virtualized-clusters/virtualized-cluster/virtual-machine-high-availability-vm-ha.md): why VM HA skips evacuating a VM with an unconfirmed resize


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.platform9.com/private-cloud-director/virtualized-clusters/virtualmachine/virtual-machine-actions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
