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

Discussions related to using VirtualBox on Windows hosts.

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

Postby pstein » 16. Sep 2021, 16:48

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?
pstein
 
Posts: 56
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?

Postby scottgus1 » 16. Sep 2021, 17:12

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.
scottgus1
Site Moderator
 
Posts: 13228
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?

Postby fth0 » 16. Sep 2021, 18:24

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.
fth0
Volunteer
 
Posts: 2455
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...

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

Postby scottgus1 » 16. Sep 2021, 18:26

fth0 wrote:in the Virtual Media Manager, you can use "Move" to rename the virtual disk image

Wow, I did not know that! Thanks!
scottgus1
Site Moderator
 
Posts: 13228
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?

Postby pstein » 17. Sep 2021, 10:08

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
pstein
 
Posts: 56
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?

Postby fth0 » 17. Sep 2021, 10:23

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.
fth0
Volunteer
 
Posts: 2455
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...

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

Postby pstein » 17. Sep 2021, 15:03

It works
Thank you
pstein
 
Posts: 56
Joined: 20. Nov 2008, 20:48
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu, CentOS


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: No registered users and 24 guests