問題
退出VM,再進入時,畫面顯示
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["modifyvm", "74e2a381-79e2-43c0-a75b-a3cec691babcdefg", "--natpf1", "delete", "ssh"]
Stderr: VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 529 of file VBoxManageModifyVM.cpp
原因
內存不足,vm冥想中
此時ssh也連接不上,reload也無法啓動
解決
通過virtualbox的管理工具關閉
管理者模式啓動Powershell
PS C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe controlvm 74e2a381-79e2-43c0-a75b-a3cec691babcdefg poweroff
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
vagrant up
可以正常重新啓動