Page 1 of 3

BUG: Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Posted: 25. Feb 2010, 21:38
by rbbot
I am encountering an error when I preform the following operations:

1. Snapshot a guest
2. Take a second snapshot as child of the first
3. Close the machine and save state
4. Delete the first snapshot
5. Restart the guest

The restore progress bar goes up to 100%, and then I get an error message:

Failed to start the virtual machine (name)
Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)
Result code: E_FAIL (0x80004005)
Component: Console
Interface: IConsole {6375231a-c17c-464b-92cb-ae9e128d71c3}

To restart the machine, I have to discard the saved state. The same error occurs if I attempt to restore the machine in headless mode using the command line.

I am running Version 3.1.4 r57640 and both host and guest are 64-bit Windows 7 machines and the additions have been installed. I have repeated this error with two different guests.

Re: BUG: Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Posted: 25. Feb 2010, 22:10
by dmcgraw
Can you post a log file please?

Re: BUG: Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Posted: 25. Feb 2010, 22:18
by rbbot
I hadn't noticed the log files before. From what I can see it looks like its something to do with restoring the shared folders?

Re: BUG: Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Posted: 25. Feb 2010, 23:38
by dmcgraw
Trying removing the shared folder and then starting it again.

Re: BUG: Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Posted: 25. Feb 2010, 23:47
by rbbot
I've discarded the state and restarted it normally so I can't replicate the problem until the next time the error occurs.

Re: BUG: Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Posted: 26. Feb 2010, 21:28
by rbbot
I've now got the machine back into a state where the error is occurring, but how do I remove the shared folder whilst the state is saved?

Re: BUG: Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Posted: 15. Jun 2010, 12:57
by marshals
rbbot wrote:I've now got the machine back into a state where the error is occurring, but how do I remove the shared folder whilst the state is saved?
Gah! This is exactly the same problem that I have. How do I remove the shared folder from the saved VM?

Re: BUG: Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Posted: 15. Jun 2010, 14:41
by sandervl
If you can reproduce this, then please open a ticket on our bug tracker. Thanks.

Re: BUG: Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Posted: 15. Jun 2010, 15:10
by marshals
sandervl wrote:If you can reproduce this, then please open a ticket on our bug tracker. Thanks.
I intended to try once I have my machine started from its saved state successfully. How can I do that?

I found a ticket (http://www.virtualbox.org/ticket/6314) that looks a lot like this problem. In there I explained what I had done, though of course I cannot be sure that repeating the steps would lead to either problem (the shared folder or the failure to restart). But in the meantime it might give someone a clue.

Re: BUG: Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Posted: 20. Jun 2010, 14:04
by V-Teq
Today this bug happened to me as well.

Steps to reproduce (using Fedora 12, VirtualBox 3.2.4):

Run WinXP in my VirtualBox.
Host drive "some_dvd.iso" from my HDD.
Save state of WinXP and turn off VirtualBox.
Make "some_dvd.iso" inaccessible.
Start VirtualBox and try to run WinXP -> "Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)."

Re: BUG: Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Posted: 21. Jun 2010, 10:54
by Lelik
If I do following steps I just see an error message (ID: DvdOrFloppyImageInaccessible) that the image file is inaccessible and execution continues. VBox 3.2.4

Re: BUG: Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Posted: 12. Aug 2010, 22:18
by JKyleOKC
I've just encountered this problem; I added three shared folders to a WinXP VM (host is Xubuntu 10.04 LTS) and then saved the state. When I went to start the VM again, up popped the "failed to load unitHGCM" message.

I've preserved the logs for both sessions and can upload them if desired. My VBox version is 3.2.8 r64453, just (re)installed yesterday after having to reformat the host system, with all VMs restored from full backups.

The affected VM contains all the tools I use for my database recovery service so it's essential that I get it working again ASAP. I can restore it from the backup copy, and lose only the work I did today, but would prefer to save today's work if possible. Would doing a VBoxManage clonehd help matters any, or would the HGCM failure affect that process also?

EDIT: I copied the .sav file to another directory for safekeeping, then did a "discard" of the saved snapshot, and re-started the VM. It came back up normally -- and my day's work was still there! I'm happy to know how to work around it if it happens again, but I look forward to the bug eventually getting fixed. However it's been around for so long, I don't plan to hold my breath while waiting...

WORKAROUND: Failed to load unit 'HGCM' (VERR_INVALID_PARAMET

Posted: 4. Nov 2010, 13:55
by pjotr1977
Discarding the snapshot is not needed :!:

You need to fix up your virtual box xml. There is a SharedFolders node for the snapshot, that probably contains the configured Shared Folders, but the SharedFolders node underneath the Hardware node is empty. If you copy the SharedFolders node content to the SharedFolders empty node and save the XML your machine will start again. You will also notice that the user interface will display the Shared Folders again.

In my case the virtual box xml contained the following bad config that produced the error Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER):

Code: Select all

<Snapshot uuid="{350bf11e-2100-437a-b01f-b2b7b2053a1e}" name="Test machine" timeStamp="2010-09-22T22:16:50Z" stateFile="Snapshots/{350bf11e-2100-437a-b01f-b2b7b2053a1e}.sav">
     <Hardware version="2">
     <....>
     <SharedFolders>
        <SharedFolder name="Downloads" hostPath="/Users/pjotr/Downloads" writable="true"/>
        <SharedFolder name="VMSharedFolders" hostPath="/Users/pjotr/VMSharedFolders" writable="true"/>
     </SharedFolders>
     <...>
<Hardware version="2">
<...>
   <SharedFolders />
<...>
Then I change the XML file to:

Code: Select all

<Snapshot uuid="{350bf11e-2100-437a-b01f-b2b7b2053a1e}" name="Test machine" timeStamp="2010-09-22T22:16:50Z" stateFile="Snapshots/{350bf11e-2100-437a-b01f-b2b7b2053a1e}.sav">
     <Hardware version="2">
     <....>
     <SharedFolders>
        <SharedFolder name="Downloads" hostPath="/Users/pjotr/Downloads" writable="true"/>
        <SharedFolder name="VMSharedFolders" hostPath="/Users/pjotr/VMSharedFolders" writable="true"/>
     </SharedFolders>
     <...>
<Hardware version="2">
        <...>
        <SharedFolders>
            <SharedFolder name="Downloads" hostPath="/Users/pjotr/Downloads" writable="true"/>
            <SharedFolder name="VMSharedFolders" hostPath="/Users/pjotr/VMSharedFolders" writable="true"/>
     </SharedFolders>
     <...>

Re: BUG: Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Posted: 18. Jan 2011, 06:10
by marcoski711
pjotr1977's fix did not work for me.

However, 'HGCM' issue started after removing a shared folder and adding two new ones, saving VM state, and then trying to re-start (vbox v3.2.12 r68302 on Mac OS Snow Leopard host, running Win XP guest), so I still think the bug is related to shared folders - his workaround may well work for others.

With pjotr1977's changes still in place, I took a new snapshot, then Discarded the saved state of the machine (NOT the snapshot), and it rebooted fine.

I wonder if by 'discard', JKyleOKC meant discarding the saved state of the machine, or Delete Snapshot (ctrl+shift+D). Doing the latter merges the snapshot file into it’s parent VDI file (snapshot or base disk), which could explain why he didn't lose any data (info from http://srackham.wordpress.com/2010/06/1 ... snapshots/ )

Re: BUG: Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Posted: 17. May 2011, 11:03
by yuval
I had a similar bug
I chose automatic mounting for a shared folder
I then log out and in, restarted, but did not see my folder mounted as I expected it to (I did not try to brows to /mnt/foldername)
I mounted the folder with sudo mount.vboxsf as suggested there http://blogs.oracle.com/tao/entry/virtu ... er_between
tried to fiddle with the xml .vbox file but on restarting the box it recreated the previous .vbox file and gave the same HGCM error.
I discarded the last snapshot and it loaded.
hope this bug will be rid off
yuval