4.0.0: Associate Host SATA DVD to Guest OS?

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
virtualcat
Posts: 8
Joined: 24. Dec 2010, 04:44
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: 64-bit: Win7, Ubuntu 10.10, Fedora 14

4.0.0: Associate Host SATA DVD to Guest OS?

Post by virtualcat »

Host: Snow Leopard 64-bit, 10.6.5
Guest: Ubuntu 10.10 64-bit (ubuntu10)
(Both OS natively utilize the SATA DVD)

Goal: Want guest access to the internal host SATA DVD drive.

Challenge: After SATA DVD device added on Port 1 (guest storage), it does not recognize host DVD device.

Known: Host DVD drive is /dev/disk2. Ran diskutil info disk2, revealed host dvd drive name as "SAMSUNG DVDWBD SH-B083L"
The following is the manual entry for VBoxManage storageattach from pp. 120-1. Have tried several unproductive variations of the following argument:

Medium
“host:<drive>“: For a virtual DVD or floppy drive only, this connects the given device
slot to the specified DVD or floppy drive on the host computer.

Code: Select all

VBoxManage storageattach ubuntu10 --storagectl 'SATA Controller' --port 1 --device 0 --type dvddrive \
--type dvddrive --medium host:"SAMSUNG DVDWBD SH-B083L" --passthrough on
Error: VBoxManage: error: Invalid host DVD drive name "SAMSUNG DVDWBD SH-B083L"

Question: What is the correct usage for the --media entry that will achieve goal?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: 4.0.0: Associate Host SATA DVD to Guest OS?

Post by Sasquatch »

Code: Select all

VBoxManage storageattach    <uuid|vmname>
                            --storagectl <name>
                            --port <number>
                            --device <number>
                            [--type dvddrive|hdd|fdd]
                            [--medium none|emptydrive|
                                      <uuid>|<filename>|host:<drive>|iscsi]
That's the code you want to use. That's fine, but you have to give the device name as hardware listing, not the actual name of the drive you bought. For all it cares it's called "el cheapo break after a year just outside warranty", but is listed on the Host as /dev/sr0. Or something like that. No idea how Mac OSX calls it's hardware devices. Linux calls it a physical CD drive like that.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
virtualcat
Posts: 8
Joined: 24. Dec 2010, 04:44
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: 64-bit: Win7, Ubuntu 10.10, Fedora 14

Re: 4.0.0: Associate Host SATA DVD to Guest OS?

Post by virtualcat »

Thank you for the punctual reply, Sasquatch.

The obvious Snow Leopard devices have not worked in the --medium host:<device> argument. Also tried the raw device (e.g., /dev/rdisk2) without success. Good thing I don't give up. Will post back here if I can get it to work.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: 4.0.0: Associate Host SATA DVD to Guest OS?

Post by Sasquatch »

I've read somewhere that the disc needs to be mounted on the Host before you can use it on the Guest. Is that the case?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
virtualcat
Posts: 8
Joined: 24. Dec 2010, 04:44
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: 64-bit: Win7, Ubuntu 10.10, Fedora 14

Re: 4.0.0: Associate Host SATA DVD to Guest OS?

Post by virtualcat »

All efforts on this reply are with a mounted (disk inserted) internal host SATA DVD drive.
Despite all the time invested, still cannot tease VB4 into recognizing the above device in VBoxManage.
Variations for device name or number in the --medium host:<device> syntax simply blow up VBoxManage.

Ironically, connecting an external USB DVD player, it is automatically detected from within VB4 in guest settings->storage and for either (IDE,SATA) controller, a right mouse-button click on the CD icon shows the external player name as selectable. Absolutely no command-line mischief needed to achieve this functionality.

So what have I done so far?

1. Downloaded the VB4 OSE source code. In VBoxManageStorageConntroller.cpp, isolated the C++ code in lines 434 - 455 that parse the --medium operator and produce the VBoxManage error message. Great code abstraction. No joy.

2. Discovered an entry in a older VB2 manual that indicated that setting the VBOX_CDROM environment variable to the device would force VB to by-pass all other checks. Tried this. No love. Probably IOKIT dominates in OS X.

3. Tried spoofing VB4 with different device names for the internal host DVD. Tried cdrom, cdrom0, cdrom1, sr0, and sr1. Both as symlinks and actual block devices from mknod(8). Default group is operator. Also added group cdrom as test. Default permissions were br--r----- (440). Tried this as brw-rw---- (660). No actions here resolved internal host DVD access in VB4.

4. Web has been no help due to the recent VB4 release and its new (!!) support for host SATA CDROM/DVD devices.

Have hit the wall here for ideas on internal SATA host DVD access.

Inserting a disk into this internal device should work just like the USB DVD mount behavior above. Bring back the
passthrough on/off button in the settings->storage controller section from VB3.

One should not have to reproduce the works of Augustin Cauchy and Bernhard Riemann to solve --medium host:<device>, or equally worse, step trace the C++ code through a debugger to find the correct argument value.

New key features should have real world examples to reinforce the Backus-Naur command-line symbolism in VB4 docs. Show us the correct argument for the --medium host:<device>.

I should be on Oracle's pay roll for the time spent. Lol.
ChipMcK
Volunteer
Posts: 1095
Joined: 20. May 2009, 02:17
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, OSX
Location: U S of A

Re: 4.0.0: Associate Host SATA DVD to Guest OS?

Post by ChipMcK »

Did you try the GUI?
Settings --> Storage --> Add IDE Controller --> Add CD/DVD Device
Good Holidays
virtualcat
Posts: 8
Joined: 24. Dec 2010, 04:44
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: 64-bit: Win7, Ubuntu 10.10, Fedora 14

Re: 4.0.0: Associate Host SATA DVD to Guest OS?

Post by virtualcat »

ChipMcK wrote:Did you try the GUI?
Settings --> Storage --> Add IDE Controller --> Add CD/DVD Device
Good Holidays
First thing I tried on the guest IDE and SATA controllers. Had to add the SATA CD/DVD device to the controller.
In either case, in the GUI, I am presented with three selection choices in the guest settings->Storage dialog->Controller->CD/DVD(Empty)
  • 1. Choose a virtual CD/DVD disk file...
    • a. You can navigate the file system looking for an .iso
      b. Selecting the mounted CD/DVD provides more of (a)
    2. Name of the last accessed .iso file
    3. Remove disk from virtual drive (unselectable)
From an earlier post, if you mount an external USB CD/DVD device, you will see a fourth choice of selecting that device on both controllers. Precisely how the SATA device should work.

The internal SATA CD/DVD is a Samsung Blu-ray writer. Insert a regular DVD on the host, and it automatically plays (Snow Leopard 10.6.5 DVD Player).
ChipMcK
Volunteer
Posts: 1095
Joined: 20. May 2009, 02:17
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, OSX
Location: U S of A

Re: 4.0.0: Associate Host SATA DVD to Guest OS?

Post by ChipMcK »

Using the IDE Controller, I have the option to attach the Host Drive.
Good Holidays
virtualcat
Posts: 8
Joined: 24. Dec 2010, 04:44
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: 64-bit: Win7, Ubuntu 10.10, Fedora 14

Re: 4.0.0: Associate Host SATA DVD to Guest OS?

Post by virtualcat »

ChipMcK wrote:Using the IDE Controller, I have the option to attach the Host Drive.
Good Holidays
When you run System Profiler, does your host CD/DVD drive appear in the Serial-ATA category?

Are you still running Leopard (10.5.x) as your host OS, or are you now current with Snow Leopard?
ChipMcK
Volunteer
Posts: 1095
Joined: 20. May 2009, 02:17
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, OSX
Location: U S of A

Re: 4.0.0: Associate Host SATA DVD to Guest OS?

Post by ChipMcK »

SL .5
and the Profiler shows an internal drive
and as the manual states the internal cd/dvd drive is simulated as virtual IDE cd/dvd
Post Reply