Detach Virtual Disks

When you detach a virtual disk from a VM, the virtual disk and the data on it are preserved. The virtual disk is no longer available to the VM. The detached storage device can later be reattached to the same VM, attached to a different VM, or moved to a different storage repository (SR).

You can detach a virtual disk without shutting down the VM (hot unplug) if the following conditions are met:

  • The VM is not suspended.
  • The VM must have XenServer VM Tools installed.
  • The virtual disk is not a system disk.
  • The virtual disk must be deactivated to be able to detach it cleanly. The term deactivate is equivalent to unplug, which is the term used for this operation in the product documentation and in the CLI.

If any of these conditions are not satisfied, shut the VM down before you can detach the virtual disk.

To detach the virtual disk:

  1. Select the VM in the Resources pane and click the Storage tab.
  2. Select the virtual disk in the list, click Deactivate, and click Detach.
  3. Click OK to confirm the operation.
Detach Virtual Disks

In this article