Detach Virtual Disks

When you detach a virtual disk from a VM, the virtual disk and all the data on it are preserved but the virtual disk is no longer available to the VM; the detached storage device can then subsequently be re-attached 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 all of the following conditions are met:

  • The VM may not be suspended.
  • The VM must have XenServer Tools installed.
  • The virtual disk may not be a system disk.
  • The virtual disk must be deactivated in order to be able to detach it cleanly. Note that the term “deactivate” is equivalent to “unplug”, which is the term used for this operation in the XenServer Administrator’s Guide and in the CLI.

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


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

In this article