P
P
protasovmikhail2017-02-17 15:10:41
virtual box
protasovmikhail, 2017-02-17 15:10:41

How to connect a physical disk to VirtualBox without using root?

Good afternoon.
There is VB, there is a physical disk. I made a "link" to the physical. disk via command:

VBoxManage internalcommands createrawvmdk -filename driveName.vmdk -rawdisk /dev/sdX

The problem is that when connecting, an error appears - VBOX_E_FILE_ERROR (0x80BB0004).
This is a rights error - I'm trying to use /dev/sdX directly.
You can run as root, you can add yourself to the "disk" group. From the root, of course, we will not work, adding ourselves to a disk group, I think, is also unnecessary.
The question is what is the best way to do it?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xibir, 2017-02-17
@protasovmikhail

Membership in the disk group gives access to all disks, you can write to only one desired disk
chmod a=rw /dev/sdX
or make the user the owner of the disk, then give access only to him

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question