I have created a VM using vagrant and tried to insert a cd, when realized that there is no such device to read it installed.
An option would be to go to my provider UI and through settings add what I need.
I want to know if there is any way to insert this setting (add a cdrom device to VM) into the vagrant file.
My provider is VirtualBox.
>>UPDATE
Mixing info from here and here, and extending some code example already existing in Vagrantfile I came up with
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
...
...
config.vm.provider :virtualbox do |vb|
vb.customize ["storagectl", :id, "--name", "IDEController", "--add", "ide"]
vb.customize ["storageattach", :id, "--storagectl", "IDEController", "--port", "0", "--device", "0", "--type", "dvddrive", "--medium", "none"]
vb.customize ["modifyvm", :id, "--boot1", "disk", "--boot2", "dvd"]
end
...
...
end
in the Vagrantfile.
The problem is that now, when attempting to perform vagrant reload
, I get
VBoxManage.exe: error: No storage device attached to device slot 0 on port 0