Here's what I tried to add:
vb.customize "pre-boot", [
"storageattach", :id,
"--storagectl", "IDE Controller",
"--port", "1",
"--device", "0",
"--type", "dvddrive",
"--medium", "none",
]
When I try to 'vagrant up' it blows up immediately, complaining:
A customization command failed:
["storageattach", :id, "--storagectl", "IDE Controller", "--port", "1", "--device", "0", "--type", "dvddrive", "--medium", "none"]
The following error was experienced:
#<Vagrant::Errors::VBoxManageError: There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["storageattach", "1c4310b6-d5ef-4e79-bc34-ef6dcdb32b69", "--storagectl", "IDE Controller", "--port", "1", "--device", "0", "--type", "dvddrive", "--medium", "none"]
Stderr: VBoxManage.exe: error: No storage device attached to device slot 0 on port 1 of controller 'IDE Controller'
VBoxManage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "DetachDevice(Bstr(pszCtl).raw(), port, device)" at line 381 of file VBoxManageStorageController.cpp
>
Please fix this customization and try again.
I'd love to fix it. Any pointers to help decipher what it wants ?
Any help much appreciated....
have you tested those commands? do they work?
VBoxManage showvminfo <id>
see if there is a IDE controller and the correct tname, if not, you
need to create one.
ok, so I think I know what happen in your case:
--medium none
medium none is to tell the VirtualBox to delete that dvd
So, use port 1, device 0, medium emptydrive
yeah, i hit the same issue once, and wasn't easy to find in the documentation..
I end googling a lot, and had to read some bugs
if my example looks simple and works because I did it once before so I
was aware of the medium emptydrive vs none