Virtualbox: VM does not start after creating a snapshot. EFail (0x80004005)

Hi,

when using vhd disks or when you convert other  disk formats (vmdk, vhd)  to vdi and you create  a snapshot, the virtual machine won’t boot.

An error occurs while starting the vm:

Fehlercode: E_FAIL (0x80004005)
Component: ProgressProxy
Interface: IProgress {c20238e4-3221-4d3f-8891-81ce92d9f913}

In this case the manager for virtual medias shows an error that the parent UUID of the snapshot file does not matches the UUID of parent medium stored in the media registry c:\Users\Username\.virtualbox\VirtualBox.xml.

This can be fixed 🙂 Get the UUID of the parent disk


D:\> vboxmanage internalcommands dumphdinfo harddisk0.vdi
--- Dumping VD Disk, Images=1
Dumping VD image "harddisk0.vdi" (Backend=VHD)
Header: Geometry PCHS=20573/16/255 LCHS=0/0/0 cbSector=512
Header: uuidCreation={b76d8026-e222-470a-9c83-bc91351bb307}
Header: uuidParent={00000000-0000-0000-0000-000000000000}

and the properties the the snapshot:

D:\>vboxmanage internalcommands dumphdinfo "c:\Users\UserName\VirtualBox VMs\VMName\Snapshots\{fdb2b61d-2212-45cc-8d29-b9f598d06f39}.vhd"
--- Dumping VD Disk, Images=1
Dumping VD image "c:\Users\UserName\VirtualBox VMs\VMName\Snapshots\{fdb2b61d-2212-45cc-8d29-b9f598d06f39}.vhd" (Backend=VHD)
Header: Geometry PCHS=20573/16/255 LCHS=0/0/0 cbSector=512
Header: uuidCreation={fdb2b61d-2212-45cc-8d29-b9f598d06f39}
Header: uuidParent={00000000-0000-0000-0000-000000000000}

The parent UUID (00000000-0000-0000-0000-000000000000) isn’t set correctly. Set it to its parent disk:

D:\>VBoxManage.exe internalcommands sethdparentuuid "c:\Users\UserName\VirtualBox VMs\VMName\Snapshots\{fdb2b61d-2212-45cc-8d29-b9f598d06f39}.vhd" {b76d8026-e222-470a-9c83-bc91351bb307}
UUID changed to: b76d8026-e222-470a-9c83-bc91351bb307

From now on your VM should start as expected, also new snapshots are possible.

Michael

57 thoughts on “Virtualbox: VM does not start after creating a snapshot. EFail (0x80004005)”

  1. sorry for my english, i`m russian.
    my virtual mashine run some job about 3 month. a take snapshot 20.05.2016.
    two days ago virtual mashine war restart (i dont know why!).
    when i run virtual mashine its run but run as after restart.
    i want return the machine to a state 20/05/2016 and press “restore the snapshot”
    now my virtual mashine dont start:

    Parent UUID {00000000-0000-0000-0000-000000000000} of the medium ‘C:\Users\nik\VirtualBox VMs\XP-nik\Snapshots/{ab4aad8d-7b66-4569-bbfd-facb581deefc}.vhd’ does not match UUID {94b27e89-d561-4449-a1a7-83c2f1dd8d12} of its parent medium stored in the media registry (‘C:\Users\nik/.VirtualBox\VirtualBox.xml’).

    error code:
    E_FAIL (0x80004005)

    MediumWrap

    interface
    IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}

    1. Hi nik,

      start a cmd.exe with Administrator permissions, navigate to the folder where VirtualBox is installed :
      And set the UID by this command:

      VBoxManage.exe internalcommands sethdparentuuid “C:\Users\nik\VirtualBox VMs\XP-nik\Snapshots\{ab4aad8d-7b66-4569-bbfd-facb581deefc}.vhd” {94b27e89-d561-4449-a1a7-83c2f1dd8d12}

      Have tried this?

      Michael

  2. Hello. Sorry for long answer.

    Yes i tried this
    C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands sethdparentuuid “c:\Users\nik\VirtualBox VMs\XP-nik\Snapshots\{ab4aad8d-7b66-4569-bbfd-facb581deefc}.vhd” {94b27e89-d561-4449-a1a7-83c2f1dd8d12}

    VBoxManage.exe: error: Format autodetect failed: VERR_PATH_NOT_FOUND

    1. Hi Nik,

      does the file exist?

      dir “C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands sethdparentuuid “c:\Users\nik\VirtualBox VMs\XP-nik\Snapshots\{ab4aad8d-7b66-4569-bbfd-facb581deefc}.vhd”

      Michael

  3. Yes, i have 4 files named like this in other directory

    C:\Users\nik.NUTEP\VirtualBox VMs\XP-nik\Snapshots\
    Sorry. my mistake.

    now command is working OK:
    C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands sethdparentuu
    id “c:\Users\nik.nutep\VirtualBox VMs\XP-nik\Snapshots\{ab4aad8d-7b66-4569-bbfd-
    facb581deefc}.vhd” {94b27e89-d561-4449-a1a7-83c2f1dd8d12}
    UUID changed to: 94b27e89-d561-4449-a1a7-83c2f1dd8d12

    but virtual mashine is not run

    Parent UUID {00000000-0000-0000-0000-000000000000} of the medium ‘C:\Users\nik.NUTEP\VirtualBox VMs\XP-nik\Snapshots/{5ad80a47-8509-4b7d-9955-44bf137a77c7}.vhd’ does not match UUID {94b27e89-d561-4449-a1a7-83c2f1dd8d12} of its parent medium stored in the media registry (‘C:\Users\nik.NUTEP/.VirtualBox\VirtualBox.xml’).

    Error Code:
    E_FAIL (0x80004005)
    Компонент:
    MediumWrap
    Interface:
    IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}

    1. Hi,

      the error in your latest comment refers to an other file as in yout previous comment:-) Try:

      VBoxManage.exe internalcommands sethdparentuuid C:\Users\nik.NUTEP\VirtualBox VMs\XP-nik\Snapshots\{5ad80a47-8509-4b7d-9955-44bf137a77c7}.vhd {94b27e89-d561-4449-a1a7-83c2f1dd8d12}

      Michael

  4. This is the exact fix needed for the longstanding bug in Virtualbox.
    You get these snapshots vhd files that are disconnected from their parents if the parent VHD files are not in the standard VM folder location (that is one directory above the Snapshots folder). This sequence of commands lets you fix the snapshot files

  5. Thanks, it works 🙂
    I’ve made a batch script so it gets as easy as it could.

    You can check this pastebin out to make your own script, so you don’t always have to manually make the change: pastebin. com/FGRYmv7F

  6. help me plz! Parent medium with UUID {92a96093-a134-4c3c-8888-f0b6cfe9cf53} of the medium ‘C:\ubuntu64\mayao2.vdi’ is not found in the media registry (‘C:\Users\pc\.VirtualBox\VirtualBox.xml’).
    i got that problem when i cop a snapshot to the other laptop.

  7. You are the freaking best! I have run into this situation before and didn’t know how to fix it. There are many supposed fixes but this is the one that definitely works!

  8. Hello, what am I doing wrong?

    C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands sethdparentuuid «C: \ Users \ sleo \ VirtualBox VMs \ sleo \ Snapshots \ {8b309ef0-436f-4eda-a7a2-8c084bdd0707} .vhd» {41b06827-d26c-41e8-b620-29ae2b3d4701}
    Oracle VM VirtualBox Command Line Management Interface Version 5.2.2
    (C) 2005-2017 Oracle Corporation
    All rights reserved.

    Usage: VBoxManage internalcommands [command arguments]

    Commands:

    sethdparentuuid
    Assigns a new parent UUID to the given image file.

    WARNING: This is a development tool and shall only be used to analyse
    problems. It is completely unsupported and will change in
    incompatible ways without warning.

    Syntax error: Not enough parameters

  9. in cmd.exe write this line

    VBoxManage.exe internalcommands sethdparentuuid “c:\Users\sleo\VirtualBox VMs\sleo\Snapshots\{8b309ef0-436f-4eda-a7a2-8c084bdd0707}.vhd” {41b06827-d26c-41e8-b620-29ae2b3d4701}

  10. Sorry, i prefer german, because my English is bad. I need help, I go wild.
    After I create a snapshot, my Vbox dont work and I see this:

    Parent UUID {00000000-0000-0000-0000-000000000000} of the medium ‘C:\Users\Hubert\VirtualBox VMs\XP-Mode\Snapshots/{f04db21c-6305-4869-b88a-13973ced7521}.vhd’ does not match UUID {78a347a0-2f1b-d444-96f3-d9cf3bdc5103} of its parent medium stored in the media registry (‘C:\Users\Hubert\.VirtualBox\VirtualBox.xml’).

    Fehlercode:
    E_FAIL (0x80004005)
    Komponente:
    MediumWrap
    Interface:
    IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}

    When i try to follow the intstruction, on DOS my computer dont know “vboxmanage”. What can i do? Please help me!

    1. Hi Hubert,

      vboxmanage.exe is not in the search path of cmd.exe/Windows. Either change to the directory where VirtualBox is installed. For example

      C:\> cd C:\Program Files\Oracle\VirtualBox
      C:\Program Files\Oracle\VirtualBox> VBoxManage -?
      Oracle VM VirtualBox Command Line Management Interface Version 5.2.6
      (C) 2005-2018 Oracle Corporation
      All rights reserved.
      
      Usage:
      
        VBoxManage [<general option>] <command>
      

      Or call it by the absolute path

      C:\> "C:\Program Files\Oracle\VirtualBox\VBoxManage" -?
      Oracle VM VirtualBox Command Line Management Interface Version 5.2.6
      (C) 2005-2018 Oracle Corporation
      All rights reserved.
      
      Usage:
      
        VBoxManage [<general option>] <command>
      

      Michael

  11. Thanks for this.

    Note that there seems to be a syntax error with the backslashes!

    This address worked for me:

    ‘C:\Users\AdamD\VirtualBox VMs\Windows XP\Snapshots/{f9799e1b-249b-4238-994e-10fcd68a4fdf}.vhd’

    Note the backslash before the ID

  12. Thank you so much! Saved me a headache with snapshots in version 6.1. Not sure what I changed, but I certainly broke something since this is happening to every VM.

Leave a Reply