Recovery advice needed ("hard disk already registered&

This is for discussing general topics about how to use VirtualBox.
Post Reply
moonlight
Posts: 23
Joined: 13. May 2007, 09:52

Recovery advice needed ("hard disk already registered&

Post by moonlight »

Hi all

After discarding of few shapshots I've got:
A hard disk with UUID {...} or with the same properties ('/home/moonlight/.VirtualBox/Machines/Core/Snapshots/{2f6d8a03-afbd-48f7-afbb-1b21bc391ca2}.vdi') is already registered.

Result Code:
0x80070057
Component:
VirtualBox
Interface:
IVirtualBox {e1d95593-f579-4f47-b489-0b67181014e1}
Thus VirtualBox failed to start. The same message resulted attempt to discard any remaining snapshot via VBoxManage.

How can this problem be fixed?

We very need to recover data from that machine.

Here is "DiskRegistry" fragment of VitualBox.xml (2 hard disks)

Code: Select all

    <DiskRegistry>
      <HardDisks>
        <HardDisk type="normal" uuid="{2fd211e0-bd0c-42e2-87b0-459d755b66a0}">
          <VirtualDiskImage filePath="/home/moonlight/.VirtualBox/VDI/Core.vdi"/>
          <DiffHardDisk uuid="{83b759dc-4d46-48d7-ab30-751091451a9e}">
            <VirtualDiskImage filePath="Machines/Core/Snapshots/{83b759dc-4d46-48d7-ab30-751091451a9e}.vdi"/>
            <DiffHardDisk uuid="{8702434c-fedc-41fe-b1ec-de07f42e0941}">
              <VirtualDiskImage filePath="Machines/Core/Snapshots/{8702434c-fedc-41fe-b1ec-de07f42e0941}.vdi"/>
              <DiffHardDisk uuid="{5c91b637-5d74-450d-b943-c2e6b7a56601}">
                <VirtualDiskImage filePath="Machines/Core/Snapshots/{5c91b637-5d74-450d-b943-c2e6b7a56601}.vdi"/>
                <DiffHardDisk uuid="{084a3a7e-ffa5-4940-9ce3-cc8f78aa88e7}">
                  <VirtualDiskImage filePath="Machines/Core/Snapshots/{084a3a7e-ffa5-4940-9ce3-cc8f78aa88e7}.vdi"/>
                  <DiffHardDisk uuid="{2f6d8a03-afbd-48f7-afbb-1b21bc391ca2}">
                    <VirtualDiskImage filePath="Machines/Core/Snapshots/{2f6d8a03-afbd-48f7-afbb-1b21bc391ca2}.vdi"/>
                    <DiffHardDisk uuid="{9b1118b3-5bd2-4c7b-b391-43d8f7e59c23}">
                      <VirtualDiskImage filePath="Machines/Core/Snapshots/{9b1118b3-5bd2-4c7b-b391-43d8f7e59c23}.vdi"/>
                      <DiffHardDisk uuid="{e7dee828-47fc-4d9e-97a5-e90e55e7bb8d}">
                        <VirtualDiskImage filePath="Machines/Core/Snapshots/{e7dee828-47fc-4d9e-97a5-e90e55e7bb8d}.vdi"/>
                      </DiffHardDisk>
                    </DiffHardDisk>
                  </DiffHardDisk>
                </DiffHardDisk>
                <DiffHardDisk uuid="{2f6d8a03-afbd-48f7-afbb-1b21bc391ca2}">
                  <VirtualDiskImage filePath="Machines/Core/Snapshots/{2f6d8a03-afbd-48f7-afbb-1b21bc391ca2}.vdi"/>
                  <DiffHardDisk uuid="{9b1118b3-5bd2-4c7b-b391-43d8f7e59c23}">
                    <VirtualDiskImage filePath="Machines/Core/Snapshots/{9b1118b3-5bd2-4c7b-b391-43d8f7e59c23}.vdi"/>
                    <DiffHardDisk uuid="{e7dee828-47fc-4d9e-97a5-e90e55e7bb8d}">
                      <VirtualDiskImage filePath="Machines/Core/Snapshots/{e7dee828-47fc-4d9e-97a5-e90e55e7bb8d}.vdi"/>
                    </DiffHardDisk>
                  </DiffHardDisk>
                </DiffHardDisk>
              </DiffHardDisk>
            </DiffHardDisk>
          </DiffHardDisk>
          <DiffHardDisk uuid="{8702434c-fedc-41fe-b1ec-de07f42e0941}">
            <VirtualDiskImage filePath="Machines/Core/Snapshots/{8702434c-fedc-41fe-b1ec-de07f42e0941}.vdi"/>
            <DiffHardDisk uuid="{5c91b637-5d74-450d-b943-c2e6b7a56601}">
              <VirtualDiskImage filePath="Machines/Core/Snapshots/{5c91b637-5d74-450d-b943-c2e6b7a56601}.vdi"/>
              <DiffHardDisk uuid="{084a3a7e-ffa5-4940-9ce3-cc8f78aa88e7}">
                <VirtualDiskImage filePath="Machines/Core/Snapshots/{084a3a7e-ffa5-4940-9ce3-cc8f78aa88e7}.vdi"/>
                <DiffHardDisk uuid="{2f6d8a03-afbd-48f7-afbb-1b21bc391ca2}">
                  <VirtualDiskImage filePath="Machines/Core/Snapshots/{2f6d8a03-afbd-48f7-afbb-1b21bc391ca2}.vdi"/>
                  <DiffHardDisk uuid="{9b1118b3-5bd2-4c7b-b391-43d8f7e59c23}">
                    <VirtualDiskImage filePath="Machines/Core/Snapshots/{9b1118b3-5bd2-4c7b-b391-43d8f7e59c23}.vdi"/>
                    <DiffHardDisk uuid="{e7dee828-47fc-4d9e-97a5-e90e55e7bb8d}">
                      <VirtualDiskImage filePath="Machines/Core/Snapshots/{e7dee828-47fc-4d9e-97a5-e90e55e7bb8d}.vdi"/>
                    </DiffHardDisk>
                  </DiffHardDisk>
                </DiffHardDisk>
              </DiffHardDisk>
              <DiffHardDisk uuid="{2f6d8a03-afbd-48f7-afbb-1b21bc391ca2}">
                <VirtualDiskImage filePath="Machines/Core/Snapshots/{2f6d8a03-afbd-48f7-afbb-1b21bc391ca2}.vdi"/>
                <DiffHardDisk uuid="{9b1118b3-5bd2-4c7b-b391-43d8f7e59c23}">
                  <VirtualDiskImage filePath="Machines/Core/Snapshots/{9b1118b3-5bd2-4c7b-b391-43d8f7e59c23}.vdi"/>
                  <DiffHardDisk uuid="{e7dee828-47fc-4d9e-97a5-e90e55e7bb8d}">
                    <VirtualDiskImage filePath="Machines/Core/Snapshots/{e7dee828-47fc-4d9e-97a5-e90e55e7bb8d}.vdi"/>
                  </DiffHardDisk>
                </DiffHardDisk>
              </DiffHardDisk>
            </DiffHardDisk>
          </DiffHardDisk>
        </HardDisk>
        <HardDisk type="normal" uuid="{b4d37ab5-30de-49f7-b6a3-9cc52144ae0d}">
          <VirtualDiskImage filePath="/home/moonlight/.VirtualBox/VDI/Container.vdi"/>
          <DiffHardDisk uuid="{afc6cdad-b9e6-4351-8dd6-24c21e913e0a}">
            <VirtualDiskImage filePath="Machines/Container/Snapshots/{afc6cdad-b9e6-4351-8dd6-24c21e913e0a}.vdi"/>
            <DiffHardDisk uuid="{6f290343-26d4-42b4-805c-cea71814ec81}">
              <VirtualDiskImage filePath="Machines/Container/Snapshots/{6f290343-26d4-42b4-805c-cea71814ec81}.vdi"/>
            </DiffHardDisk>
          </DiffHardDisk>
        </HardDisk>
        <HardDisk type="normal" uuid="{0a49a299-a9b0-464e-b51b-ad637fca475a}">
          <VirtualDiskImage filePath="VDI/HardDisk.vdi"/>
          <DiffHardDisk uuid="{3710f89e-5c6e-4eba-979d-b1be6c9a8650}">
            <VirtualDiskImage filePath="Machines/Core/Snapshots/{3710f89e-5c6e-4eba-979d-b1be6c9a8650}.vdi"/>
            <DiffHardDisk uuid="{fa32ced1-c709-4d8b-8672-6f5f5356ffcd}">
              <VirtualDiskImage filePath="Machines/Core/Snapshots/{fa32ced1-c709-4d8b-8672-6f5f5356ffcd}.vdi"/>
              <DiffHardDisk uuid="{9c0d175c-92df-4933-9f87-6ecc9871e3ad}">
                <VirtualDiskImage filePath="Machines/Core/Snapshots/{9c0d175c-92df-4933-9f87-6ecc9871e3ad}.vdi"/>
                <DiffHardDisk uuid="{ffa3d01a-cabc-4d7c-aa9c-1af8a07a2eb8}">
                  <VirtualDiskImage filePath="Machines/Core/Snapshots/{ffa3d01a-cabc-4d7c-aa9c-1af8a07a2eb8}.vdi"/>
                  <DiffHardDisk uuid="{7374efcf-36b2-4211-91cf-a2a910d2acf3}">
                    <VirtualDiskImage filePath="Machines/Core/Snapshots/{7374efcf-36b2-4211-91cf-a2a910d2acf3}.vdi"/>
                    <DiffHardDisk uuid="{d28006df-2212-4931-bdd4-1a36cb3b7153}">
                      <VirtualDiskImage filePath="Machines/Core/Snapshots/{d28006df-2212-4931-bdd4-1a36cb3b7153}.vdi"/>
                    </DiffHardDisk>
                  </DiffHardDisk>
                </DiffHardDisk>
              </DiffHardDisk>
            </DiffHardDisk>
          </DiffHardDisk>
        </HardDisk>
      </HardDisks>
      <DVDImages/>
      <FloppyImages/>
    </DiskRegistry>
In snapshots' folder
{084a3a7e-ffa5-4940-9ce3-cc8f78aa88e7}.vdi
{2f6d8a03-afbd-48f7-afbb-1b21bc391ca2}.vdi
{3710f89e-5c6e-4eba-979d-b1be6c9a8650}.vdi
{5c91b637-5d74-450d-b943-c2e6b7a56601}.vdi
{6bb38687-fb4b-4dc5-9bcc-714027a86da7}.sav
{7374efcf-36b2-4211-91cf-a2a910d2acf3}.vdi
{83b759dc-4d46-48d7-ab30-751091451a9e}.vdi
{9b1118b3-5bd2-4c7b-b391-43d8f7e59c23}.vdi
{9c0d175c-92df-4933-9f87-6ecc9871e3ad}.vdi
{d28006df-2212-4931-bdd4-1a36cb3b7153}.vdi
{e7dee828-47fc-4d9e-97a5-e90e55e7bb8d}.vdi
{fa32ced1-c709-4d8b-8672-6f5f5356ffcd}.vdi
{ffa3d01a-cabc-4d7c-aa9c-1af8a07a2eb8}.vdi
dmik
Posts: 10
Joined: 14. May 2007, 10:57

Post by dmik »

Your problem is that for some reason parts of the disk registry in VirtualBox.xml got duplicated: you can notice elements with the same UUID values and vdi paths, and this is exactly what VirtualBox is complaining about at startup. So the fix is to remove duplicates. Taking into account the list of .vdi files you actually have, it may look like that:

Code: Select all

    <DiskRegistry>
      <HardDisks>
        <HardDisk type="normal" uuid="{2fd211e0-bd0c-42e2-87b0-459d755b66a0}">
          <VirtualDiskImage filePath="/home/moonlight/.VirtualBox/VDI/Core.vdi"/>
          <DiffHardDisk uuid="{83b759dc-4d46-48d7-ab30-751091451a9e}">
            <VirtualDiskImage filePath="Machines/Core/Snapshots/{83b759dc-4d46-48d7-ab30-751091451a9e}.vdi"/>
            <DiffHardDisk uuid="{8702434c-fedc-41fe-b1ec-de07f42e0941}">
              <VirtualDiskImage filePath="Machines/Core/Snapshots/{5c91b637-5d74-450d-b943-c2e6b7a56601}.vdi"/>
              <DiffHardDisk uuid="{084a3a7e-ffa5-4940-9ce3-cc8f78aa88e7}">
                <VirtualDiskImage filePath="Machines/Core/Snapshots/{084a3a7e-ffa5-4940-9ce3-cc8f78aa88e7}.vdi"/>
                <DiffHardDisk uuid="{2f6d8a03-afbd-48f7-afbb-1b21bc391ca2}">
                  <VirtualDiskImage filePath="Machines/Core/Snapshots/{2f6d8a03-afbd-48f7-afbb-1b21bc391ca2}.vdi"/>
                  <DiffHardDisk uuid="{9b1118b3-5bd2-4c7b-b391-43d8f7e59c23}">
                    <VirtualDiskImage filePath="Machines/Core/Snapshots/{9b1118b3-5bd2-4c7b-b391-43d8f7e59c23}.vdi"/>
                    <DiffHardDisk uuid="{e7dee828-47fc-4d9e-97a5-e90e55e7bb8d}">
                      <VirtualDiskImage filePath="Machines/Core/Snapshots/{e7dee828-47fc-4d9e-97a5-e90e55e7bb8d}.vdi"/>
                    </DiffHardDisk>
                  </DiffHardDisk>
                </DiffHardDisk>
              </DiffHardDisk>
            </DiffHardDisk>
          </DiffHardDisk>
        </HardDisk>
        <HardDisk type="normal" uuid="{b4d37ab5-30de-49f7-b6a3-9cc52144ae0d}">
          <VirtualDiskImage filePath="/home/moonlight/.VirtualBox/VDI/Container.vdi"/>
          <DiffHardDisk uuid="{afc6cdad-b9e6-4351-8dd6-24c21e913e0a}">
            <VirtualDiskImage filePath="Machines/Container/Snapshots/{afc6cdad-b9e6-4351-8dd6-24c21e913e0a}.vdi"/>
            <DiffHardDisk uuid="{6f290343-26d4-42b4-805c-cea71814ec81}">
              <VirtualDiskImage filePath="Machines/Container/Snapshots/{6f290343-26d4-42b4-805c-cea71814ec81}.vdi"/>
            </DiffHardDisk>
          </DiffHardDisk>
        </HardDisk>
        <HardDisk type="normal" uuid="{0a49a299-a9b0-464e-b51b-ad637fca475a}">
          <VirtualDiskImage filePath="VDI/HardDisk.vdi"/>
          <DiffHardDisk uuid="{3710f89e-5c6e-4eba-979d-b1be6c9a8650}">
            <VirtualDiskImage filePath="Machines/Core/Snapshots/{3710f89e-5c6e-4eba-979d-b1be6c9a8650}.vdi"/>
            <DiffHardDisk uuid="{fa32ced1-c709-4d8b-8672-6f5f5356ffcd}">
              <VirtualDiskImage filePath="Machines/Core/Snapshots/{fa32ced1-c709-4d8b-8672-6f5f5356ffcd}.vdi"/>
              <DiffHardDisk uuid="{9c0d175c-92df-4933-9f87-6ecc9871e3ad}">
                <VirtualDiskImage filePath="Machines/Core/Snapshots/{9c0d175c-92df-4933-9f87-6ecc9871e3ad}.vdi"/>
                <DiffHardDisk uuid="{ffa3d01a-cabc-4d7c-aa9c-1af8a07a2eb8}">
                  <VirtualDiskImage filePath="Machines/Core/Snapshots/{ffa3d01a-cabc-4d7c-aa9c-1af8a07a2eb8}.vdi"/>
                  <DiffHardDisk uuid="{7374efcf-36b2-4211-91cf-a2a910d2acf3}">
                    <VirtualDiskImage filePath="Machines/Core/Snapshots/{7374efcf-36b2-4211-91cf-a2a910d2acf3}.vdi"/>
                    <DiffHardDisk uuid="{d28006df-2212-4931-bdd4-1a36cb3b7153}">
                      <VirtualDiskImage filePath="Machines/Core/Snapshots/{d28006df-2212-4931-bdd4-1a36cb3b7153}.vdi"/>
                    </DiffHardDisk>
                  </DiffHardDisk>
                </DiffHardDisk>
              </DiffHardDisk>
            </DiffHardDisk>
          </DiffHardDisk>
        </HardDisk>
      </HardDisks>
      <DVDImages/>
      <FloppyImages/>
    </DiskRegistry> 
This could have happened only as a result of some weird VirtualBox crash that caused .xml file corruption (I believe you didn't edit VirtualBox.xml by hand). If you can, please provide more details on how you got into this situation.

I cannot guarantee that the machine named "Core" will work after the above correction, because .vdi contents might have been corrupted too. Anyway, it will tell you exactly what's wrong if it doesn't like something. Feel free to ask again.
moonlight
Posts: 23
Joined: 13. May 2007, 09:52

Post by moonlight »

dmik
Thanks! I already found and fixed dups. Unfortunately, two .vdi disks really appered to be corrupted. There was mismatch between UUID in file name and one specified inside.
I removed them and fixed parent UUIDs in registry and first valid image in chain thus started vm and retrieve most part data .

The crash occurred during discarding of snapshot. I very sorry I didn't save log (I din't noticed crash first, progress window disappeared as usual)
Post Reply