LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Blogs > dr_agon
User Name
Password

Notices

Rate this Entry

Setting udev permission for raw host disk access by virtualbox machine.

Posted 10-14-2008 at 10:02 AM by dr_agon

applies to: linux, udev, permissions, device node, virtualbox


To allow raw host disk access by guest machine on VirtualBox the user must have read-write permission to all partitions which are to be accessed. You can do this by something like
Code:
sudo chmod a+rw /dev/sda7
but executing it every time you need to boot virtual machine is annoying. You may want to set the permissions at boot time.
In modern kernels (since 2.6) you can use the udev rules for setting default permissions to selected devices. I created a file /etc/udev/rules.d/60-whatever.rules with a following rule:
Code:
KERNEL=="sda[78]*",		MODE="0666"
This sets the permission for everyone to read-write /dev/sda7 and /dev/sda8.

That's all I needed.

Posted in Uncategorized
Views 4514 Comments 0
« Prev     Main     Next »

  



All times are GMT -5. The time now is 02:50 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration