VirtualBox

Ticket #6314 (new defect)

Opened 4 years ago

Last modified 3 days ago

Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER) on restoring from saved state

Reported by: rbbot Owned by:
Priority: major Component: other
Version: VirtualBox 3.1.4 Keywords:
Cc: Guest type: Windows
Host type: Windows

Description (last modified by frank) (diff)

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.

Attachments

log.zip Download (12.5 KB) - added by rbbot 4 years ago.
Compressed log file
log.2.zip Download (10.5 KB) - added by tsairo 4 years ago.
Log of this issue on WinXP.
VBox.log Download (57.4 KB) - added by chAlx 4 years ago.
VBox.log.3 Download (64.6 KB) - added by keith1y 3 years ago.
Startup Fails - XP guest on Mac
VBox _vm1.log Download (69.6 KB) - added by Pieter 3 years ago.
First VM containing having the issue
VBox_vm2.log Download (69.2 KB) - added by Pieter 3 years ago.
Second VM containing having the issue
VBox.2.log Download (70.1 KB) - added by wxl 12 months ago.
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.
VBox.3.log Download (99.5 KB) - added by Thomas Bratt 6 weeks ago.
Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

Change History

Changed 4 years ago by rbbot

Compressed log file

comment:1 Changed 4 years ago by tsairo

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.

Changed 4 years ago by tsairo

Log of this issue on WinXP.

comment:2 follow-up: ↓ 3 Changed 4 years ago by 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. 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.

comment:3 in reply to: ↑ 2 ; follow-up: ↓ 4 Changed 4 years ago by marshals

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.

comment:4 in reply to: ↑ 3 Changed 4 years ago by marshals

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 Changed 4 years ago by gillesg

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 Changed 4 years ago by chAlx

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

Changed 4 years ago by chAlx

comment:7 Changed 3 years ago by pjotr1977

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 Changed 3 years ago by john.doe

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 Changed 3 years ago by keith1y

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.

Changed 3 years ago by keith1y

Startup Fails - XP guest on Mac

comment:10 Changed 3 years ago by keith1y

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

comment:11 Changed 3 years ago by yurivict

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 Changed 3 years ago by yurivict

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 Changed 3 years ago by yurivict

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 Changed 3 years ago by adamoutler

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 Changed 3 years ago by yurivict

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 Changed 3 years ago by Pieter

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.

Changed 3 years ago by Pieter

First VM containing having the issue

Changed 3 years ago by Pieter

Second VM containing having the issue

comment:17 Changed 3 years ago by yurivict

Confirming for 4.0.12.

comment:18 Changed 3 years ago by yurivict

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 Changed 3 years ago by Pieter

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 Changed 2 years ago by SEO-Adelaide

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 Changed 18 months ago by OCLC

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 Changed 18 months ago by jglick

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 Changed 16 months ago by diegojancic

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 Changed 13 months ago by ananas

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

Changed 12 months ago by wxl

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 Changed 4 months ago by Thomas Bratt

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 Changed 4 months ago by frank

  • Description modified (diff)

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

Changed 6 weeks ago by Thomas Bratt

Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

comment:27 Changed 6 weeks ago by Thomas Bratt

The failure occurs every time on my host at the moment. I've uploaded a log file, as requested.

comment:28 Changed 6 weeks ago by sunlover

Thomas, this log is from VBox 4.3.4. A similar problem with shared folders has been fixed in newer VBox releases. Please install VBox 4.3.8 and try to start the VM with it.

comment:29 Changed 3 days ago by TC78

I had the same error, when trying to start my guest OS (Windows 8.1). Here is a part of my log.

00:00:06.718480 HGCM: restoring [VBoxSharedFolders]
00:00:06.718539 AssertLogRel /Users/vbox/tinderbox/4.3-mac-rel/src/VBox/Main/src-client/HGCM.cpp(1295) static int HGCMService::LoadState(SSMHANDLE*): <NULL>
00:00:06.718543 rc=VERR_INVALID_PARAMETER VBoxSharedFolders
00:00:06.718550 SSM: LoadExec failed for 'HGCM' instance #0 (version 2, pass 0xffffffff): VERR_INVALID_PARAMETER
00:00:06.718556 VMSetError: /Users/vbox/tinderbox/4.3-mac-rel/src/VBox/VMM/VMMR3/SSM.cpp(8349) int ssmR3LoadExecV2(VM*, SSMHANDLE*); rc=VERR_INVALID_PARAMETER
00:00:06.718557 VMSetError: Failed to load unit 'HGCM'
00:00:06.718563 Releasing keys...
00:00:06.718637 Changing the VM state from 'LOADING' to 'LOAD_FAILURE'.
00:00:06.718750 Changing the VM state from 'LOAD_FAILURE' to 'POWERING_OFF'.

HGMC tried to restore the shared folders, but failed loading "/Users/vbox/tinderbox/ ..." since there is no such resource on my host (Mac OS X 10.9.2).

I was unable start the saved session. I got the error every time. I don't know why this happened, neither how to fix it. But I managed to work around this. In VirtualBox Manager it wasn't possible to power off the machine, since it was in saved state.

 http://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvm describes the action discard state. It is intended to discard the state of a not running VM. But I called this action (using a shell) on my saved state VM. The next time, when I started the VirtualBox Manager, the VM was powered off. Starting the VM worked and Windows 8.1 started properly - there was only one warning that a shared folder wasn't restored.

This did it for me and I think it's a quite simple work-around.

Last edited 3 days ago by TC78 (previous) (diff)
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use