Removing a harddisk from a virtual machine through the vSphere client does not release the desired space.
search cancel

Removing a harddisk from a virtual machine through the vSphere client does not release the desired space.

book

Article ID: 343813

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Symptoms

  • If you take a snapshot of a virtual machine, and then remove a virtual disk from the virtual machine using the VI Client, the virtual disk flat file is not removed.
  • The datastore free space size does not report the expected recovered space following the harddisk removal.
  • Files relating to the deleted harddrive still exist in the datastore browser view.


Environment

VMware ESX Server 3.0.x
VMware ESXi 3.5.x Installable
VMware ESX Server 3.5.x
VMware ESXi 4.1.x Embedded
VMware ESXi 4.0.x Embedded
VMware ESXi 3.5.x Embedded
VMware ESXi 4.0.x Installable
VMware ESXi 4.1.x Installable
VMware VirtualCenter 2.0.x
VMware VirtualCenter 2.5.x
VMware vCenter Server 4.0.x
VMware vCenter Server 4.1.x
VMware ESX 4.0.x
VMware ESX 4.1.x

Resolution

Before deleting a harddisk, ensure that all snapshots are consolidated on the virtual machine.

When you remove a harddisk from a virtual machine by selecting the Remove from virtual machine and delete files from disk option, it is the in-use file that is deleted. This specific file is referenced under the Disk File parameter in the virtual machine properties wizard.

If the virtual machine is running from a snapshot during removal operation, the in-use file referenced under the Disk File parameter is a snapshot delta disk file. It is this file alone that is deleted, and not the base harddisk file or any existing snapshot files derived from that harddisk. Only the space used by that delta file is recovered.

The remaining virtual harddisk files and associated snapshot delta files must be removed manually through the datastore browser. For more information regarding the correct files requiring selective manual deletion, see The disk chain section of Understanding virtual machine snapshots in VMware ESX (1015180).

Additional Information

How to remove a Hard disk or RDM from a powered on virtual machine