Host DVD Drive unavailable

Discussions related to using VirtualBox on Solaris hosts.
Post Reply
rreed
Posts: 5
Joined: 22. Jul 2010, 20:14
Primary OS: Solaris
VBox Version: OSE other
Guest OSses: WindowsXP

Host DVD Drive unavailable

Post by rreed »

Hello I am running VirtualBox 3.1.4 with Solaris 10 u8 as the host OS and Windows XP as the guest OS.

My issue is that I cannot get VirtualBox to display the host DVD drive as an available storage device unless there is a disc in the drive and the volume on that disc is mounted. My ultimate goal is to be able to burn discs in the guest OS (WinXP) using Nero.
I cannot enable passthrough because I never get the option to use the host drive unless there is already a disc in the drive and that disc has been mounted.
I have tried running both as a regular user and as root but neither one works.

VolFS is running and it mounts discs to '/vol/dev/dsk/c1t0d0/<disc name>' where <disc name> is the title of the volume on the disc. The path '/vol/dev/dsk/aliases/cdrom0' (later in the post) is just a a link to '/vol/dev/dsk/c1t0d0/'.

I have also tried just selecting "Empty" as the stroage medium but the passthrough option is unchecked and greyed out. When I boot into the Guest OS the DVD drive shows up but neither WindowsXP nor Nero detect that it is a CD/DVD burner.

I thought that I might be able to force VirtualBox to do what I wanted by using the VBoxManage command and its arguments but that didn't work either. Here's what I have tried so far tried:

I Named the storage controller 'Windows':
#VBoxManage storagectl Windows --add ide --controller PIIX4

Here are the storageattach commands that I have tried:
(The VDI is also named 'Windows', sorry if it causes confusion):

1) Case 1: Medium = Empty.
#VBoxManage storageattach Windows --storagectl Windows --port 1 --device 1 --type dvddrive -- medium empty --passthrough on

This gives me an optical drive in the guest OS but it is empty and doesn't recognize a blank disc if I insert it. Also if I look at the XML log file for the VDI it shows that passthrough is off.
2) Case 2: Medium = file path, no disk or blank disc in drive.
#VBoxManage storageattach Windows --storagectl Windows --port 1 --device 1 --type dvddrive -- medium /vol/dev/aliases/cdrom0 --passthrough on

This gives me the following error when I start the VDI :
ERROR: Could not open the medium '/vol/dev/dsk/aliases/cdrom0'.
VMDK: error reading the magic number in '/vol/dev/dsk/aliases/cdrom0' (VERR_INVALID_PARAMETER)
Details: code NS_ERROR_FAILURE (0x80004005), component Medium, interface IMedium, callee nsIsupports
Context: "Open DVDImage(Bstr(pszMedium), empty UUID, dvdMedium.asOutParam()) at line 489 of file VBoxManageStorageController.cpp
error: Invalid UUID or filename.
3) Case 3: Medium = file path pointing to mounted disc with files
#VBoxManage storageattach Windows --storagectl Windows --port 1 --device 1 --type dvddrive -- medium /vol/dev/aliases/cdrom0 --passthrough on

This gives me an optical drive in the guest OS and I can access the files on the disc but Windows & Nero don't recognize the drive as a burner so I cannot burn discs.
I looked at VBox's behavior on other host OSes (OS X, Ubuntu 9, WindowsXP) and each of them will allow me to select the host DVD drive in the storage settings without having to mount the volume on the disc first; it will even work if the drive is empty. This seems to be a Solaris specific issue.

Are there any steps you can suggest I try in order to get Solaris to let VirtualBox use the host DVD drive without a mounted disc? Again my ultimate goal is to use Nero to burn discs from within Windows XP.

Thank you in advance, I hope someone can help.
-Ryan
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Host DVD Drive unavailable

Post by Sasquatch »

Shouldn't you just use this instead? I put the command here how it's on Linux, because I don't know how the physical drive is called in Solaris. Modify accordingly.

Code: Select all

VBoxManage storateattach Windows --storeagectl Windows --port 1 --device 1 --type dvddrive --medium host:/dev/sr0 --passthrough on
In other words, use --medium host:/path/to/blockdevice.
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.
rreed
Posts: 5
Joined: 22. Jul 2010, 20:14
Primary OS: Solaris
VBox Version: OSE other
Guest OSses: WindowsXP

Re: Host DVD Drive unavailable

Post by rreed »

Your syntax is correct, I was using the syntax for mounting an ISO file as opposed to using the host's drive. I'm still having the issue though.
Something I am finding is that when I run

Code: Select all

VBoxManage list hostdvds
I get different outputs depending on what disc is (or isn't) in the drive. If I have a disc in the physical drive and VolFS has mounted it the output looks like this:

Code: Select all

<Sun Microsystems Stuff>
.
.
.
UUID:     <UUID # for Disc>  Big long number I didn't write down.
Name:     <Name of the filesystem on the disc> This happened to be 'ciscotools' in this case
I can then go look in '/vol/dev/aliases/cdrom0/' do an ls and see that 'ciscotools' exists.

If I have a blank disc in the drive and VolFS has tried to mount it the output looks like this:

Code: Select all

#VBoxManage list hostdvds
<Sun Microsystems Stuff>
.
.
.
A whole lot of nothing. However if I look in '/vol/dev/aliases/cdrom0/' I see a file called 'unknown_format' but I can't do anything with it.
Finally, if I run the command with nothing in the drive I get the same output as the blank disc but there is no file in '/vol/dev/aliases/cdrom0/'.

Here's the command I tried based on your suggestion and my tinkering with the hostdvds:

Code: Select all

#VBoxManage storageattach Windows --storagectl Windows --port 1 --device 1 --type dvddrive -- medium host:ciscotools --passthrough on
The result was that the VBoxManage command succeeded but when the VDI started to boot VirtualBox stopped loading the VM and popped up a window with the error that it couldn't open the device '/vol/dev/rdsk/c1t0d0/' for read/write access.
When I changed the command and set passthrough to off the whole command worked and the guest OS mounted the disc and it seemed to work as a read-only drive.

Code: Select all

#VBoxManage storageattach Windows --storagectl Windows --port 1 --device 1 --type dvddrive -- medium host:ciscotools --passthrough off
Neither Nero nor Windows recognize the drive as a burner though which is what I'm ultimately shooting for.

A few additional questions:
Now that I can get VBox to give me access to the host drive, how can I get VBox to let me use the host drive as a burner?
How does VirtuaBox determine what hostdvds exist?
When I run 'VBoxManage list hostdvds' what is that doing or checking and how/why does it return what it returns?
Is there a way to make VBox recognize the physical path to the drive (ex: host:/vol/dev/dsk/c1t0d0) instead of the logical name of the hostdvd list (ex: host:ciscotools)?
Thanks,
-Ryan
rreed
Posts: 5
Joined: 22. Jul 2010, 20:14
Primary OS: Solaris
VBox Version: OSE other
Guest OSses: WindowsXP

Re: Host DVD Drive unavailable

Post by rreed »

As a side note:

I'm curious to know if anyone has ever burned a disc from inside the Guest OS with this setup:

Host OS: Solaris 10 u5 (or higher)
Guest OS: Windows XP (SP2 or higher)

If you did, can you explain any hiccups you ran into?

Thanks,
-Ryan
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Host DVD Drive unavailable

Post by Perryg »

Well I don't have exactly the configuration that you have I do use the DVD in the Windows 7 guest to burn CDs. I am going to guess that it has something to do with Solaris but I can't say that for sure. If a Solaris Host user does not drop by I would ask the DEVs. I only have Solaris and OpenSolaris as guests and that machine does not have a burner.
Ubuntu 10.04 64-bit
Windows 7 Pro 64-bit
DVD-R-in Win7guest.jpg
DVD-R-in Win7guest.jpg (45.12 KiB) Viewed 16477 times
DVD-R-in Win7guest2.jpg
DVD-R-in Win7guest2.jpg (67.53 KiB) Viewed 16475 times
rreed
Posts: 5
Joined: 22. Jul 2010, 20:14
Primary OS: Solaris
VBox Version: OSE other
Guest OSses: WindowsXP

Re: Host DVD Drive unavailable

Post by rreed »

Thanks Perryg, I've gotten CD burning to work on every host OS I've tried (Mac OS X, Windows XP, Ubuntu) except Solaris. On every other OS, the guest OS sees the drive as a DVD-RAM or DVD-RW drive. With Solaris 10 as the host, the guest OS (WinXP) only sees the drive as a CD-ROM drive. You might be right, I might need to talk to the developers.

Any Solaris 10 Host users out there?
ljw1
Posts: 41
Joined: 26. Apr 2009, 10:35
Primary OS: OpenSolaris 11
VBox Version: OSE other
Guest OSses: Ubuntu

Re: Host DVD Drive unavailable

Post by ljw1 »

I also wanted to get this work but there seems to be no instructions to get full access to the dvd drive. The only suggested method which I could only vaguely get to work was to run VirtualBox as the root user, not pfexec or sudo but the actual root user. This is a real pain to run it like this.
rreed
Posts: 5
Joined: 22. Jul 2010, 20:14
Primary OS: Solaris
VBox Version: OSE other
Guest OSses: WindowsXP

Re: Host DVD Drive unavailable

Post by rreed »

Update: A member of my team was just in touch with the Vbox developers. Currently there is no solution for burning CDs in any guest OS with Solaris 10 as the host OS. There was no timeline given as to if/when this feature will be fixed.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Host DVD Drive unavailable

Post by Perryg »

Well that confirms my theory. Sorry! Hopefully this will be addressed sooner than later.
Ramshankar
Oracle Corporation
Posts: 793
Joined: 7. Jan 2008, 16:17

Re: Host DVD Drive unavailable

Post by Ramshankar »

This will be fixed. The only reason this doesn't work is because the CD/DVD detection mechanism logic is broken on Solaris 10. The actual CD passthrough code should still work* The detection code is terribly old and not really tested much on S10. On OpenSolaris we take the libhal path so it always works. On Solaris 10, we fall back to environment variables and mount table scanning. But there is a bug in the environment variable case where I try to validate the DVD (which only works if the CD is actually inserted in the drive). I'll fix this code to scan for the SCSI drives like we do on OpenSolaris but instead of libhal we'll go about scanning the device tree. I expect to get this working soon.

* -- if it doesn't I'll have to fix that too.
Oracle Corp.
ljw1
Posts: 41
Joined: 26. Apr 2009, 10:35
Primary OS: OpenSolaris 11
VBox Version: OSE other
Guest OSses: Ubuntu

Re: Host DVD Drive unavailable

Post by ljw1 »

I would love to know how to get burning to work in opensolaris. If you have details that would be very useful for the community.
Ramshankar
Oracle Corporation
Posts: 793
Joined: 7. Jan 2008, 16:17

Re: Host DVD Drive unavailable

Post by Ramshankar »

ljw1 wrote:I would love to know how to get burning to work in opensolaris. If you have details that would be very useful for the community.
You need to run VirtualBox as real root (on (Open)Solaris) and enable "Pass through" setting in the VM settings for the DVD drive in order to burn CDs/DVDs.
Oracle Corp.
Post Reply