how to pass /dev/cd0 through to vbox guest

Status
Not open for further replies.

jaaassh

Dabbler
Joined
Apr 23, 2015
Messages
49
I'm not seeing the ability to pass my optical drive through to a guest.

I also tried attaching it directly with VBoxManage, but i'm not getting very far. Has anyone been able to do this?

root@virtualbox:~ # su vbox

$ VBoxManage storageattach win7 --device 0 --port 0 --type dvddrive --storagectl IDE --medium /dev/cd0
VBoxManage: error: The medium '/dev/cd0' can't be used as the requested device type
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Medium, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp
VBoxManage: error: Invalid UUID or filename "/dev/cd0"

$ ls -l /dev/cd0
crwxrwxrwx 1 root operator 0x78 Apr 24 00:48 /dev/cd0

$ file /dev/cd0
/dev/cd0: character special

$ mount
boxes/virtualbox on / (zfs, local, nfsv4acls)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I haven't tried to do this. I'm pretty confident in saying a few things about this:

1. FreeNAS doesn't really expect you to use a CD-ROM, except for initial installation. So there are zero provisions in the WebGUI and no code in the standard WebGUI scripts that invoke the CD-ROM device.
2. I didn't test the CD-ROM drive in Virtualbox. Since it may or may not have all the required drivers and other code to make the CD-ROM drive work with FreeNAS installed, there was no expectation it would even work, so I didn't bother trying.
3. You'd be the first to make this work as far as I know, if you got it to work.
 

jaaassh

Dabbler
Joined
Apr 23, 2015
Messages
49
Fairly new to BSD in general, so not sure if there are other things I can check. I though I'd just try mounting the drive in freenas (forget vbox):

[root@freenas] ~# mount_cd9660 /dev/cd0 /media/cdrom
mount_cd9660: /dev/cd0: Invalid argument

...which lead me to see if there are any traces of the cd drive in dmesg

[root@freenas] ~# dmesg | grep cd
[root@freenas] ~#

..so at this point with @cyberjock's comments about missing drivers, i'm not sure where or what /dev/cd0 actually is, if anything.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I would jump in IRC and see if anyone knows. I'm working right now, so it's not a good time for me to try this out (I don't have a CDROM I could use in my server unfortunately).
 
Status
Not open for further replies.
Top