VMware Cloud Community
Stendec75
Enthusiast
Enthusiast
Jump to solution

Added disk deleted after remove from disk

Hi,

I have noticed something weird when deleting a VM from disk (1) from the Inventory in my testlab. When I delete a VM from disk that has additional VM-disks added to it those extra disks (.vmhd) also got deleted. Is that normal ESXi behavior?

Thanks

0 Kudos
1 Solution

Accepted Solutions
douglasarcidino
Hot Shot
Hot Shot
Jump to solution

The only difference is when one virtual machine shares a disk with another VM. If two VMs are sharing a base disk, vCenter won't delete the shared disk. That's the only difference.

If you found this reply helpful, please mark as answer VCP-DCV 4/5/6 VCP-DTM 5/6

View solution in original post

0 Kudos
3 Replies
douglasarcidino
Hot Shot
Hot Shot
Jump to solution

Just to be sure that I am reading your question correctly. You are going into the vSphere Client, right-clicking on the VM and then click "delete from disk." If that is what you are are doing, any virtual disk that VM has will be deleted from disk. If you are using a vCenter server and logged into that vCenter server with the vSphere Client or Web Client, and a VM also uses disks attached to a VM you are trying to delete, those disks will not be deleted. These are the expected behaviors.

If you are going to delete a VM and don't want to delete all of the VMs disks, you should edit the settings of the VM and remove the disks you want to keep from the VM while making sure to not check "remove from virtual machine and delete from disk." In the vSphere Web Client there is a checkbox that says "delete files from datastore.

Doug

If you found this reply helpful, please mark as answer VCP-DCV 4/5/6 VCP-DTM 5/6
0 Kudos
Stendec75
Enthusiast
Enthusiast
Jump to solution

So if I understand correct, there is a difference in how the ESXi client handles remove from disk compared to vCenter?


Anyway, lesson learned so I’ll remove (detach) any added harddisk from the VM before removing it from disk.


Still I’m curious if vCenter handles things different..does it? 

0 Kudos
douglasarcidino
Hot Shot
Hot Shot
Jump to solution

The only difference is when one virtual machine shares a disk with another VM. If two VMs are sharing a base disk, vCenter won't delete the shared disk. That's the only difference.

If you found this reply helpful, please mark as answer VCP-DCV 4/5/6 VCP-DTM 5/6
0 Kudos