Avatar of mario00
mario00 asked on

Delete ESXi flat file

I removed a virtual disk and deleted its files from the disk but the flat file still remains in the data store!  What can i do to delete this file and recover the space on the data store?  ESXi 5.5

Avatar of undefined
Last Comment
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

8/22/2022 - Mon

If the VM linked to this disk is deleted I don't see any problems to delete the flat VMDK. If you can't delete it, the file is still being used by the system.

i didnt delete the vm, I deleted one of the virtual disks.  The descriptor file is gone but the flat file remains!

The vmx file still has a scsi 3 entry associated with the drive.  Can I manually delete the entry or is there a better way to remove it?  This disk should not exist as it was deleted!

scsi0:3.deviceType = "scsi-hardDisk"
scsi0:3.fileName = "/vmfs/volumes/5371416e-1df8b7c6-ba57-d4ae527ec256/SAS_1/SAS.vmdk"
scsi0:3.ctkEnabled = "TRUE"
sched.scsi0:3.vFlash.enabled = "FALSE"
scsi0:3.present = "FALSE"
scsi0:3.redo = ""
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck

I don't advise you to edit a file manually.
Was the virtual disk removed when the VM was turned off ?

If you really want to modify the file it should work, but maybe think about downloading a copy of the configuration file.

Vm was turned on when file was deleted.  After disk was removed the VM was renamed and migrated to new data store so it would rename the vmdk files.  Noticed afterwards the data store did not recover the space as expected.
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question