小さい頃はエラ呼吸

いつのまにやら肺で呼吸をしています。


Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)のエラーがでる場合の対処方法

はじめに

VirtualBoxで一時停止状態だった仮想マシンを起動させる際に、共有フォルダのマウントが原因で、以下のエラーが発生することがあります。

Failed to load unit 'HGCM' (VERR_INVALID_PARAMETER)

この状態から仮想マシンを正常に起動させるには、/Users/ユーザ名/VirtualBox VMs/仮想マシン名配下にあるxxx.vbox-prevというファイルを編集してから起動すると良いようです。

xxx.vbox-prevの変更点

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.

VirtualBoxの定義ファイル(xxx.vbox-prev)を修正する必要があります。VirtualBoxの定義ファイルには、スナップショットのためのSharedFoldersタグがありますが、おそらくHardwareタグ配下のSharedFoldersタグが空になっています。
SharedFoldersタグをコピーして、空になっているSharedFoldersタグを修正して、再起動します。

<SharedFolders>
        <SharedFolder name="Downloads" hostPath="/Users/pjotr/Downloads" writable="true"/>
        <SharedFolder name="VMSharedFolders" hostPath="/Users/pjotr/VMSharedFolders" writable="true"/>
     </SharedFolders>
手動で共有フォルダを再度追加すると直ったという書き込みも

once I manually re-added the one shared folder I had active before saving then the snapshot loaded like nothing happened...

面倒な人向け

保存状態は良いからとにかく起動させたいという場合には、xxx.vbox-prevをリネームしてしまいましょう。エラーダイアログが表示されますが、起動はできるようになります。