Page 1 of 1

Renaming the VMDK file

Posted: 5. Oct 2020, 15:34
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

Re: Renaming the VMDK file

Posted: 5. Oct 2020, 20:27
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.

Re: Renaming the VMDK file

Posted: 5. Oct 2020, 21:27
by DonVetOne
Here you go...

Don.

Re: Renaming the VMDK file

Posted: 5. Oct 2020, 23:26
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.

Re: Renaming the VMDK file

Posted: 6. Oct 2020, 00:20
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.

Re: Renaming the VMDK file

Posted: 6. Oct 2020, 10:37
by DonVetOne
Great - worked like a charm. Thanks.

Re: Renaming the VMDK file

Posted: 6. Oct 2020, 16:50
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...