環境
- ホストOS: Windows11 Pro(22H2)
- ゲストOS: Xubuntu 18.04(4.18.0-16-generic)
- VirtualBox 7.0.6 r155176 (Qt5.15.2)
- Vagrant 2.3.4
何が起きたのか?
vagrantコマンドでゲストOSを起動できなくなりました。
何がきかっけだったのかは、分かりません。
PS C:\vagrant\vagrant-bash-example> vagrant up
Bringing machine 'example' up with 'virtualbox' provider...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["sharedfolder", "remove", "c54b927b-0d42-48d3-8e44-b480b941c4cd", "--name", "vagrant_data"]
Stderr: VBoxManage.exe: error: The machine is not mutable or running (state is Aborted-Saved)
VBoxManage.exe: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "RemoveSharedFolder(Bstr(pszName).raw())" at line 1777 of file VBoxManageMisc.cpp
state is Aborted-Saved
とあるので、保存されずに終了してしまったようです。
VirtualBoxから直接起動することもできませんでした。
なお、イメージには"Aborted-Saved"と表示されていました。
どうやって解決したのか?
VirtualBoxのイメージを右クリックしてコンテキストメニュを開き、「保存状態を破棄」を選択すると、ゲストOSが起動できました。
※キャプチャ画像は通常時のコンテキストメニュなので、「保存状態を破棄」がグレーアウトされています。
気になったこと
- 「保存状態を破棄」したときの動きを、公式サイトで確認したいが、見つからなかった。
- vagrantコマンドで「保存状態を破棄」に相当することは実行できるのか?
参考にしたサイト