Virtual Machine won't delete

Joined
Apr 21, 2022
Messages
33
Reaction score
3
Credits
269
Hello I am new to the site but the information you have on here is great. I have a question regarding virtual machine drives.

I was cleaning up my files and deleted the .vdi for a machine I no longer wanted. The goal was to wipe it and then start over with the same machine type/OS. When I go to create a new VM with a different downloaded copy of the same OS, when I try to add this new .vdi, it says the same .vdi already exists. If I rename the new .vdi file then it gives an error on install.

So I am stuck in a paradox of I deleted a file but can't proceed because Oracle VM says it already exists.
 


Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
4,787
Reaction score
4,102
Credits
27,584
G'day, Welcome to Linux.org

What did you create the VM with?
 
Joined
Nov 16, 2021
Messages
81
Reaction score
21
Credits
598
Hello I am new to the site but the information you have on here is great. I have a question regarding virtual machine drives.

I was cleaning up my files and deleted the .vdi for a machine I no longer wanted. The goal was to wipe it and then start over with the same machine type/OS. When I go to create a new VM with a different downloaded copy of the same OS, when I try to add this new .vdi, it says the same .vdi already exists. If I rename the new .vdi file then it gives an error on install.

So I am stuck in a paradox of I deleted a file but can't proceed because Oracle VM says it already exists.
how did you delete it? did you cd into the folder and run rm -rf (or something like that) on it or did you just delete it via your files app. as i have had a similar issue and the solution was just to cd into the folder its kept in and rm -rf it (or a similar command) to the iffy .vdi
 
OP
NucleusChemistry
Joined
Apr 21, 2022
Messages
33
Reaction score
3
Credits
269
how did you delete it? did you cd into the folder and run rm -rf (or something like that) on it or did you just delete it via your files app. as i have had a similar issue and the solution was just to cd into the folder its kept in and rm -rf it (or a similar command) to the iffy .vdi
ok that worked, you are a genius.

if I want 2 different versions of this .vdi VM, if I just copy it, it won't let me have another one with the same exact name. But if I change the name slightly, then it doesn't install the OS or gives an error.

(and of course if I clone it, it shares the same .vdi file, and thus harddrive)
 

Tolkem

Well-Known Member
Joined
Jan 6, 2019
Messages
1,466
Reaction score
1,185
Credits
10,635
ok that worked, you are a genius.

if I want 2 different versions of this .vdi VM, if I just copy it, it won't let me have another one with the same exact name. But if I change the name slightly, then it doesn't install the OS or gives an error.

(and of course if I clone it, it shares the same .vdi file, and thus harddrive)
VBox as well as other virtualization solutions, has a very useful feature; snapshots. These allow you to have a "spare" image of the VM you can use to try and experiment new things without affecting the original file, and should anything go wrong, you can just delete the snapshot, create a new (snapshot) one, and start over. Here's a link to a nice tutorial/post to get you started on using this feature:
In addition to snapshots, there's also the possibility to clone VMs:
https://learn.openwaterfoundation.org/owf-learn-virtualbox/vm-tools/clone-vm/clone-vm/

Hope this helps! :)
 
OP
NucleusChemistry
Joined
Apr 21, 2022
Messages
33
Reaction score
3
Credits
269
VBox as well as other virtualization solutions, has a very useful feature; snapshots. These allow you to have a "spare" image of the VM you can use to try and experiment new things without affecting the original file, and should anything go wrong, you can just delete the snapshot, create a new (snapshot) one, and start over. Here's a link to a nice tutorial/post to get you started on using this feature:
In addition to snapshots, there's also the possibility to clone VMs:
https://learn.openwaterfoundation.org/owf-learn-virtualbox/vm-tools/clone-vm/clone-vm/

Hope this helps! :)
Hey I appreciate your reply. However snapshots and clones aren't working in this particular case because the files are being saved in the .VDI hard drive file.

I did try them both before trying to literally make copies of the .VDI
 
Joined
Nov 16, 2021
Messages
81
Reaction score
21
Credits
598
ok that worked, you are a genius.

if I want 2 different versions of this .vdi VM, if I just copy it, it won't let me have another one with the same exact name. But if I change the name slightly, then it doesn't install the OS or gives an error.

(and of course if I clone it, it shares the same .vdi file, and thus harddrive)
glad to help : D
 
OP
NucleusChemistry
Joined
Apr 21, 2022
Messages
33
Reaction score
3
Credits
269
VBox as well as other virtualization solutions, has a very useful feature; snapshots. These allow you to have a "spare" image of the VM you can use to try and experiment new things without affecting the original file, and should anything go wrong, you can just delete the snapshot, create a new (snapshot) one, and start over. Here's a link to a nice tutorial/post to get you started on using this feature:
In addition to snapshots, there's also the possibility to clone VMs:
https://learn.openwaterfoundation.org/owf-learn-virtualbox/vm-tools/clone-vm/clone-vm/

Hope this helps! :)
(see post right above about it not working in this particular use case)

I wish there was a way that I could make a second .vdi copy, and install that on the VM OS. But it bugs out with errors if I change the name
 

Tolkem

Well-Known Member
Joined
Jan 6, 2019
Messages
1,466
Reaction score
1,185
Credits
10,635
Hey I appreciate your reply. However snapshots and clones aren't working in this particular case because the files are being saved in the .VDI hard drive file.
Eh, yeah ... That's how VMs work. What is it exactly you want to do?
 
OP
NucleusChemistry
Joined
Apr 21, 2022
Messages
33
Reaction score
3
Credits
269
Multiple copies of the same VM OS without the online software of one, realizing or knowing the others exist
 

Tolkem

Well-Known Member
Joined
Jan 6, 2019
Messages
1,466
Reaction score
1,185
Credits
10,635
Multiple copies of the same VM OS without the online software of one, realizing or knowing the others exist
Online software? Such as? If you're talking about a specific pkg you manually install, then why not create a VM, make several clones of it before installing the "online software"? Then just install the "online software" in one of them. On the other hand, if by "online software" you're referring to the network tools already present in the OS. I'm talking about stuff like ifupdown, network-manager, wpasupplicant, iptables, they're part of the OS, so ...
 
Last edited:
OP
NucleusChemistry
Joined
Apr 21, 2022
Messages
33
Reaction score
3
Credits
269
Online software? Such as? If you're talking about a specific pkg you manually install, then why not create a VM, make several clones of it before installing the "online software"? Then just install the "online software" in one of them. On the other hand, if by "online software" you're referring to the network tools already present in the OS. I'm talking about stuff like ifupdown, network-manager, wpasupplicant, iptables, they're part of the OS, so ...
Lineage OS Phone Emulators. I am playing a video game app and it knows I'm the same user/character from the .vdi files, even if I snapshot or clone it before installing the apps
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Staff online

Members online


Top