I have a flash disk which is detected as /dev/sdc
I need to use it as a virtualbox device. So I created a vmdk for the disk and registered it. Furthermore, virtualbox requires that in order to use the device, the device must belong to the group vboxusers. So I chmod'ed it to vboxusers.
But somehow magically, it reverts back to being owned by the group disks.
I have disabled selinux. So I have no idea what/who is changing it back. This is the reason why I am asking this list. The virtualbox list does not seem to have an answer.
On Tue, May 3, 2011 at 4:15 PM, JD jd1008@gmail.com wrote:
I have a flash disk which is detected as /dev/sdc
I need to use it as a virtualbox device. So I created a vmdk for the disk and registered it. Furthermore, virtualbox requires that in order to use the device, the device must belong to the group vboxusers. So I chmod'ed it to vboxusers.
I'm recalling this from memory so I hope it's accurate, but...
Why don't you use it as a USB device instead?
Also, I'm not completely sure that the disk has to be owned by vboxusers. If you run virtualbox as yourself, and you're in the disks group, I think that is sufficient.
But somehow magically, it reverts back to being owned by the group disks.
Do you mean when you unplug and re-plug the flash drive? This is due to udev so nothing really to do with selinux.
I have disabled selinux. So I have no idea what/who is changing it back. This is the reason why I am asking this list. The virtualbox list does not seem to have an answer.
Easy way: access it as a usb device Harder way: add yourself to disk(s?) group and use it as a raw disk vmdk. Hardest way: modify the udev rules to make vboxusers the owner.
Richard
On 05/03/11 14:21, Richard Shaw wrote:
On Tue, May 3, 2011 at 4:15 PM, JDjd1008@gmail.com wrote:
I have a flash disk which is detected as /dev/sdc
I need to use it as a virtualbox device. So I created a vmdk for the disk and registered it. Furthermore, virtualbox requires that in order to use the device, the device must belong to the group vboxusers. So I chmod'ed it to vboxusers.
I'm recalling this from memory so I hope it's accurate, but...
Why don't you use it as a USB device instead?
Also, I'm not completely sure that the disk has to be owned by vboxusers. If you run virtualbox as yourself, and you're in the disks group, I think that is sufficient.
I tried that! It did not work. As you can see, I am also in the disks group: $ id jd uid=1008(jd) gid=1008(jd) groups=0(root),6(disk),12(mail),11(cdrom),19(floppy),1009(vboxusers),1008(jd)
But somehow magically, it reverts back to being owned by the group disks.
Do you mean when you unplug and re-plug the flash drive? This is due to udev so nothing really to do with selinux.
No! It just magically reverts back to having gid of 6 (disks).
I have disabled selinux. So I have no idea what/who is changing it back. This is the reason why I am asking this list. The virtualbox list does not seem to have an answer.
Easy way: access it as a usb device Harder way: add yourself to disk(s?) group and use it as a raw disk vmdk. Hardest way: modify the udev rules to make vboxusers the owner.
Richard
I tried. When I click on the + icon on the right, it says no devices available.
On Tue, May 3, 2011 at 4:42 PM, JD jd1008@gmail.com wrote:
On 05/03/11 14:21, Richard Shaw wrote:
On Tue, May 3, 2011 at 4:15 PM, JDjd1008@gmail.com wrote:
I have a flash disk which is detected as /dev/sdc
I need to use it as a virtualbox device. So I created a vmdk for the disk and registered it. Furthermore, virtualbox requires that in order to use the device, the device must belong to the group vboxusers. So I chmod'ed it to vboxusers.
I'm recalling this from memory so I hope it's accurate, but...
Why don't you use it as a USB device instead?
Also, I'm not completely sure that the disk has to be owned by vboxusers. If you run virtualbox as yourself, and you're in the disks group, I think that is sufficient.
I tried that! It did not work.
Have you had USB working in VB at any point or just not with this device?
As you can see, I am also in the disks group: $ id jd uid=1008(jd) gid=1008(jd) groups=0(root),6(disk),12(mail),11(cdrom),19(floppy),1009(vboxusers),1008(jd)
Strange. I know I was able to use a raw disk vmdk for my IPod without chmod'ing it. I would usually use the USB option in VB but the USB port of the Ipod seemed to be fried so I was left with FireWire.
But somehow magically, it reverts back to being owned by the group disks.
Do you mean when you unplug and re-plug the flash drive? This is due to udev so nothing really to do with selinux.
No! It just magically reverts back to having gid of 6 (disks).
No clue then...
I tried. When I click on the + icon on the right, it says no devices available.
Have you added a few empty USB filters to your VM?
Richard
On 05/03/11 14:52, Richard Shaw wrote:
Have you had USB working in VB at any point or just not with this device?
I was using this device in VB in the previous release. No problems!
Have you added a few empty USB filters to your VM?
I tried, and I filled the fields based on the info in /var/log/messages like serial number, manufacturer and product. But when I clock on the + icon on the right, it says No devices available.
Richard
JD
On Tue, May 3, 2011 at 5:17 PM, JD jd1008@gmail.com wrote:
On 05/03/11 14:52, Richard Shaw wrote:
Have you had USB working in VB at any point or just not with this device?
I was using this device in VB in the previous release. No problems!
Have you added a few empty USB filters to your VM?
I tried, and I filled the fields based on the info in /var/log/messages like serial number, manufacturer and product. But when I clock on the + icon on the right, it says No devices available.
The way USB devices work in virtualbox is not very intuitive. Have you tried adding empty filters instead (the first button with the small blue circle)?
The + button is for adding devices that you want mapped to your VM by default (on VM startup). Adding empty filters will match any USB device and will not be mapped until you enable them from your virtual machine via the USB icon in the lower right of the window.
Richard
On 05/03/11 15:54, Richard Shaw wrote:
The way USB devices work in virtualbox is not very intuitive. Have you tried adding empty filters instead (the first button with the small blue circle)?
The + button is for adding devices that you want mapped to your VM by default (on VM startup). Adding empty filters will match any USB device and will not be mapped until you enable them from your virtual machine via the USB icon in the lower right of the window.
Richard
Yes Richard. I did indeed first try an empty filter. I still get no devices available.
I think this must be caused by latest VBox release.
On Wed, May 4, 2011 at 7:15 AM, JD jd1008@gmail.com wrote:
I have disabled selinux. So I have no idea what/who is changing it back. This is the reason why I am asking this list. The virtualbox list does not seem to have an answer.
You probably need to create a udev rule to match your device and change the default owner. Shouldn't be too difficult.
-c
On Tue, May 3, 2011 at 6:05 PM, JD jd1008@gmail.com wrote:
On 05/03/11 15:54, Richard Shaw wrote:
The way USB devices work in virtualbox is not very intuitive. Have you tried adding empty filters instead (the first button with the small blue circle)?
The + button is for adding devices that you want mapped to your VM by default (on VM startup). Adding empty filters will match any USB device and will not be mapped until you enable them from your virtual machine via the USB icon in the lower right of the window.
Richard
Yes Richard. I did indeed first try an empty filter. I still get no devices available.
I think this must be caused by latest VBox release.
Yeah, I think you have a VBox issue at this point. You do have the VBox extension pack installed, right? USB support it now there instead of in the main package.
Richard
On 05/03/11 17:50, Richard Shaw wrote:
On Tue, May 3, 2011 at 6:05 PM, JDjd1008@gmail.com wrote:
On 05/03/11 15:54, Richard Shaw wrote:
The way USB devices work in virtualbox is not very intuitive. Have you tried adding empty filters instead (the first button with the small blue circle)?
The + button is for adding devices that you want mapped to your VM by default (on VM startup). Adding empty filters will match any USB device and will not be mapped until you enable them from your virtual machine via the USB icon in the lower right of the window.
Richard
Yes Richard. I did indeed first try an empty filter. I still get no devices available.
I think this must be caused by latest VBox release.
Yeah, I think you have a VBox issue at this point. You do have the VBox extension pack installed, right? USB support it now there instead of in the main package.
Richard
Indeed I do. But even after they were installed, vbox says they are not. Go figure!