Opened 11 years ago
Closed 8 years ago
#13058 closed defect (obsolete)
Corrupt .VBOX file prevents registering VM
Reported by: | potthast | Owned by: | |
---|---|---|---|
Component: | virtual disk | Version: | VirtualBox 4.3.8 |
Keywords: | Cc: | ||
Guest type: | Windows | Host type: | Linux |
Description
VirtualBox sometimes fails to restore a snapshot after a VM has been powered off (even when waiting for 10s). The error output from VBoxManage snapshot restore then says something about a lock not being released. This problem is well-known, but not what this ticket is about.
As a workaround, I have found that unregistering the VM, re-registering it, and then repeating the snapshot restoration does the trick... most of the time. Today, a VM where a snapshot restore failed was successfully unregistered but failed to be re-registered because the VBOX file was corrupted.
Here's what the HardDisks-tag of the corrupt VBOX file looked like:
<HardDisks> <HardDisk uuid="{6cdc9791-c9f7-4eda-a5f0-decc464aac04}" location="pan14-modaresi14-2014-04-29-17-14-14-disk1.vmdk" format="VMDK" type="Normal"> <HardDisk uuid="{46bd3294-0b17-486f-adbd-9ba62b192566}" location="Snapshots/{46bd3294-0b17-486f-adbd-9ba62b192566}.vmdk" format="VMDK"> <HardDisk uuid="{835a7136-3041-44c1-bf65-bcbc954bf388}" location="Snapshots/{835a7136-3041-44c1-bf65-bcbc954bf388}.vmdk" format="VMDK"> <HardDisk uuid="{b1f618da-8186-45f8-87e2-655e4817338b}" location="Snapshots/{b1f618da-8186-45f8-87e2-655e4817338b}.vmdk" format="VMDK"> <HardDisk uuid="{b797adf5-5fcc-4149-a5a4-8f00d57b749d}" location="Snapshots/{b797adf5-5fcc-4149-a5a4-8f00d57b749d}.vmdk" format="VMDK"> <HardDisk uuid="{88737e2c-bac1-4906-b108-35f1cd5f4f75}" location="Snapshots/{88737e2c-bac1-4906-b108-35f1cd5f4f75}.vmdk" format="VMDK"> <HardDisk uuid="{d24d6e63-f516-4d9e-9180-1e0e2950e333}" location="Snapshots/{d24d6e63-f516-4d9e-9180-1e0e2950e333}.vmdk" format="VMDK"> <HardDisk uuid="{c1aa1657-fed5-488a-b743-d549fd4a8e05}" location="Snapshots/{c1aa1657-fed5-488a-b743-d549fd4a8e05}.vmdk" format="VMDK"> <HardDisk uuid="{48ea261f-bd7f-48e5-b941-15ed0d5a42f2}" location="Snapshots/{48ea261f-bd7f-48e5-b941-15ed0d5a42f2}.vmdk" format="VMDK"> <HardDisk uuid="{816344d3-747a-4d90-8358-121be771fa82}" location="Snapshots/{816344d3-747a-4d90-8358-121be771fa82}.vmdk" format="VMDK"> <HardDisk uuid="{1a3a468f-f407-4c33-9bc5-03b89f9ccd6c}" location="Snapshots/{1a3a468f-f407-4c33-9bc5-03b89f9ccd6c}.vmdk" format="VMDK"> <HardDisk uuid="{69055c13-31e2-49a4-b048-4dcec39cd0c3}" location="Snapshots/{69055c13-31e2-49a4-b048-4dcec39cd0c3}.vmdk" format="VMDK"> <HardDisk uuid="{43e733e0-d8a6-4794-9a3c-6b6d2b56d734}" location="Snapshots/{43e733e0-d8a6-4794-9a3c-6b6d2b56d734}.vmdk" format="VMDK"> <HardDisk uuid="{2e8129f6-5c84-4797-86bf-0e8f2be1bbf5}" location="Snapshots/{2e8129f6-5c84-4797-86bf-0e8f2be1bbf5}.vmdk" format="VMDK"> <HardDisk uuid="{3a63ab95-1845-4a1d-8c5a-1676c2fcaa2e}" location="Snapshots/{3a63ab95-1845-4a1d-8c5a-1676c2fcaa2e}.vmdk" format="VMDK"> <HardDisk uuid="{fccc7c04-ebf5-42e4-9670-117afca2f787}" location="Snapshots/{fccc7c04-ebf5-42e4-9670-117afca2f787}.vmdk" format="VMDK"> <HardDisk uuid="{69f80654-c381-43f1-9ab3-2e363a7acfb9}" location="Snapshots/{69f80654-c381-43f1-9ab3-2e363a7acfb9}.vmdk" format="VMDK"> <HardDisk uuid="{1a05ae79-6450-45ca-9738-d272f3804863}" location="Snapshots/{1a05ae79-6450-45ca-9738-d272f3804863}.vmdk" format="VMDK"> <HardDisk uuid="{f2c11d3a-c7f4-434a-b469-28bb24c77b4f}" location="Snapshots/{f2c11d3a-c7f4-434a-b469-28bb24c77b4f}.vmdk" format="VMDK"> <HardDisk uuid="{2be77c45-3363-4029-84f2-5171ce68045a}" location="Snapshots/{2be77c45-3363-4029-84f2-5171ce68045a}.vmdk" format="VMDK"> <HardDisk uuid="{3afa5d51-74a8-49bd-9692-0cdd8b398305}" location="Snapshots/{3afa5d51-74a8-49bd-9692-0cdd8b398305}.vmdk" format="VMDK"> <HardDisk uuid="{245b390d-6de9-4290-bc7f-f5af8fbd80a2}" location="Snapshots/{245b390d-6de9-4290-bc7f-f5af8fbd80a2}.vmdk" format="VMDK"> <HardDisk uuid="{9e94bb04-ff91-4619-990d-cf7dd99b570f}" location="Snapshots/{9e94bb04-ff91-4619-990d-cf7dd99b570f}.vmdk" format="VMDK"/> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisks>
The corruption in the VBOX file is as follows:
- Many snapshot hard disks were missing as evidenced by the fact that the number of Snapshot-tags is much larger than the number of HardDisk-tags.
- The inner-most hard disk caused re-registering to fail with the error message: "Medium ... cannot be closed because it is still attached to 1 virtual machines"
- There is no reference to the inner-most snapshot hard disk in the remaining VBOX file, although the corresponding VMDK file is present in the Snapshots folder.
I was able to repair the HardDisks-Tag of the VBOX file to a working state by grep-ing all the Image-tags and nesting HardDisk-tags in order of appearance of the Image-tags.
Here's what the HardDisks-tag of the working VBOX file looks like:
<HardDisks> <HardDisk uuid="{6cdc9791-c9f7-4eda-a5f0-decc464aac04}" location="pan14-modaresi14-2014-04-29-17-14-14-disk1.vmdk" format="VMDK" type="Normal"> <HardDisk uuid="{46bd3294-0b17-486f-adbd-9ba62b192566}" location="Snapshots/{46bd3294-0b17-486f-adbd-9ba62b192566}.vmdk" format="VMDK"> <HardDisk uuid="{835a7136-3041-44c1-bf65-bcbc954bf388}" location="Snapshots/{835a7136-3041-44c1-bf65-bcbc954bf388}.vmdk" format="VMDK"> <HardDisk uuid="{b1f618da-8186-45f8-87e2-655e4817338b}" location="Snapshots/{b1f618da-8186-45f8-87e2-655e4817338b}.vmdk" format="VMDK"> <HardDisk uuid="{b797adf5-5fcc-4149-a5a4-8f00d57b749d}" location="Snapshots/{b797adf5-5fcc-4149-a5a4-8f00d57b749d}.vmdk" format="VMDK"> <HardDisk uuid="{88737e2c-bac1-4906-b108-35f1cd5f4f75}" location="Snapshots/{88737e2c-bac1-4906-b108-35f1cd5f4f75}.vmdk" format="VMDK"> <HardDisk uuid="{d24d6e63-f516-4d9e-9180-1e0e2950e333}" location="Snapshots/{d24d6e63-f516-4d9e-9180-1e0e2950e333}.vmdk" format="VMDK"> <HardDisk uuid="{c1aa1657-fed5-488a-b743-d549fd4a8e05}" location="Snapshots/{c1aa1657-fed5-488a-b743-d549fd4a8e05}.vmdk" format="VMDK"> <HardDisk uuid="{48ea261f-bd7f-48e5-b941-15ed0d5a42f2}" location="Snapshots/{48ea261f-bd7f-48e5-b941-15ed0d5a42f2}.vmdk" format="VMDK"> <HardDisk uuid="{816344d3-747a-4d90-8358-121be771fa82}" location="Snapshots/{816344d3-747a-4d90-8358-121be771fa82}.vmdk" format="VMDK"> <HardDisk uuid="{1a3a468f-f407-4c33-9bc5-03b89f9ccd6c}" location="Snapshots/{1a3a468f-f407-4c33-9bc5-03b89f9ccd6c}.vmdk" format="VMDK"> <HardDisk uuid="{69055c13-31e2-49a4-b048-4dcec39cd0c3}" location="Snapshots/{69055c13-31e2-49a4-b048-4dcec39cd0c3}.vmdk" format="VMDK"> <HardDisk uuid="{43e733e0-d8a6-4794-9a3c-6b6d2b56d734}" location="Snapshots/{43e733e0-d8a6-4794-9a3c-6b6d2b56d734}.vmdk" format="VMDK"> <HardDisk uuid="{2e8129f6-5c84-4797-86bf-0e8f2be1bbf5}" location="Snapshots/{2e8129f6-5c84-4797-86bf-0e8f2be1bbf5}.vmdk" format="VMDK"> <HardDisk uuid="{3a63ab95-1845-4a1d-8c5a-1676c2fcaa2e}" location="Snapshots/{3a63ab95-1845-4a1d-8c5a-1676c2fcaa2e}.vmdk" format="VMDK"> <HardDisk uuid="{fccc7c04-ebf5-42e4-9670-117afca2f787}" location="Snapshots/{fccc7c04-ebf5-42e4-9670-117afca2f787}.vmdk" format="VMDK"> <HardDisk uuid="{69f80654-c381-43f1-9ab3-2e363a7acfb9}" location="Snapshots/{69f80654-c381-43f1-9ab3-2e363a7acfb9}.vmdk" format="VMDK"> <HardDisk uuid="{1a05ae79-6450-45ca-9738-d272f3804863}" location="Snapshots/{1a05ae79-6450-45ca-9738-d272f3804863}.vmdk" format="VMDK"> <HardDisk uuid="{f2c11d3a-c7f4-434a-b469-28bb24c77b4f}" location="Snapshots/{f2c11d3a-c7f4-434a-b469-28bb24c77b4f}.vmdk" format="VMDK"> <HardDisk uuid="{2be77c45-3363-4029-84f2-5171ce68045a}" location="Snapshots/{2be77c45-3363-4029-84f2-5171ce68045a}.vmdk" format="VMDK"> <HardDisk uuid="{3afa5d51-74a8-49bd-9692-0cdd8b398305}" location="Snapshots/{3afa5d51-74a8-49bd-9692-0cdd8b398305}.vmdk" format="VMDK"> <HardDisk uuid="{245b390d-6de9-4290-bc7f-f5af8fbd80a2}" location="Snapshots/{245b390d-6de9-4290-bc7f-f5af8fbd80a2}.vmdk" format="VMDK"> <HardDisk uuid="{204f28d2-bc06-4f9a-99d1-6937d3725d70}" location="Snapshots/{204f28d2-bc06-4f9a-99d1-6937d3725d70}.vmdk" format="VMDK"> <HardDisk uuid="{8d7acfa6-e246-4245-aaae-e173ed774549}" location="Snapshots/{8d7acfa6-e246-4245-aaae-e173ed774549}.vmdk" format="VMDK"> <HardDisk uuid="{987e2fcf-ae47-4942-b22b-b19244788964}" location="Snapshots/{987e2fcf-ae47-4942-b22b-b19244788964}.vmdk" format="VMDK"> <HardDisk uuid="{d3c5ddec-76f8-407c-9cb2-644d0d02adfc}" location="Snapshots/{d3c5ddec-76f8-407c-9cb2-644d0d02adfc}.vmdk" format="VMDK"> <HardDisk uuid="{705cc449-b4c2-4805-82c4-feac91aeffda}" location="Snapshots/{705cc449-b4c2-4805-82c4-feac91aeffda}.vmdk" format="VMDK"> <HardDisk uuid="{9ac97287-cf13-4f74-9ffa-39e5d941533e}" location="Snapshots/{9ac97287-cf13-4f74-9ffa-39e5d941533e}.vmdk" format="VMDK"> <HardDisk uuid="{1aa4aba2-9ed5-4228-bb76-f5e7fe73996f}" location="Snapshots/{1aa4aba2-9ed5-4228-bb76-f5e7fe73996f}.vmdk" format="VMDK"> <HardDisk uuid="{cfc72260-c42e-4fae-9a9c-7244a28354b5}" location="Snapshots/{cfc72260-c42e-4fae-9a9c-7244a28354b5}.vmdk" format="VMDK"> <HardDisk uuid="{2bb3dd70-9f61-4b39-8e48-48042b712c8e}" location="Snapshots/{2bb3dd70-9f61-4b39-8e48-48042b712c8e}.vmdk" format="VMDK"> <HardDisk uuid="{e2482718-d9e8-4ab8-98c4-639a5d5ebfca}" location="Snapshots/{e2482718-d9e8-4ab8-98c4-639a5d5ebfca}.vmdk" format="VMDK"> <HardDisk uuid="{0b34d4d5-fa70-48c8-9bf5-40145149e90e}" location="Snapshots/{0b34d4d5-fa70-48c8-9bf5-40145149e90e}.vmdk" format="VMDK"> <HardDisk uuid="{cb2c1490-1d16-4ab8-8e14-de3b7c090c87}" location="Snapshots/{cb2c1490-1d16-4ab8-8e14-de3b7c090c87}.vmdk" format="VMDK"> <HardDisk uuid="{9392c2b1-fa61-4cb4-bc64-226daded14d5}" location="Snapshots/{9392c2b1-fa61-4cb4-bc64-226daded14d5}.vmdk" format="VMDK"> <HardDisk uuid="{31bf1b73-7fc7-4947-8b01-9bd415b5560e}" location="Snapshots/{31bf1b73-7fc7-4947-8b01-9bd415b5560e}.vmdk" format="VMDK"> <HardDisk uuid="{5033b8a6-fdfc-4948-9f86-ab1a99ecaa90}" location="Snapshots/{5033b8a6-fdfc-4948-9f86-ab1a99ecaa90}.vmdk" format="VMDK"> <HardDisk uuid="{244385d5-81e5-4ff6-a70b-9fca7e220b5a}" location="Snapshots/{244385d5-81e5-4ff6-a70b-9fca7e220b5a}.vmdk" format="VMDK"> <HardDisk uuid="{4acb4f3d-c88b-46c8-a466-c11f09126ad7}" location="Snapshots/{4acb4f3d-c88b-46c8-a466-c11f09126ad7}.vmdk" format="VMDK"> <HardDisk uuid="{89fcea3c-ddc9-4195-a78d-4fd791580f8e}" location="Snapshots/{89fcea3c-ddc9-4195-a78d-4fd791580f8e}.vmdk" format="VMDK"> <HardDisk uuid="{718d093f-738c-4cfe-b97a-40c541516040}" location="Snapshots/{718d093f-738c-4cfe-b97a-40c541516040}.vmdk" format="VMDK"> <HardDisk uuid="{cf518e7e-1a65-4f98-a05b-f0223c86e487}" location="Snapshots/{cf518e7e-1a65-4f98-a05b-f0223c86e487}.vmdk" format="VMDK"> <HardDisk uuid="{df714be3-cf6d-43e3-9dea-be103c4cf9d3}" location="Snapshots/{df714be3-cf6d-43e3-9dea-be103c4cf9d3}.vmdk" format="VMDK"> <HardDisk uuid="{2f076c0d-7048-4bd7-97db-b0f9870bf562}" location="Snapshots/{2f076c0d-7048-4bd7-97db-b0f9870bf562}.vmdk" format="VMDK"> <HardDisk uuid="{cd687f52-ae08-4467-a1e0-a26ed45710a7}" location="Snapshots/{cd687f52-ae08-4467-a1e0-a26ed45710a7}.vmdk" format="VMDK"> <HardDisk uuid="{68055994-66db-498f-8595-ad2fc52fe631}" location="Snapshots/{68055994-66db-498f-8595-ad2fc52fe631}.vmdk" format="VMDK"> <HardDisk uuid="{5c08df7c-ba4a-4424-9551-d26bbc7d950a}" location="Snapshots/{5c08df7c-ba4a-4424-9551-d26bbc7d950a}.vmdk" format="VMDK"> <HardDisk uuid="{bf5dc01a-810b-40f1-9c67-7d6957cb221d}" location="Snapshots/{bf5dc01a-810b-40f1-9c67-7d6957cb221d}.vmdk" format="VMDK"> <HardDisk uuid="{d5a1c6a2-d685-4bd8-b7a8-13926369f5cb}" location="Snapshots/{d5a1c6a2-d685-4bd8-b7a8-13926369f5cb}.vmdk" format="VMDK"> <HardDisk uuid="{d717c7e2-cbc3-460b-bc0f-63c04621dd5c}" location="Snapshots/{d717c7e2-cbc3-460b-bc0f-63c04621dd5c}.vmdk" format="VMDK"> <HardDisk uuid="{625c7504-e501-44da-8eb9-bab1f6427a3e}" location="Snapshots/{625c7504-e501-44da-8eb9-bab1f6427a3e}.vmdk" format="VMDK"> <HardDisk uuid="{4d6e1b6e-b8fc-4e06-97c8-8498d766279f}" location="Snapshots/{4d6e1b6e-b8fc-4e06-97c8-8498d766279f}.vmdk" format="VMDK"> <HardDisk uuid="{23b41c38-1535-42e4-a538-5895e699abb7}" location="Snapshots/{23b41c38-1535-42e4-a538-5895e699abb7}.vmdk" format="VMDK"> <HardDisk uuid="{a69b1007-aaa3-4040-b8ac-1c1fc7dd643e}" location="Snapshots/{a69b1007-aaa3-4040-b8ac-1c1fc7dd643e}.vmdk" format="VMDK"> <HardDisk uuid="{3bdd5f43-b7ed-47e8-999a-9a590082a96a}" location="Snapshots/{3bdd5f43-b7ed-47e8-999a-9a590082a96a}.vmdk" format="VMDK"> <HardDisk uuid="{b2f38d51-94ba-4c54-8973-cfb41360ded1}" location="Snapshots/{b2f38d51-94ba-4c54-8973-cfb41360ded1}.vmdk" format="VMDK"> <HardDisk uuid="{a9273e55-57f2-4f6c-ba0e-11e05c859460}" location="Snapshots/{a9273e55-57f2-4f6c-ba0e-11e05c859460}.vmdk" format="VMDK"> <HardDisk uuid="{281423d9-8781-43c5-b86d-a4ec6b9a09cc}" location="Snapshots/{281423d9-8781-43c5-b86d-a4ec6b9a09cc}.vmdk" format="VMDK"> <HardDisk uuid="{ebb6e097-a503-46f6-886b-c7587f8f9e6d}" location="Snapshots/{ebb6e097-a503-46f6-886b-c7587f8f9e6d}.vmdk" format="VMDK"> <HardDisk uuid="{553a30ca-4112-4a14-86b6-2ad2f67ffe73}" location="Snapshots/{553a30ca-4112-4a14-86b6-2ad2f67ffe73}.vmdk" format="VMDK"> <HardDisk uuid="{c2ffda0e-faff-4023-829c-223d43498a79}" location="Snapshots/{c2ffda0e-faff-4023-829c-223d43498a79}.vmdk" format="VMDK"> <HardDisk uuid="{315bf384-59dd-40d3-903f-0a2cfb9d5b03}" location="Snapshots/{315bf384-59dd-40d3-903f-0a2cfb9d5b03}.vmdk" format="VMDK"> <HardDisk uuid="{3ed3831f-bd94-4d80-bcb5-cdd97dd13ffc}" location="Snapshots/{3ed3831f-bd94-4d80-bcb5-cdd97dd13ffc}.vmdk" format="VMDK"> <HardDisk uuid="{1ab91e63-285e-4148-9d9c-9c0dcce6e5a0}" location="Snapshots/{1ab91e63-285e-4148-9d9c-9c0dcce6e5a0}.vmdk" format="VMDK"> <HardDisk uuid="{a863f14d-7e8f-4bb6-8124-7141c374e224}" location="Snapshots/{a863f14d-7e8f-4bb6-8124-7141c374e224}.vmdk" format="VMDK"> <HardDisk uuid="{5558ce8c-b9f9-445d-9587-ce492c8644b6}" location="Snapshots/{5558ce8c-b9f9-445d-9587-ce492c8644b6}.vmdk" format="VMDK"> <HardDisk uuid="{5382344f-2a05-499a-b096-5b41a53a7a29}" location="Snapshots/{5382344f-2a05-499a-b096-5b41a53a7a29}.vmdk" format="VMDK"> <HardDisk uuid="{62760b1c-484c-4d6b-bc68-0849f5d8a591}" location="Snapshots/{62760b1c-484c-4d6b-bc68-0849f5d8a591}.vmdk" format="VMDK"/> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisk> </HardDisks>
Background: I make heavy use of the snapshot feature on hosts that run about 20 virtual machines in parallel, both Windows and Linux. These VMs are frequently being snapshot-ed and restored shortly after.
Attachments (2)
Change History (3)
by , 11 years ago
Attachment: | vbox-files.zip added |
---|
by , 11 years ago
Attachment: | vbox-files2.zip added |
---|
Here's another of my VMs on a different host that recently failed, this time including all Logs
comment:1 by , 8 years ago
Resolution: | → obsolete |
---|---|
Status: | new → closed |
Please reopen if still relevant with a recent VirtualBox release.
This archive contains the corrupt and the working VBOX file, as well as the prev-file of the corrupt VBOX file.