rename VM, *.vbox, *.vbox-prev and *.vdi file?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
pstein
Posts: 59
Joined: 20. Nov 2008, 20:48
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu, CentOS

rename VM, *.vbox, *.vbox-prev and *.vdi file?

Post by pstein »

I downloaded and installed pre-installed VM image for VirtualBox with the name "LinuxMint_20.1_VB_LinuxVMImages.COM"

It works.

Now I consider to rename the current VM name "LinuxMint_20.1_VB_LinuxVMImages.COM"
to a shorter name like

"Mint"

Simply renaming the VM name in VirtualBox Manager and the corresponding files
LinuxMint_20.1_VB_LinuxVMImages.COM.vbox
LinuxMint_20.1_VB_LinuxVMImages.COM.vbox-prev
LinuxMint_20.1_VB_LinuxVMImages.COM-disk001.vdi

does not work.

Any other way?

For what purpose is the *.vbox-prev file?
Is it used as a backup file of *.vbox?
Can I delete it?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: rename VM, *.vbox, *.vbox-prev and *.vdi file?

Post by scottgus1 »

In the VM's General settings, Name textbox, you can change the name there. This will change the name of the VM in the list and the .vbox & .vbox-prev files.

Virtualbox does not have a way to change the disk file name. To change that you must Release & Remove the disk file from Virtualbox in the File menu's Virtual Media Manager (a rrreeeaaaallllllyyyy bad idea if the disk is encrypted, btw), change the name, then reattach the disk file to the VM in the place it was before. See fth0's answer below regarding changing the disk file name.

The .vbox-prev file is a constantly-rewritten backup of the .vbox file. It is actually the last used .vbox file renamed when a .vbox file needs to be edited by Virtualbox, which happens all the time. You could delete the -prev file, but it will come back. And there are rare occasions when the .vbox file gets corrupted, and without the -prev file the VM is toast.
fth0
Volunteer
Posts: 5661
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: rename VM, *.vbox, *.vbox-prev and *.vdi file?

Post by fth0 »

scottgus1 wrote:Virtualbox does not have a way to change the disk file name.
Well, it does: ;)

In the VirtualBox Manager, in the Virtual Media Manager, you can use "Move" to rename the virtual disk image, and it's automatically changed in the VM configuration accordingly.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: rename VM, *.vbox, *.vbox-prev and *.vdi file?

Post by scottgus1 »

fth0 wrote:in the Virtual Media Manager, you can use "Move" to rename the virtual disk image
Wow, I did not know that! Thanks!
pstein
Posts: 59
Joined: 20. Nov 2008, 20:48
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu, CentOS

Re: rename VM, *.vbox, *.vbox-prev and *.vdi file?

Post by pstein »

fth0 wrote: In the VirtualBox Manager, in the Virtual Media Manager, you can use "Move" to rename the virtual disk image, and it's automatically changed in the VM configuration accordingly.
Ok, that will rename the *.vdi file

Whats about the name of the *.vbox file name and the VM name on the left side of the VirtualBox Manager?

How can I rename these accordingly?

Peter
fth0
Volunteer
Posts: 5661
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: rename VM, *.vbox, *.vbox-prev and *.vdi file?

Post by fth0 »

pstein wrote:Whats about the name of the *.vbox file name and the VM name on the left side of the VirtualBox Manager?

How can I rename these accordingly?
scottgus1 wrote:In the VM's General settings, Name textbox, you can change the name there. This will change the name of the VM in the list and the .vbox & .vbox-prev files.
pstein
Posts: 59
Joined: 20. Nov 2008, 20:48
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu, CentOS

Re: rename VM, *.vbox, *.vbox-prev and *.vdi file?

Post by pstein »

It works
Thank you
Post Reply