Renaming the VMDK file

Discussions related to using VirtualBox on Windows hosts.
Post Reply
DonVetOne
Posts: 101
Joined: 2. Feb 2018, 14:13

Renaming the VMDK file

Post by DonVetOne »

Hello All

I would like to rename the VMDK file from 'D:\VirtualBox VMs\Windows XP\exportxp-disk1.vmdk' to "....\Windows XP.vmdk'
How can I do this without breaking something and preventing loading?

Thanks,
Don
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Renaming the VMDK file

Post by scottgus1 »

First thing to determine is if you can.

Please right-click the guest in the main Virtualbox window's guest list, choose "Show in Explorer/Finder/File Manager". In the window that opens, zip the guest's .vbox file, and post the zip file, using the forum's Upload Attachment tab.
DonVetOne
Posts: 101
Joined: 2. Feb 2018, 14:13

Re: Renaming the VMDK file

Post by DonVetOne »

Here you go...

Don.
Attachments
Windows XP Development.zip
(2 KiB) Downloaded 7 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Renaming the VMDK file

Post by scottgus1 »

OK, it's not a linked clone, good.

Shut down the guest from within the guest OS.

In the main Virtualbox window, Open the guest Storage settings, and note the disk controller and port number the disk is on. I read it as "IDE Primary Master". Close Settings.

Go to the File menu, Virtual Media Manager. In the Hard Disks tab, select the disk, then click the "Release" toolbar button. A popup will appear asking to release the disk from all the guest's it is connected to. If any other guests are shown besides this one guest, stop and take note of the disk controller ports the other guests are using for this disk file. If only this guest is shown, click Release.

Then click Remove, in the popup, click Remove again. In the next popup click Keep. Be very careful, do NOT click "Delete". Delete truly deletes, no Recycle Bin, no going back, no more disk file.

In the main Virtualbox window, Open the guest Storage settings. Select the disk controller, click the last icon for 'Add hard disk'. Click Add in the popup. The old disk file should appear in the selection popup. Rename the disk file, then select it again.

Clock OK to everything and the guest should restart with the new-name disk.
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Renaming the VMDK file

Post by fth0 »

scottgus1 wrote:Go to the File menu, Virtual Media Manager. In the Hard Disks tab, select the disk, [...]
There is a much simpler continuation:

[...] go to Properties > Attributes > Location, edit the filename and click on Apply. The filename is automatically changed in the VM configuration that uses the file.
DonVetOne
Posts: 101
Joined: 2. Feb 2018, 14:13

Re: Renaming the VMDK file

Post by DonVetOne »

Great - worked like a charm. Thanks.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Renaming the VMDK file

Post by scottgus1 »

fth0 wrote:There is a much simpler continuation:
Wow, that is a whole lot simpler! And it worked back in 6.0.x, too! Thanks!

I was thinking while typing this all out, there should be a Rename function for guest disks, like there is to Move them now...
Post Reply