VirtualBox

Ticket #6314 (closed defect: fixed)

Opened 6 years ago

Last modified 2 months 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 6 years ago.
Compressed log file
log.2.zip Download (10.5 KB) - added by tsairo 6 years ago.
Log of this issue on WinXP.
VBox.log Download (57.4 KB) - added by chAlx 6 years ago.
VBox.log.3 Download (64.6 KB) - added by keith1y 5 years ago.
Startup Fails - XP guest on Mac
VBox _vm1.log Download (69.6 KB) - added by Pieter 5 years ago.
First VM containing having the issue
VBox_vm2.log Download (69.2 KB) - added by Pieter 5 years ago.
Second VM containing having the issue
VBox.2.log Download (70.1 KB) - added by wxl 3 years 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 2 years ago.
Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)
VBox.4.log Download (86.3 KB) - added by David Eisner 13 months ago.
log file post "Failed to load unit 'HGCM'" error.
VBox-log_VBoxStartup-log.txt Download (391.6 KB) - added by sraboy 11 months ago.
VBox.log followed by VBoxStartup.log at line 1415
vblogs.zip Download (83.9 KB) - added by Cris70 4 months ago.

Change History

Changed 6 years ago by rbbot

Compressed log file

comment:1 Changed 6 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 6 years ago by tsairo

Log of this issue on WinXP.

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

comment:7 Changed 5 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 5 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 5 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 5 years ago by keith1y

Startup Fails - XP guest on Mac

comment:10 Changed 5 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 5 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 5 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 5 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 5 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 5 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 5 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 5 years ago by Pieter

First VM containing having the issue

Changed 5 years ago by Pieter

Second VM containing having the issue

comment:17 Changed 5 years ago by yurivict

Confirming for 4.0.12.

comment:18 Changed 5 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 5 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 5 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 4 years 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 4 years 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 3 years 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 3 years 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 3 years 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 2 years 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 2 years ago by frank

  • Description modified (diff)

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

Changed 2 years ago by Thomas Bratt

Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

comment:27 Changed 2 years 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 2 years 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 2 years 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 2 years ago by TC78 (previous) (diff)

comment:30 Changed 14 months ago by Darker

Happens with Windows XP as well.

comment:31 Changed 13 months ago by David Eisner

I'm having the same problem with VirtualBox 4.3.26 r98988. Host OS is Win 7 64-bit, and guest OS is Fedora 20 64-bit. I will attach my VBox.log.

TC78's fix worked for me. All you need to do is, in the VirtualBox Manager GUI, right click on the VM and select "Discard saved state..." from the context menu.

Details from the error dialog:

Result Code: 	E_FAIL (0x80004005)
Component: 	Console
Interface: 	IConsole {8ab7c520-2442-4b66-8d74-4ff1e195d2b6}
Last edited 13 months ago by David Eisner (previous) (diff)

Changed 13 months ago by David Eisner

log file post "Failed to load unit 'HGCM'" error.

Changed 11 months ago by sraboy

VBox.log followed by VBoxStartup.log at line 1415

comment:32 Changed 10 months ago by daherrera

TC78's fix also worked for me. I also removed automount on the shared folders I had added which I suspect caused the problem. I will have to read up on how to add a shared folder properly so I don't get this error again

comment:33 Changed 10 months ago by sunlover

daherrera, does this error happen always when you try to restore a VM with a shared folder? Or it works sometimes?

Could you please describe how do you add a shared folder to reproduce the problem? So far I could not reproduce this error, so a step by step explanation would be helpful.

comment:34 Changed 7 months ago by umoeller

I have run into the same problem and I have been able to work around it.

Sunlover, here are steps to reproduce:

  1. Create a shared folder in a virtual machine. (In my case it was a Windows 7 VM on a Gentoo Linux host.)
  2. Have the VM running.
  3. Change the shared folder in the dialog while the VM is running.
  4. Close the VM window so the VM is in saved state.
  5. Delete the shared folder on the host so that the VM will not be able to find it any more.
  6. When restoring the VM, it failes with the "Failed to load unit HGCM" error message. The problem disappears after discarding the VM's saved state and removing the shared folder from the VM settings while the VM is powered off.

Hope this helps!

Cheers, Ulrich

Last edited 7 months ago by frank (previous) (diff)

comment:35 Changed 7 months ago by sunlover

I could not reproduce this, probably did something else because steps to reproduce are not precise :). A few questions for some steps:

  1. You used the GUI VM Settings dialog to create a shared folder? Is the VM running when the shared folder is added? If yes, did you create a 'Machine Folder' or a 'Transient Folder'?
  1. What exactly was changed? 'Folder Path', 'Folder Name', 'Read-only' etc?
  1. Do you mean that the host directory has been deleted?

Here when I restore a VM and the host directory for a shared folder does not exist, I get a message (GUI dialog) saying that, but the VM restores successfully.

Please clarify.

Thanks, Vitali

comment:36 Changed 4 months ago by Cris70

Got the same error today on VirtualBox 5.0.12 (on OpenSUSE Tumbleweed). Guest is Windows XP.

VB warns me about a problem with a shared folder with this message:

The shared folder 'Publish' could not be set up: Shared folder path '/home/cris/Devel/Magiuster/Stylo/publish' does not exist on the host.
The shared folder setup will not be complete. It is recommended to power down the virtual machine and fix the shared folder settings while the machine is not running.


ID Errore: 
BrokenSharedFolder
Gravità: 
Attenzione

However, the virtual machine isn't able to boot and fails a few seconds later with the infamous "Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)." message.

Recreating the missing path removed the first warning, but the vm still did not work with the same error message.

The xml looks good: nothing to fix. Removing the shared folder line will not work, both because the shared folder now exists (so it's not a problem now) and because I verified that the list of shared folders is saved in the snapshot file too (no editing possible there because it's binary).

Discarding the saved state worked.

I am attaching the log files as they were just after trying to start the vm after having recreated the missing shared folder.

Cris

Last edited 4 months ago by Cris70 (previous) (diff)

Changed 4 months ago by Cris70

comment:37 Changed 4 months ago by sunlover

Cris70, could you please write how to reproduce this step by step? So far no one provided the reproduction scenario and we were never able to reproduce the problem.

What kind of shared folder was it: Machine Folder or Transient Folder?

Thanks.

comment:38 Changed 3 months ago by exactamente

Got this bug too. I had shared folder (host ubuntu, guest win7). I deleted it from host (guest system was shut down, not paused), then run guest, it told me that the folder didnt excist, while guest was run I deleted shared folder from settings of my guest VM, then paused VM, then tried to run again, but...

Here is some workaround I found.

So I didnt want to loose the current state. These steps helped me:

  1. I restored the option of shared folder in *.vbox file:
    <SharedFolders>
      <SharedFolder name="%shared_folder_name%" hostPath="%shared_folder_path%" writable="false" autoMount="true"/>
    </SharedFolders>
    

NB: THE LATEST possible! It describes the current state, and all previous describe snapshots, so you can copy the string from there. The right path is: <VirtualBox> -> <Machine> -> <Hardware> -> <SharedFolders>

  1. Restored deleted folder at the host.
  2. Deleted *.vbox-prev
  3. PR0FIT!

comment:39 Changed 3 months ago by sunlover

exactamente, I tried to delete the host folder, start VM, delete the shared folder from the setting, save VM. Restore worked.

Please provide a bit more details: 1) Can you reproduce the "Failed to load HGCM" error after doing the steps which you described? 2) Did you have the VirtualBox Manager always running when you deleted the shared folder from the VM settings and saved/restored the VM? Or did you start the VM using "VirtualBox -startvm"?

comment:40 Changed 3 months ago by exactamente

Okay, some details here.

Host: Ubuntu 14.04.3 LTS x64 3.19.0-49-generic

Guest: Windows 7 Ultimate x86 6.1.7601 SP1 Build 7601

VirtualBox: Version 5.0.14 r105127 Guest Additions 5.0.12 r104815

So I describe what I did next, after "fixing" bug, posting my prev msg and then reading your question. All is about the same VM.


  1. Run VirtualBox GUI with toolbar icon, run VM using that GUI.

  1. Initial state:

https://habrastorage.org/files/692/f65/8ad/692f658add2c4914a89d88209f6a36ae.png


  1. Then create directory ~/test

  1. Add it as shared folder with GUI menus.

https://habrastorage.org/files/024/b1b/9f3/024b1b9f331449b8bccd685df9af2f1f.png


  1. Restarted guest from win start menu.

https://habrastorage.org/files/d1b/d8f/442/d1bd8f4421a642b0a8eb3603375e4f8f.png


  1. Deleted ~/test from host

https://habrastorage.org/files/14f/12b/d4c/14f12bd4caea4697b437ad4406daa0b6.png


  1. Shut down guest from win start menu.

  1. Started VM from GUI.

  1. Take shapshot.

https://habrastorage.org/files/168/af9/7df/168af97df4694a85986a5f469261b8ea.png


  1. Click Close window button, pick Save machine state.

  1. Restore VM from GUI.

  1. Get bug.

https://habrastorage.org/files/53e/a3a/2ab/53ea3a2ab1b342ac8e0b4afd50fd13c2.png

comment:41 Changed 3 months ago by exactamente

I think the problem that the deleted directory is set as shared folder in snapshot (even if already unset in current state). Maybe VBox is trying to check it while restoring the state. If you need I'll make some experiments at the weekend, eg delete all <SharedFolder> from *.vbox including those inside <Snapshots>, or anything else you ask.

comment:42 Changed 3 months ago by sunlover

Thanks a lot. Did you actually remove the 'test' shared folder from the VM settings, when you did steps from comment 40? If yes, at which step? I do not see it.

comment:43 Changed 3 months ago by exactamente

Oh, yes, I did! I forgot the key thing, so shame :) I deleted after step 9 and before 10 - that is what I was talking about in msg 41. And thats why restoring to snapshot could work for people, because shared folder is going back to settings.

comment:44 Changed 3 months ago by sunlover

exactamente, thank you!

I think I've reproduced the bug. The key is to remove a shared folder from the VM settings when the VM is running and the guest is using the folder, i.e. for example the folder is mapped to a drive letter in the guest.

How to trigger the bug:

1) In the VirtualBox Manager add a shared folder to the VM, and make sure that 'Auto-mount' is checked.

2) Start the VM and wait until the guest boots to desktop.

3) Use Devices/Shared Folders/Shared Folders Settings menu to open the settings dialog. Remove the shared folder there, click OK. If there is a message about broken shared folder, then also click OK.

4) Click Close window button, pick Save machine state.

5) Start the VM -> Failed to load unit 'HGCM'

It is not necessary to remove the host folder, but I think that this forced people to remove the corresponding shared folder when VM was running and helped to trigger the bug.

comment:45 Changed 3 months ago by exactamente

It is not necessary to remove the host folder, but I think that this forced people to remove the corresponding shared folder when VM was running and helped to trigger the bug.

And then people were going back to snapshots, so I thought the problem is about snapshots.

Could you reproduce my "bugfix" with manual adding of the shared folder to the configuration file?

PS I hope the bug is going to be totally fixed now :)

comment:46 Changed 3 months ago by sunlover

I did not try to reproduce the "bugfix", because I know that this is exactly what is needed. :)

The problem is that the saved state has a reference to the shared folder, but the VM settings do not have the folder. Adding the folder to the settings (manually editing the XML config) should fix it.

comment:47 Changed 3 months ago by exactamente

By the way, after adding shared folder to the running VM it doesnt appear as network location (connected disk). Is it a bug or a feature? Comparing to VMware, it disappoints.

comment:48 Changed 3 months ago by sunlover

It is a missing feature. The guest additions are lazy and "auto-mount" shared folders as drive letters at startup only.

Of course it is possible to go to Computer->Network->VBOXSVR and map the folder manually at runtime.

comment:49 Changed 2 months ago by sunlover

The HGCM error is fixed in VirtualBox 5.0.x r105568+ builds. See https://www.virtualbox.org/wiki/Testbuilds

comment:50 Changed 2 months ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fix is part of VBox 5.0.16.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use