Page 1 of 1

Removing a VM does not delete it's folder.

Posted: 9. May 2013, 11:41
by loukingjr
Never noticed this before but whenever one deletes a VM along with its files, VirtualBox does not delete the machine's folder. I wouldn't have noticed except I tried to create a machine with the same name as a previous deleted one.

Re: Removing a VM does not delete it's folder.

Posted: 9. May 2013, 12:29
by noteirak
It actually give you the choice on what to do : keep or delete the VM files.

Re: Removing a VM does not delete it's folder.

Posted: 9. May 2013, 12:39
by loukingjr
noteirak wrote:It actually give you the choice on what to do : keep or delete the VM files.
not what I meant. if you delete the VM files it empties the folder but leaves the folder itself. which means if you don't go in and delete the now empty folder you can't create a new machine with the same name.

Re: Removing a VM does not delete it's folder.

Posted: 9. May 2013, 13:09
by noteirak
There was such an issue with older versions of Virtualbox in the 4.1.x & 4.2.x branch if I remember correctly.
Do you have the latest version of Virtualbox? If not you should update it.

Re: Removing a VM does not delete it's folder.

Posted: 9. May 2013, 13:13
by loukingjr
noteirak wrote:There was such an issue with older versions of Virtualbox in the 4.1.x & 4.2.x branch if I remember correctly.
Do you have the latest version of Virtualbox? If not you should update it.
I'm using 4.2.12 but the VMs were most likely created in an earlier version although I'm not sure how early. maybe as far back as 4.1* not sure. I also don't create the VM's in the default location. I have it set to a folder in my Mac applications folder.

Re: Removing a VM does not delete it's folder.

Posted: 9. May 2013, 13:15
by noteirak
What happens if you set the default folder somewhere else (where you know you or any account has full access) and try to create than delete a VM, does it still happen?

Re: Removing a VM does not delete it's folder.

Posted: 9. May 2013, 13:17
by loukingjr
noteirak wrote:What happens if you set the default folder somewhere else (where you know you or any account has full access) and try to create than delete a VM, does it still happen?
give me a sec :)

Re: Removing a VM does not delete it's folder.

Posted: 9. May 2013, 13:21
by loukingjr
I created a VM in the same folder I had already set up and deleted all files. this time the folder was erased as well. Not sure why creating a VM in an older version caused the folder to not be deleted but there you have it. I suspect if I delete any older VMs I will run into the same issue but it's easy enough to delete a folder.

Re: Removing a VM does not delete it's folder.

Posted: 9. May 2013, 13:48
by noteirak
Most likely a permission issue and/or related to the bug I was talking about.

Re: Removing a VM does not delete it's folder.

Posted: 9. May 2013, 13:52
by loukingjr
noteirak wrote:Most likely a permission issue and/or related to the bug I was talking about.
well must be the bug because the permissions are all "read/write". I suppose it's still a bug because 4.1.12 won't delete the folders created in earlier versions.

Re: Removing a VM does not delete it's folder.

Posted: 9. May 2013, 15:33
by mpack
Hmm. Nice example of debugging in this thread. Impressive.

Re: Removing a VM does not delete it's folder.

Posted: 24. Sep 2021, 01:00
by kitzun387
loukingjr wrote:Never noticed this before but whenever one deletes a VM along with its files, VirtualBox does not delete the machine's folder. I wouldn't have noticed except I tried to create a machine with the same name as a previous deleted one.
If working on a Mac, the best way to solve this is:
- go to the apple icon
- select the "about this mac option"
- select "storage" then "manage"
- find the file called "VirtualBox VMs" and delete the files from there.

It's a lot more straightforward on PC and I just thought I would shed some insights from a Mac perspective since this personally drove me mad for a bit lol

Re: Removing a VM does not delete it's folder.

Posted: 24. Sep 2021, 01:11
by scottgus1
Thanks for the thoughts, kitzun387! Virtualbox does keep track of the VMs it has loaded, so the VM should be deleted from Virtualbox first before checking that the VM folder still existed.