VirtualBox

Opened 16 years ago

Closed 15 years ago

#1784 closed defect (fixed)

Cannot create raw vmdk file on OpenSolaris

Reported by: Gregg Sporar Owned by:
Component: virtual disk Version: VirtualBox 1.6.2
Keywords: Cc:
Guest type: other Host type: Solaris

Description

Running VirtualBox 1.6.2 on OpenSolaris 2008.05, 64-bit.

This command:

VBoxManage internalcommands createrawvmdk -filename /export/home/gs145266/fulldisk.vmdk -rawdisk /dev/dsk/c5d0p0 -register

Returns:

Error opening the raw disk: VERR_ACCESS_DENIED

So I thought, okay, I need some privileges. I then ran this command:

pfexec VBoxManage internalcommands createrawvmdk -filename /export/home/gs145266/fulldisk.vmdk -rawdisk /dev/dsk/c5d0p0 -register

I got *no* response at all. No error message. And no file was created. The VBoxManage command just displays its copyright string and then exits.

I used su and then ran VBoxManage again and got the exact same result: *no* result. No error message and no file is created.

Is there some log file I can look at? Is there some way to turn on additional error reporting?

Change History (7)

comment:1 by Frank Mehnert, 16 years ago

Host type: otherSolaris

comment:2 by Peter, 16 years ago

i can confirm the same result on snv_90 (x86, amd-64 version).

truss shows that output to stderr is redirected to /dev/null, but there's no obvious error message

comment:3 by Frank Mehnert, 16 years ago

Component: othervirtual disk

comment:4 by Klaus Espenlaub, 16 years ago

Resolution: invalid
Status: newclosed

Congrats. I would've never thought of usinf pfexec with VirtualBox. This can lead to really weird behavior - as you observed. I suspect that something in relation to VBoxSVC auto-start. In any case pfexec isn't the right tool for the problem you have. You should give the user somehow proper access to the necessary device node - which group you use etc. is your decision.

Remember, running the VM will need even more permissions - creating the raw disk vmdk need just read access, but the actual VM will need read/write.

In any case I don't really consider this a bug of VirtualBox, it's using it in an environment which it wasn't designed for.

comment:5 by Peter, 16 years ago

Resolution: invalid
Status: closedreopened

i have observed the exact behaviour described whilst logged in as root.

the bug as described is not (just) a result of running via pfexec

in reply to:  5 comment:6 by jkeil, 16 years ago

Replying to pwl:

i have observed the exact behaviour described whilst logged in as root. the bug as described is not (just) a result of running via pfexec

Yep, same here.

I'm running as non root, and do have read & write access to a hotplugged USB stick.

"VBoxManage internalcommands createrawvmdk -filename /tmp/x.vmdk -rawdisk /dev/dsk/c7t0d0p0 -register" just returns, with no error message and does nothing.

A truss reveals this error:

...
/1:     open("/dev/dsk/c7t0d0p0", O_RDONLY|O_LARGEFILE) = 8
/1:     fstat(8, 0xFFFFFD7FFFDFE810)                    = 0
/1:     ioctl(8, DKIOCGMEDIAINFO, 0xFFFFFD7FFFDFE890)   Err#25 ENOTTY
...

Apparently the fstat() is used to enforce the use of a block device.

The root cause for the issue is that it tries to use ioctl(2) with the block device. This won't work on Solaris. It would have worked if we were allowed to pass a character device with "-rawdisk /dev/rdsk/...", but the test after the fstat() prevents this.

comment:7 by Frank Mehnert, 15 years ago

Resolution: fixed
Status: reopenedclosed

Wasn't this one fixed in 1.6.4?

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use