Hello,

let me do this step by step

I created a hashicorp/precise64 box:

"precise64_default_1434759825291_71417" {480ea0df-8b9b-4884-8864-a9ff072412f7}


VBoxManage showvminfo 480ea0df-8b9b-4884-8864-a9ff072412f7


So in my particular case, we have:

Storage Controller Name (0):            IDE Controller

IDE Controller (0, 0): Empty
IDE Controller (1, 0): Empty


Let me add a disk so can match yours:
vagrant-virtualbox-box.vmdk

Create disk:

VBoxManage createhd --filename vagrant-virtualbox-box.vmdk --size 1024
--format VMDK
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100
Disk image created. UUID: 790cc92e-c265-480e-bb8d-e02d53a580ac

Attach the disk to the controller:

VBoxManage storageattach 480ea0df-8b9b-4884-8864-a9ff072412f7
--storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium
vagrant-virtualbox-box.vmdk

Now are similar:

IDE Controller (0, 0):
/Volumes/hd1/Dropbox/vagrant_mini/precise64/vagrant-virtualbox-box.vmdk
(UUID: 790cc92e-c265-480e-bb8d-e02d53a580ac)
IDE Controller (1, 0): Empty

the IDE controller is a dual controller with 2 ports

so we can have 4 devices

let's add a dvd drive to the first controller on the 2nd port

VBoxManage storageattach 480ea0df-8b9b-4884-8864-a9ff072412f7
--storagectl "IDE Controller" --port 1 --device 0 --type dvddrive
--medium emptydrive

IDE Controller (0, 0):
/Volumes/hd1/Dropbox/vagrant_mini/precise64/vagrant-virtualbox-box.vmdk
(UUID: 790cc92e-c265-480e-bb8d-e02d53a580ac)

IDE Controller (1, 0): Empty

ok, so I think I know what happen in your case:


--medium none

medium none is to tell the VirtualBox to delete that dvd

Check:

VBoxManage storageattach 480ea0df-8b9b-4884-8864-a9ff072412f7
--storagectl "IDE Controller" --port 1 --device 0 --type dvddrive
--medium none



IDE Controller (0, 0):
/Volumes/hd1/Dropbox/vagrant_mini/precise64/vagrant-virtualbox-box.vmdk
(UUID: 790cc92e-c265-480e-bb8d-e02d53a580ac)

SATA Controller (0, 0): /Users/alvarom/VirtualBox
VMs/precise64_default_1434759825291_71417/box-disk1.vmdk (UUID:
eee38c7e-cca4-4781-9afd-5f5d57b8cd02)


So, use port 1, device 0, medium emptydrive

Alvaro.

On Sat, Jun 20, 2015 at 2:59 AM, Vince Skahan <[email protected]> wrote:
> On Thursday, June 18, 2015 at 7:54:33 PM UTC-7, Alvaro Miranda Aguilera
> wrote:
>>
>> have you tested those commands? do they work?
>>
>
> Yes I tested, that's how I got the error transcript showing it did 'not'
> work.
>
>>
>>
>> VBoxManage showvminfo <id>
>>
>> see if there is a IDE controller and the correct tname, if not, you
>> need to create one.
>
>
> yeah, that was kind of the question - 'how' do I do that from the
> commandline and from a Vagrantfile ?
>
> /cygdrive/c/Program\ Files/Oracle/VirtualBox/VBoxManage storageattach
> bc192c5a-49f8-4db5-98d0-41096c066f40 --storagectl "IDE Controller" --port 1
> --device 0 --type dvddrive --medium none
> 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
>
>
> If there is 'no' CD/DVD device there, I get the following in showvminfo:
>
> Storage Controller Name (0):            IDE Controller
> Storage Controller Type (0):            PIIX4
> Storage Controller Instance Number (0): 0
> Storage Controller Max Port Count (0):  2
> Storage Controller Port Count (0):      2
> Storage Controller Bootable (0):        on
> IDE Controller (0, 0): C:\Users\vds\VirtualBox
> VMs\c7-from-upstream_default_1434655611057_90570\vagrant-virtualbox-box.vmdk
> (UUID: c39ade0e-fc99-43f4-91a1-f9c2cbad7f52)
>
>
>
> If I use the gui to manually add the CD/DVD device, showvminfo shows the the
> following:
>
> Storage Controller Name (0):            IDE Controller
> Storage Controller Type (0):            PIIX4
> Storage Controller Instance Number (0): 0
> Storage Controller Max Port Count (0):  2
> Storage Controller Port Count (0):      2
> Storage Controller Bootable (0):        on
> IDE Controller (0, 0): C:\Users\vds\VirtualBox
> VMs\c7-from-upstream_default_1434655611057_90570\vagrant-virtualbox-box.vmdk
> (UUID: c39ade0e-fc99-43f4-91a1-f9c2cbad7f52)
> IDE Controller (0, 1): Empty (ejected)
>
>
> So how do I add the controller successfully without using the Virtual Box
> gui ?
>
>
> If it helps, here's the whole vminfo as-is, with 'no' CD/DVD device defined:
>
> $ /cygdrive/c/Program\ Files/Oracle/VirtualBox/VBoxManage showvminfo
> c7-from-upstream_default_1434655611057_90570
> Name:            c7-from-upstream_default_1434655611057_90570
> Groups:          /
> Guest OS:        Red Hat (64 bit)
> UUID:            bc192c5a-49f8-4db5-98d0-41096c066f40
> Config file:     C:\Users\vds\VirtualBox
> VMs\c7-from-upstream_default_1434655611057_90570\c7-from-upstream_default_1434655611057_90570.vbox
> Snapshot folder: C:\Users\vds\VirtualBox
> VMs\c7-from-upstream_default_1434655611057_90570\Snapshots
> Log folder:      C:\Users\vds\VirtualBox
> VMs\c7-from-upstream_default_1434655611057_90570\Logs
> Hardware UUID:   bc192c5a-49f8-4db5-98d0-41096c066f40
> Memory size:     1024MB
> Page Fusion:     off
> VRAM size:       12MB
> CPU exec cap:    100%
> HPET:            off
> Chipset:         piix3
> Firmware:        BIOS
> Number of CPUs:  1
> PAE:             on
> Long Mode:       on
> Synthetic CPU:   off
> CPUID overrides: None
> Boot menu mode:  message and menu
> Boot Device (1): Floppy
> Boot Device (2): DVD
> Boot Device (3): HardDisk
> Boot Device (4): Not Assigned
> ACPI:            on
> IOAPIC:          on
> Time offset:     0ms
> RTC:             UTC
> Hardw. virt.ext: on
> Nested Paging:   on
> Large Pages:     on
> VT-x VPID:       on
> VT-x unr. exec.: on
> State:           powered off (since 2015-06-19T14:44:59.652000000)
> Monitor count:   1
> 3D Acceleration: off
> 2D Video Acceleration: off
> Teleporter Enabled: off
> Teleporter Port: 0
> Teleporter Address:
> Teleporter Password:
> Tracing Enabled: off
> Allow Tracing to Access VM: off
> Tracing Configuration:
> Autostart Enabled: off
> Autostart Delay: 0
> Default Frontend:
> Storage Controller Name (0):            IDE Controller
> Storage Controller Type (0):            PIIX4
> Storage Controller Instance Number (0): 0
> Storage Controller Max Port Count (0):  2
> Storage Controller Port Count (0):      2
> Storage Controller Bootable (0):        on
> IDE Controller (0, 0): C:\Users\vds\VirtualBox
> VMs\c7-from-upstream_default_1434655611057_90570\vagrant-virtualbox-box.vmdk
> (UUID: c39ade0e-fc99-43f4-91a1-f9c2cbad7f52)
> NIC 1:           MAC: 525400730FB1, Attachment: NAT, Cable connected: on,
> Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot
> priority: 0, Promisc Policy: deny, Bandwidth group: none
> NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window
> (send:64, receive: 64)
> NIC 1 Rule(0):   name = ssh, protocol = tcp, host ip = 127.0.0.1, host port
> = 2222, guest ip = , guest port = 22
> NIC 2:           disabled
> NIC 3:           disabled
> NIC 4:           disabled
> NIC 5:           disabled
> NIC 6:           disabled
> NIC 7:           disabled
> NIC 8:           disabled
> Pointing Device: PS/2 Mouse
> Keyboard Device: PS/2 Keyboard
> UART 1:          disabled
> UART 2:          disabled
> LPT 1:           disabled
> LPT 2:           disabled
> Audio:           disabled
> Clipboard Mode:  disabled
> Drag'n'drop Mode: disabled
> VRDE:            disabled
> USB:             disabled
> EHCI:            disabled
>
> USB Device Filters:
>
> <none>
>
> Available remote USB devices:
>
> <none>
>
> Currently Attached USB Devices:
>
> <none>
>
> Bandwidth groups:  <none>
>
> Shared folders:  <none>
>
> VRDE Connection:    not active
> Clients so far:     0
>
> Video capturing:    not active
> Capture screens:    0
> Capture file:       C:\Users\vds\VirtualBox
> VMs\c7-from-upstream_default_1434655611057_90570\c7-from-upstream_default_1434655611057_90570.webm
> Capture dimensions: 1024x768
> Capture rate:       512 kbps
> Capture FPS:        25
>
> Guest:
>
> Configured memory balloon size:      0 MB
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to