Parent UUID of the medium and MediaRegistry

This is for discussing general topics about how to use VirtualBox.
Post Reply
yoyo88
Posts: 2
Joined: 12. Feb 2024, 01:02

Parent UUID of the medium and MediaRegistry

Post by yoyo88 »

Hello,

somehow the relation of snapshots is faulty a deleted snapshot is still in the list, see attachment.
I deleted Snapshot f4e29b17-f388-427b-8c4d-12da4670ec55 and its content was combined into the main disk grafanaServer-disk001.vmdk and the snapshot file {f4e29b17-f388-427b-8c4d-12da4670ec55}.vmdk was also deleted on disk.

I also checked the parentuuid settings in the vmdk files and this seems to be ok:

Code: Select all

uwe@uwe-HP-EliteBook-840-G1:~/VirtualBox VMs/Debian64$ vboxmanage internalcommands dumphdinfo grafanaServer-disk001.vmdk 
--- Dumping VD Disk, Images=1
Dumping VD image "grafanaServer-disk001.vmdk" (Backend=VMDK)
Header: Geometry PCHS=16383/16/63 LCHS=1024/255/63 cbSector=131951680
Header: uuidCreation={97c0f820-b39d-405b-a774-ea1c6065e272}
Header: uuidModification={ca0e5df0-2901-41f0-8925-d165b4605dae}
Header: uuidParent={00000000-0000-0000-0000-000000000000}
Header: uuidParentModification={00000000-0000-0000-0000-000000000000}
uwe@uwe-HP-EliteBook-840-G1:~/VirtualBox VMs/Debian64$ ll Snapshots/
insgesamt 19559352
drwx------ 2 uwe uwe       4096 Feb 13 19:06 ./
drwx------ 4 uwe uwe       4096 Feb 13 19:41 ../
-rw------- 1 uwe uwe 6254624768 Feb 13 19:02 {1158baa2-d28c-4902-95e0-df5d6dfb1d4f}.vmdk
-rw------- 1 uwe uwe 7536508928 Feb 11 21:59 {6d101a84-bb53-4ae0-a311-0d7b47b2c9ba}.vmdk
uwe@uwe-HP-EliteBook-840-G1:~/VirtualBox VMs/Debian64$ vboxmanage internalcommands dumphdinfo Snapshots/\{1158baa2-d28c-4902-95e0-df5d6dfb1d4f\}.vmdk
--- Dumping VD Disk, Images=1
Dumping VD image "Snapshots/{1158baa2-d28c-4902-95e0-df5d6dfb1d4f}.vmdk" (Backend=VMDK)
Header: Geometry PCHS=16383/16/63 LCHS=1024/255/63 cbSector=131951680
Header: uuidCreation={1158baa2-d28c-4902-95e0-df5d6dfb1d4f}
Header: uuidModification={811c48ca-78e3-4d76-8a1a-2e8f5f12963a}
Header: uuidParent={97c0f820-b39d-405b-a774-ea1c6065e272}
Header: uuidParentModification={f608b982-649a-4ed7-aee6-0f1b23793df7}
uwe@uwe-HP-EliteBook-840-G1:~/VirtualBox VMs/Debian64$ vboxmanage internalcommands dumphdinfo Snapshots/\{6d101a84-bb53-4ae0-a311-0d7b47b2c9ba\}.vmdk 
--- Dumping VD Disk, Images=1
Dumping VD image "Snapshots/{6d101a84-bb53-4ae0-a311-0d7b47b2c9ba}.vmdk" (Backend=VMDK)
Header: Geometry PCHS=16383/16/63 LCHS=1024/255/63 cbSector=131951680
Header: uuidCreation={6d101a84-bb53-4ae0-a311-0d7b47b2c9ba}
Header: uuidModification={ab94aa13-4d43-472c-a0bc-8a6ceb22adfc}
Header: uuidParent={1158baa2-d28c-4902-95e0-df5d6dfb1d4f}
Header: uuidParentModification={811c48ca-78e3-4d76-8a1a-2e8f5f12963a}
But in the VM.vbox file the deleted Snapshot f4e29b17-f388-427b-8c4d-12da4670ec55 is still in the MediaRegistry.

Code: Select all

    <MediaRegistry>
      <HardDisks>
        <HardDisk uuid="{97c0f820-b39d-405b-a774-ea1c6065e272}" location="grafanaServer-disk001.vmdk" format="VMDK" type="Normal">
          <HardDisk uuid="{f4e29b17-f388-427b-8c4d-12da4670ec55}" location="Snapshots/{f4e29b17-f388-427b-8c4d-12da4670ec55}.vmdk" format="VMDK">
            <HardDisk uuid="{1158baa2-d28c-4902-95e0-df5d6dfb1d4f}" location="Snapshots/{1158baa2-d28c-4902-95e0-df5d6dfb1d4f}.vmdk" format="VMDK">
              <HardDisk uuid="{6d101a84-bb53-4ae0-a311-0d7b47b2c9ba}" location="Snapshots/{6d101a84-bb53-4ae0-a311-0d7b47b2c9ba}.vmdk" format="VMDK"/>
            </HardDisk>
          </HardDisk>
        </HardDisk>
      </HardDisks>
    </MediaRegistry>
If I stop VirtualBox, delete the entry in the MediaRegistry and start VirtualBox, it is still shown in the virtual media manger.
And If I start the VM I get the error, that the {f4e29b17-f388-427b-8c4d-12da4670ec55}.vmdk file is missing.

So how can I delete the entry f4e29b17-f388-427b-8c4d-12da4670ec55 in the MediaRegistry?

Uwe
Attachments
Screenshot 2024-02-13 195241.png
Screenshot 2024-02-13 195241.png (70.39 KiB) Viewed 3161 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Parent UUID of the medium and MediaRegistry

Post by scottgus1 »

yoyo88 wrote: 13. Feb 2024, 21:11 If I stop VirtualBox, delete the entry in the MediaRegistry and start VirtualBox, it is still shown in the virtual media manger.
Manually editing the .vbox file will only work when the background VboxSVC service is completely gone, which only happens some seconds after every last Virtualbox window and process is gone. Did you wait for that condition?

Check for VboxSVC in the Task Manager before trying to edit the .vbox file. It would also be good for a backup of the original .vbox file to be made, in case something goes wrong. A full reboot of the host, as long as no VMs or Virtualbox windows are set to autostart or auto-open will achieve no VboxSVC running, so the manual edit can be done.

FWIW I have seen these reports some, there could be a bug.

FWIW2, be sure to delete both the "<HardDisk uuid="{f4e29b17-..." and the matching "</HardDisk>" lines, leaving no lines empty between.
yoyo88
Posts: 2
Joined: 12. Feb 2024, 01:02

Re: Parent UUID of the medium and MediaRegistry

Post by yoyo88 »

Thanks for your answer. This was realy the problem that I didn't finish all VMs and all VM processes (I'm running vbox on a Linux host).

So after I finished all VMs and all vbox processes, I removed the entry from MediaRegistry in .vbox file and restarted VirtualBox and the entry has gone away and the VM starts.

So the MediaRegistry is also stored in RAM in the vbox processes and flushed to .vbox file.

Uwe
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Parent UUID of the medium and MediaRegistry

Post by scottgus1 »

Thanks for the report! This may help other posts about failed deleted snapshots.
yoyo88 wrote: 13. Feb 2024, 21:50 So the MediaRegistry is also stored in RAM in the vbox processes and flushed to .vbox file.
Yes. The .vbox files are read at the start of the VboxSVC and can be written back to disk at any time, undoing any manual edits while the VboxSVC is running.
Post Reply