VirtualBox

Opened 14 years ago

Last modified 5 years ago

#6314 reopened defect

Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER) on restoring from saved state — at Version 26

Reported by: Ravenous Bugblatter Beast Owned by:
Component: other Version: VirtualBox 3.1.4
Keywords: Cc:
Guest type: Windows Host type: Windows

Description (last modified by Frank Mehnert)

On restoring machines from a saved state, I regularly get the error:

Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

This occurs after the progress bar for the restore has reached 100%. It does not happen every time I try and restore a machine, but once it does happen, it will happen every time I try and restore that particular machine until I discard the saved state. Therefore, I suspect the problem is occurring while saving the state.

Both host and guest are Windows 7 64-bit. I have yet to experience this on other guest operating systems, but I have not used saved state on other guests as much as the Windows 7 ones, so that may be pure chance.

Change History (34)

by Ravenous Bugblatter Beast, 14 years ago

Attachment: log.zip added

Compressed log file

comment:1 by tsairo, 14 years ago

I'm getting the same message right now, trying to resume a saved machine state. The details say:

Result Code: E_FAIL (0x80004005) Component: Console Interface: IConsole {6375231a-c17c-464b-92cb-ae9e128d71c3}

Host is WinXP SP3, guest is WinXP SP2. Log attached.

by tsairo, 14 years ago

Attachment: log.2.zip added

Log of this issue on WinXP.

comment:2 by tsairo, 14 years ago

Hey, I just realized that I had set up a shared folder with the VM, but I had deleted the target folder on the host. Looking at the logs, this error seems to be related to the shared folder handling. Couldn't replicate the error just by creating another share, suspending, deleting folder and resuming, though, so there's something more to it.

in reply to:  2 ; comment:3 by simon marshall, 14 years ago

Replying to tsairo:

Hey, I just realized that I had set up a shared folder with the VM, but I had deleted the target folder on the host.

With VB-3.2.4 and a Solaris/x86 guest on a WinXP host, I have a very similar problem.

In my case, I created a shared folder with the name marshals. I decided I wanted it to point to a different host folder, so I deleted the old shared folder entry and added a new one with the same name. Bizarrely, whenever I remounted marshals, the guest could only see the old host folder. In the end, I had to give the new shared folder a different name before the guest could see the correct host folder. Subsequently, I saved the VM state.

Now I get the above HGCM error whenever I try to start the VM.

in reply to:  3 comment:4 by simon marshall, 14 years ago

Replying to marshals:

In my case, I created a shared folder with the name marshals. I decided I wanted it to point to a different host folder, so I deleted the old shared folder entry and added a new one with the same name. Bizarrely, whenever I remounted marshals, the guest could only see the old host folder.

fwiw, i raised this as http://www.virtualbox.org/ticket/7014.

comment:5 by Gilles, 14 years ago

with VirtualBox 3.2.6 Guest and Host OS are Windows XP A shorter way to reproduce the problem described :
VM created with a snapshot and a shared folder.
Start the VM at the snapshot point
Delete the shared folder
Close VM saving the current state
When restarting VM error occurs.

comment:6 by chAlx, 14 years ago

Same issue with v3.2.6 and v3.2.8 on Fedora 13 host with WindowsXP guest. Appeared after kernel update (and may be some shared folders adding/deleting because of bad sharing):

Failed to open a session for the virtual machine XP.
Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: Console
Interface: IConsole {6375231a-c17c-464b-92cb-ae9e128d71c3}

Log (full log attached):

00:00:04.145 HGCM: restoring [VBoxSharedFolders]
00:00:04.145 SharedFolders host service: connected, u32ClientID = 7
00:00:04.146 SharedFolders host service: loading state, u32ClientID = 7
00:00:04.146 AssertLogRel /home/vbox/vbox-3.2.8/src/VBox/Main/hgcm/HGCM.cpp(1227) static int HGCMService::LoadState(SSMHANDLE*): <NULL>
00:00:04.146 rc=VERR_INVALID_PARAMETER VBoxSharedFolders
00:00:04.146 SSM: LoadExec failed for 'HGCM' instance #0 (version 2, pass 0xffffffff): VERR_INVALID_PARAMETER
00:00:04.146 VMSetError: /home/vbox/vbox-3.2.8/src/VBox/VMM/SSM.cpp(7910) int ssmR3LoadExecV2(VM*, SSMHANDLE*); rc=VERR_INVALID_PARAMETER
00:00:04.146 VMSetError: Failed to load unit 'HGCM'
00:00:04.146 Changing the VM state from 'LOADING' to 'LOAD_FAILURE'.

by chAlx, 14 years ago

Attachment: VBox.log added

comment:7 by pjotr1977, 14 years ago

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

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):

<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 changed the XML file to:

<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>
     <...>

comment:8 by anonymous, 13 years ago

Host system is running Debian Squeeze x64. Performed actions:

  • Suspended Windows 2008 Server guest;
  • Upgraded VirtualBox 3.0.10 to 3.0.12 using official non-free .deb package;
  • Tried to restore VM's state (using VBoxManage and GUI), but failed.
Waiting for the VM to power on...
ERROR: Failed to load unit 'HGCM' (VERR_NOT_SUPPORTED)
Details: code NS_ERROR_FAILURE (0x80004005), component Console, interface IConsole, callee

VirtualBox is also running two other VMs (with Debian x64), they're restored fine.

comment:9 by Keith, 13 years ago

VirtualBox 4.0.10 Host Mac OS X (snow leopard) Guest Windows XP.

Details of error: Result Code: NS_ERROR_FAILURE (0x80004005) Component: Console Interface: IConsole {515e8e8d-f932-4d8e-9f32-79a52aead882}

The xml for the shared folders looks ok to me.

by Keith, 13 years ago

Attachment: VBox.log.3 added

Startup Fails - XP guest on Mac

comment:10 by Keith, 13 years ago

The only unusual thing about this guest is that I disabled the default audio driver in the guest prior to snapshotting

comment:11 by yurivict, 13 years ago

I just got the same error for vbox-4.0.10 while restoring Windows7 snapshot on FreeBSD host.

Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

comment:12 by yurivict, 13 years ago

This is also the case of poor error reporting. The message lacks details. It should say which parameter, what is the value set and why is it invalid. I think fixing error reporting mechanism will speed up the fix of this bug.

comment:13 by yurivict, 13 years ago

Unfortunately workaround suggested by pjotr1977 doesn't work in my case. I tried to do what he suggested, then tried to delete SharedFolder part completely. Still getting the same error.

Is there any workaround that works?

comment:14 by adam outler, 13 years ago

It's kinda rediculous that there's no warnings or descriptive detail... Not to mention that this bug is a year old. Because of this, I just toasted my last machine state and it did nothing to help.

To reproduce this problem:

  1. Share a folder with a client Using "Shared Folders"
  2. Close the Client machine and choose "Save the machine state"
  3. Delete the folder which was shared with the machine
  4. Start the machine which has a saved state
  5. Observe error 'HGCM'(VERR_INVALID_PARAMETER) when progress bar reaches 100%

Recommended fixes:

  1. HGCM error should be more descriptive. Show the missing folder to the user
  2. Let the Operating system handle it. Do not halt on this error.
  3. Auto-remove the share
  4. Ask the user how to handle it using the options above

Any of these recommended fixes will work. #4 seems the most professional, however it would also require the most work.

Network shares go down. To the Virtual client, these folders exist on a network. This should not automatically shut down the VM without a descriptive warning. Operating systems are more then capable of handling networking errors

workarounds:

  1. Delete the 0entry for the shared folder from the XML
  2. Recreate the folder

comment:15 by yurivict, 13 years ago

workarounds:

  1. Delete the 0entry for the shared folder from the XML

I deleted all SharedFolder sections from XML and it didn't help.

comment:16 by Pieter, 13 years ago

I have the same case here. I get this error through a remote ssh connection: 00:00:17.349 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={515e8e8d-f932-4d8e-9f32-79a52aead882} aComponent={Console} aText={Failed to load unit 'HGCM' (VERR_SSM_UNEXPECTED_DATA)}, preserve=false 00:00:17.349 Power up failed (vrc=VERR_SSM_UNEXPECTED_DATA, rc=NS_ERROR_FAILURE (0X80004005))

Here is my setup: Host = Mac OS X snow leopard (10.6.8) 64bit kernel Guest = Win2008R2 64bit

When I am in front of the Mac, the machine starts perfect. I can also save state without problems. While having a remote SSH connection open, I can resume the VM using the command: vboxmanage startvm “vm name” on the SSH connection. It works then. When I sleep or restart the Mac, create a new SSH and try the above command, I get the error every time. When I then go on the Mac and open Virtualbox (the app) and leave it sitting there. Go to the SSH and type in the same command, it then works. I go back to the Mac and close Virtualbox. Back on the SSH, I try the command again and get the error again.

I can reproduce this error and behavior on a different VM. It has the same host and guest OS’s (different VM definitions and guest OS content). See my second vm2 attachment.

A temporary workaround that I found was to disable the clipboard integration option on the VM definition. Unfortunately you will have to lose your VM state to change this.

by Pieter, 13 years ago

Attachment: VBox _vm1.log added

First VM containing having the issue

by Pieter, 13 years ago

Attachment: VBox_vm2.log added

Second VM containing having the issue

comment:17 by yurivict, 13 years ago

Confirming for 4.0.12.

comment:18 by yurivict, 13 years ago

In 4.1.0, first time I tried to boot the guest in question, it failed with the error "No error". The second and later times it worked. Not sure if the fix is intentional, or accidental.

comment:19 by Pieter, 13 years ago

I know my error (VERR_SSM_UNEXPECTED_DATA) I received is a different to the one in this ticket, but it shares a common behavior. Non the less, for anyone that is experiencing the same behavior, I found a solution to my issue. As noted above I have Mac OS X 10.6 as my host. On the host under System Preferences -> Security -> General tab -> Use secure virtual memory. Clear this option and restart. That seem to have solved my issue.

comment:20 by Steve Goodridge, 13 years ago

SOLVED - to solve the exact issue for me - I shut down Virtual-box and mounted the shared drive then restarted Virtual-box without a problem. or put another way - load the shared folder in the host then try restarting the client

comment:21 by OCLC, 12 years ago

It is NOT solved, it is just a workaround. Indeed, reconnecting the missing storage volume will make the "shared folder" available again and the VM will agree to start. However, absence of the storage volume should not prevent the VM to start!

BUG confirmed for version 4.2.0 r80737

comment:22 by Jesse Glick, 12 years ago

Happened to me in 4.1.2 (Linux host, XP guest) when restoring a snapshot that had a shared folder previously. (The host folder still exists.) Sufficed to select Machine » Discard Saved State and then ask to start VM again.

comment:23 by diegojancic, 11 years ago

Same problem here. Host is Ubuntu 12.04, client is Windows 2008 R2. VirtualBox version 4.1.12

Connecting the external HDD that was missing fixed the problem and I could restart the saved state. Changing the XML didn't work.

comment:24 by ananas, 11 years ago

My own case : VirtualBox 4.2.10 on Ubuntu 12.10, running a Win 7 virtual machine. VM was in Saved state and would not restart from Saved state.

I tried to modify the VirtualBox.xml file, but found no SharedFolders section in ithis file. Given up.

My solution : ask VirtualBox to forget the Saved state. Then I restarted the VM, which booted normally, as if it had just been shutdown normally. SOLVED !!

by Walter Lapchynski, 11 years ago

Attachment: VBox.2.log added

variant: HGCM VERR_NOT_SUPPORTED because failed to load XFIXES extension on shared clipboard. host: Kubuntu Precise running VBox 4.1.12. guest: Windows XP. now here's the trick: being physically in front of the machine is no problem. the problem lies in trying to start it in an Xsession remotely connected with RDP (no, not VRDE— I need access to the host, too). Remina or rdesktop clients, xrdp server if it matters. once i'm back in front of the host, no problems.

comment:25 by Thomas Bratt, 10 years ago

I get this error too with host Windows x64 4.3.4r91027 and guest Ubuntu x64 13.10.

Failed to open a session for the virtual machine Ubuntu.

Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER).

Result Code: E_FAIL (0x80004005)
Component: Console
Interface: IConsole {8ab7c520-2442-4b66-8d74-4ff1e195d2b6}

comment:26 by Frank Mehnert, 10 years ago

Description: modified (diff)

Thomas Bratt, without a VBox.log file we can't help you.

by Thomas Bratt, 10 years ago

Attachment: VBox.3.log added

Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use