Ticket #1784 (closed defect: fixed)

Opened 10 years ago

Last modified 9 years ago

Cannot create raw vmdk file on OpenSolaris

Reported by: gsporar Owned by:
Priority: major Component: virtual disk
Version: VirtualBox 1.6.2 Keywords:
Cc: Guest type: other
Host type: Solaris


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


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

comment:1 Changed 10 years ago by frank

  • Host type changed from other to Solaris

comment:2 Changed 10 years ago by pwl

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 Changed 10 years ago by frank

  • Component changed from other to virtual disk

comment:4 Changed 10 years ago by klaus

  • Status changed from new to closed
  • Resolution set to invalid

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 follow-up: ↓ 6 Changed 10 years ago by pwl

  • Status changed from closed to reopened
  • Resolution invalid deleted

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

comment:6 in reply to: ↑ 5 Changed 10 years ago by jkeil

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 Changed 9 years ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed

Wasn't this one fixed in 1.6.4?

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use