If you no longer need a virtual machine and want to free space on the datastore, you can remove the virtual machine from vCenter Server and delete all virtual machine's files from the datastore, including the configuration file and virtual disk files. If two virtual machines share the same virtual disk, the disk files are not deleted.

Power off the virtual machine.

1

To check if the virtual machine shares its virtual disk, search the configuration .vmx files for entries similar to the entries below.

 #scsi1 data storage 
scsi1.present = "TRUE"
scsi1.virtualDev = "lsilogic" 
scsi1.sharedbus = "none"
scsi1:0.present = "TRUE"
scsi1:0.fileName = "/vmfs/volumes/datastore1/SHARED-DISK.vmdk " 
scsi1:0.mode = "independent-persistent" 
scsi1:0.shared = "TRUE" 
scsi1:0.redo = ""

Shared virtual disks have the same virtual disk file name in the virtual machine configuration files.

2

Right-click the virtual machine and select All vCenter Actions > Delete from Disk.

3

Click OK.

vCenter Server deletes the virtual machine from the datastore. Virtual disks that are shared with other virtual machines are not deleted.