Virtualbox: can’t remove / attach new hard disk
When i try to remove a disk in Virtualbox with this command:
1 |
# VBoxManage storageattach "myvm" --storagectl SATA --port 0 --device 0 --type hdd --medium none |
I got the following error
1 2 3 |
VBoxManage: error: The machine is not mutable or running (state is Saved) VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component SessionMachine, interface IMachine, callee nsISupports VBoxManage: error: Context: "DetachDevice(Bstr(pszCtl).raw(), port, device)" at line 403 of file VBoxManageStorageController.cpp |
And the fix is:
1 2 |
VBoxManage discardstate uuid VBoxManage discardstate 23036a87-de86-4bee-ad92-5eed022a13d9 |
Leave a Reply