VERR_ACCESS_DENIED when trying to add a raw disk to virtual boxGive a specific user permissions to a device...

Kerning feedback on logo

Which ping implementation is Cygwin using?

Why the word "rain" is considered a verb if it is not possible to conjugate it?

SCOTUS - Can Congress overrule Marbury v. Madison by statute?

Where does the expression "triple-A" comes from?

Gas pipes - why does gas burn "outwards?"

What's is this random file in Macintosh HD? Malicious?

How could a imperial dynasty keep a loose collection of pirates, raiders, etc unified?

How is Mystery Inc. funded?

extract lines from bottom until regex match

Are Democrats more likely to believe Astrology is a science?

Are scroll bars dead in 2019?

How do you build a Dominant 7th chord?

Can I toggle Do Not Disturb on/off on my Mac as easily as I can on my iPhone?

Writing a worded mathematical expression

If you have multiple situational racial save bonuses and are in a situation where they all apply do they stack?

Should I leave the first authourship of our paper to the student who did the project whereas I solved it?

Job offer without any details but asking me to withdraw other applications - is it normal?

Creating a Master Image to roll out to 30 new Machines Licensing Issues

Is Salesforce Classic being deprecated?

Why should I always enable compiler warnings?

Were Roman public roads build by private companies?

Contract Employer Keeps Asking for Small Things Without Pay

Is English tonal for some words, like "permit"?



VERR_ACCESS_DENIED when trying to add a raw disk to virtual box


Give a specific user permissions to a device without giving access to other usersVirtual box for centos PAENeed to install VirtualBox Guest Additions 4.3.8 in CentOS 6.3Oracle virtual box share folders when executing oracle commandCan't boot Mac OSX 10.9 Virtual Machine (Virtual Box)VirtualBox Error, Storage:Settings, Guest AdditionsOpenBSD 5.9 in Virtual BoxVirtual box - UbuntuInstall Redox OS with Virtual BoxRouting to Internet From Virtual Box VMsCannot start X in virtualbox






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







18















I created a virtualbox raw disk pointing to a functioning, booting USB drive with a small linux distro on it.



sudo ./VBoxManage internalcommands createrawvmdk -filename ~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk -rawdisk /dev/disk2 -partitions 2


When I try to add it to a virtualbox VM, I get this error:



Failed to open the disk image file ~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk.

Permission problem accessing the file for the medium '~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk' (VERR_ACCESS_DENIED).

Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: MediumWrap
Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
Callee: IVirtualBox {0169423f-46b4-cde9-91af-1e9d5b6cd945}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)


I saw that the raw disk vmdk file was owned by root. I chown'ed it to my own user.



Still get the same error. I suspect it would work if I ran virtualbox as root, but I really do not want to do that. Is there anyway to make this work?










share|improve this question

























  • VirtualBox needs root access for a bunch of things, and you already use sudo so you might as well do a proper root startup to get proper environment and user properties.

    – Julie Pelletier
    May 21 '16 at 22:43











  • That's probably related to the "method" you used to create the disk. So, you're trying to access the USB disk, but the Error is referencing the previous image file location.

    – ILMostro_7
    May 22 '16 at 1:55











  • Same issue for me. When I try to execute as sudo, it does not allow x64 machines, that was my case, and then there is no solution for me... :'( - usind on linux

    – kokbira
    Feb 8 at 20:01




















18















I created a virtualbox raw disk pointing to a functioning, booting USB drive with a small linux distro on it.



sudo ./VBoxManage internalcommands createrawvmdk -filename ~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk -rawdisk /dev/disk2 -partitions 2


When I try to add it to a virtualbox VM, I get this error:



Failed to open the disk image file ~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk.

Permission problem accessing the file for the medium '~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk' (VERR_ACCESS_DENIED).

Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: MediumWrap
Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
Callee: IVirtualBox {0169423f-46b4-cde9-91af-1e9d5b6cd945}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)


I saw that the raw disk vmdk file was owned by root. I chown'ed it to my own user.



Still get the same error. I suspect it would work if I ran virtualbox as root, but I really do not want to do that. Is there anyway to make this work?










share|improve this question

























  • VirtualBox needs root access for a bunch of things, and you already use sudo so you might as well do a proper root startup to get proper environment and user properties.

    – Julie Pelletier
    May 21 '16 at 22:43











  • That's probably related to the "method" you used to create the disk. So, you're trying to access the USB disk, but the Error is referencing the previous image file location.

    – ILMostro_7
    May 22 '16 at 1:55











  • Same issue for me. When I try to execute as sudo, it does not allow x64 machines, that was my case, and then there is no solution for me... :'( - usind on linux

    – kokbira
    Feb 8 at 20:01
















18












18








18


4






I created a virtualbox raw disk pointing to a functioning, booting USB drive with a small linux distro on it.



sudo ./VBoxManage internalcommands createrawvmdk -filename ~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk -rawdisk /dev/disk2 -partitions 2


When I try to add it to a virtualbox VM, I get this error:



Failed to open the disk image file ~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk.

Permission problem accessing the file for the medium '~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk' (VERR_ACCESS_DENIED).

Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: MediumWrap
Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
Callee: IVirtualBox {0169423f-46b4-cde9-91af-1e9d5b6cd945}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)


I saw that the raw disk vmdk file was owned by root. I chown'ed it to my own user.



Still get the same error. I suspect it would work if I ran virtualbox as root, but I really do not want to do that. Is there anyway to make this work?










share|improve this question














I created a virtualbox raw disk pointing to a functioning, booting USB drive with a small linux distro on it.



sudo ./VBoxManage internalcommands createrawvmdk -filename ~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk -rawdisk /dev/disk2 -partitions 2


When I try to add it to a virtualbox VM, I get this error:



Failed to open the disk image file ~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk.

Permission problem accessing the file for the medium '~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk' (VERR_ACCESS_DENIED).

Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: MediumWrap
Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
Callee: IVirtualBox {0169423f-46b4-cde9-91af-1e9d5b6cd945}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)


I saw that the raw disk vmdk file was owned by root. I chown'ed it to my own user.



Still get the same error. I suspect it would work if I ran virtualbox as root, but I really do not want to do that. Is there anyway to make this work?







permissions virtualbox






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 21 '16 at 22:35









adapt-devadapt-dev

4722 gold badges6 silver badges14 bronze badges




4722 gold badges6 silver badges14 bronze badges
















  • VirtualBox needs root access for a bunch of things, and you already use sudo so you might as well do a proper root startup to get proper environment and user properties.

    – Julie Pelletier
    May 21 '16 at 22:43











  • That's probably related to the "method" you used to create the disk. So, you're trying to access the USB disk, but the Error is referencing the previous image file location.

    – ILMostro_7
    May 22 '16 at 1:55











  • Same issue for me. When I try to execute as sudo, it does not allow x64 machines, that was my case, and then there is no solution for me... :'( - usind on linux

    – kokbira
    Feb 8 at 20:01





















  • VirtualBox needs root access for a bunch of things, and you already use sudo so you might as well do a proper root startup to get proper environment and user properties.

    – Julie Pelletier
    May 21 '16 at 22:43











  • That's probably related to the "method" you used to create the disk. So, you're trying to access the USB disk, but the Error is referencing the previous image file location.

    – ILMostro_7
    May 22 '16 at 1:55











  • Same issue for me. When I try to execute as sudo, it does not allow x64 machines, that was my case, and then there is no solution for me... :'( - usind on linux

    – kokbira
    Feb 8 at 20:01



















VirtualBox needs root access for a bunch of things, and you already use sudo so you might as well do a proper root startup to get proper environment and user properties.

– Julie Pelletier
May 21 '16 at 22:43





VirtualBox needs root access for a bunch of things, and you already use sudo so you might as well do a proper root startup to get proper environment and user properties.

– Julie Pelletier
May 21 '16 at 22:43













That's probably related to the "method" you used to create the disk. So, you're trying to access the USB disk, but the Error is referencing the previous image file location.

– ILMostro_7
May 22 '16 at 1:55





That's probably related to the "method" you used to create the disk. So, you're trying to access the USB disk, but the Error is referencing the previous image file location.

– ILMostro_7
May 22 '16 at 1:55













Same issue for me. When I try to execute as sudo, it does not allow x64 machines, that was my case, and then there is no solution for me... :'( - usind on linux

– kokbira
Feb 8 at 20:01







Same issue for me. When I try to execute as sudo, it does not allow x64 machines, that was my case, and then there is no solution for me... :'( - usind on linux

– kokbira
Feb 8 at 20:01












7 Answers
7






active

oldest

votes


















11
















User should be in a disk group to access raw partitions (as Gilles mentioned by last reference in his answer).



sudo usermod -a -G disk $USER





share|improve this answer





















  • 5





    this works for me too - note that you are required to log out after adding yourself to the group, or this change will not be applied. That goes for any group modifications actually

    – Cybex
    Dec 28 '17 at 7:53











  • Using only that command was sufficient for me

    – kokbira
    Mar 28 at 17:59











  • This was exactly what I needed. Thank you so much!

    – Theodore R. Smith
    Apr 30 at 0:01



















10
















Check the permission on all the files involved, including the directories: ~/VirtualBox VMs, ~/VirtualBox VMs/MyTinyLinux, ~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk, /dev/disk2. The directories need to be readable and traversable by your user (chmod +rx) and the image file and the raw disk need to be readable and writable (chmod +rw).



You'll need to allow your user to access the disk; since /dev is populated automatically at each boot, you'll need to add a udev to do this. See Give a specific user permissions to a device without giving access to other users






share|improve this answer



































    8
















    The poster used linux on the host machine. If you came here and use Windows as a host (like me) there is an easy solution to this error. Windows doesn't allow raw disk access if you don't start VirtualBox with administrator priviledges.






    share|improve this answer























    • 1





      I have this problem right now even when running VB with elevated priveleges.

      – Euri Pinhollow
      Feb 28 at 16:21











    • Did you start VirtualBox from an administrator account or by running as administrator? If not, you could try with the highest privileges and try with less once you get it working.

      – Pascal
      Mar 18 at 11:36











    • Thanks for reply. I tried that and much more than that, it turned out to be more complicated than I thought. I just wanted to point out that there is not a single source of this error.

      – Euri Pinhollow
      Mar 19 at 17:03













    • @EuriPinhollow Have resolved the problem? I get the same error om Windows (even running VBox manager as admin)

      – C-F
      Aug 25 at 2:42



















    3
















    Depending on the distribution, you might have to add your username to the VirtualBox group.



    usermod -a -G vboxusers myusername


    Additionally, according a similar Q&A on askubunt, you might have a corrupt ISO. In your case, I would guess it means a botched conversion to raw disk. Try searching on how to correctly do that procedure and repeat it, in case the conversion got botched somehow during the first procedure.





    If that's still not a solution, then follow the advice in the VirtualBox Manual and add the -relative option:




    Creating the image requires read/write access for the given device.
    Read/write access is also later needed when using the image from a
    virtual machine. If this is not feasible, there is a special variant
    for raw partition access (currently only available on Linux hosts)
    that avoids having to give the current user access to the entire disk.
    To set up such an image, use



    VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
    -rawdisk /dev/sda -partitions 1,5 -relative



    When used from a virtual machine, the image will then refer not to the
    entire disk, but only to the individual partitions (in the example
    /dev/sda1 and /dev/sda5). As a consequence, read/write access is only
    required for the affected partitions, not for the entire disk. During
    creation however, read-only access to the entire disk is required to
    obtain the partitioning information.







    share|improve this answer



































      2
















      Since there's no accepted answer, I'll post this as an answer for the moment.
      In addition to ensuring you're in the right groups, as others have posted above:



      sudo usermod -a -G disk $USER
      sudo usermod -a -G vboxusers $USER


      If you are still getting the VERR_ACCESS_DENIED error, you need to, as per the comment by @Cybex, logout and log back in for the above group additions to take effect.






      share|improve this answer


























      • "vboxusers" was not needed for my case, only "disk" (fedora29). On mint19, I could not run that VM with rawdisk, except using sudo.

        – kokbira
        Mar 28 at 18:00



















      0
















      I had a similar problem but the issue was that I was running the sudo command while in finder I was in my home volume, I cd'd to Volume/Users/Owner where my profile is called owner and then it worked perfectly.






      share|improve this answer

































        0
















        The problem (for me) was To show only file name without the entire directory path. ... Only filename is needed-



        VBoxManage internalcommands createrawvmdk -filename rawdiskonusb.vmdk -rawdisk .PhysicalDrive#



        worked nicely.






        share|improve this answer








        New contributor



        Hariyanto Hariyanto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.
























          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });















          draft saved

          draft discarded
















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f284704%2fverr-access-denied-when-trying-to-add-a-raw-disk-to-virtual-box%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          7 Answers
          7






          active

          oldest

          votes








          7 Answers
          7






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          11
















          User should be in a disk group to access raw partitions (as Gilles mentioned by last reference in his answer).



          sudo usermod -a -G disk $USER





          share|improve this answer





















          • 5





            this works for me too - note that you are required to log out after adding yourself to the group, or this change will not be applied. That goes for any group modifications actually

            – Cybex
            Dec 28 '17 at 7:53











          • Using only that command was sufficient for me

            – kokbira
            Mar 28 at 17:59











          • This was exactly what I needed. Thank you so much!

            – Theodore R. Smith
            Apr 30 at 0:01
















          11
















          User should be in a disk group to access raw partitions (as Gilles mentioned by last reference in his answer).



          sudo usermod -a -G disk $USER





          share|improve this answer





















          • 5





            this works for me too - note that you are required to log out after adding yourself to the group, or this change will not be applied. That goes for any group modifications actually

            – Cybex
            Dec 28 '17 at 7:53











          • Using only that command was sufficient for me

            – kokbira
            Mar 28 at 17:59











          • This was exactly what I needed. Thank you so much!

            – Theodore R. Smith
            Apr 30 at 0:01














          11














          11










          11









          User should be in a disk group to access raw partitions (as Gilles mentioned by last reference in his answer).



          sudo usermod -a -G disk $USER





          share|improve this answer













          User should be in a disk group to access raw partitions (as Gilles mentioned by last reference in his answer).



          sudo usermod -a -G disk $USER






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Oct 20 '17 at 14:05









          AStenASten

          3012 silver badges7 bronze badges




          3012 silver badges7 bronze badges











          • 5





            this works for me too - note that you are required to log out after adding yourself to the group, or this change will not be applied. That goes for any group modifications actually

            – Cybex
            Dec 28 '17 at 7:53











          • Using only that command was sufficient for me

            – kokbira
            Mar 28 at 17:59











          • This was exactly what I needed. Thank you so much!

            – Theodore R. Smith
            Apr 30 at 0:01














          • 5





            this works for me too - note that you are required to log out after adding yourself to the group, or this change will not be applied. That goes for any group modifications actually

            – Cybex
            Dec 28 '17 at 7:53











          • Using only that command was sufficient for me

            – kokbira
            Mar 28 at 17:59











          • This was exactly what I needed. Thank you so much!

            – Theodore R. Smith
            Apr 30 at 0:01








          5




          5





          this works for me too - note that you are required to log out after adding yourself to the group, or this change will not be applied. That goes for any group modifications actually

          – Cybex
          Dec 28 '17 at 7:53





          this works for me too - note that you are required to log out after adding yourself to the group, or this change will not be applied. That goes for any group modifications actually

          – Cybex
          Dec 28 '17 at 7:53













          Using only that command was sufficient for me

          – kokbira
          Mar 28 at 17:59





          Using only that command was sufficient for me

          – kokbira
          Mar 28 at 17:59













          This was exactly what I needed. Thank you so much!

          – Theodore R. Smith
          Apr 30 at 0:01





          This was exactly what I needed. Thank you so much!

          – Theodore R. Smith
          Apr 30 at 0:01













          10
















          Check the permission on all the files involved, including the directories: ~/VirtualBox VMs, ~/VirtualBox VMs/MyTinyLinux, ~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk, /dev/disk2. The directories need to be readable and traversable by your user (chmod +rx) and the image file and the raw disk need to be readable and writable (chmod +rw).



          You'll need to allow your user to access the disk; since /dev is populated automatically at each boot, you'll need to add a udev to do this. See Give a specific user permissions to a device without giving access to other users






          share|improve this answer
































            10
















            Check the permission on all the files involved, including the directories: ~/VirtualBox VMs, ~/VirtualBox VMs/MyTinyLinux, ~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk, /dev/disk2. The directories need to be readable and traversable by your user (chmod +rx) and the image file and the raw disk need to be readable and writable (chmod +rw).



            You'll need to allow your user to access the disk; since /dev is populated automatically at each boot, you'll need to add a udev to do this. See Give a specific user permissions to a device without giving access to other users






            share|improve this answer






























              10














              10










              10









              Check the permission on all the files involved, including the directories: ~/VirtualBox VMs, ~/VirtualBox VMs/MyTinyLinux, ~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk, /dev/disk2. The directories need to be readable and traversable by your user (chmod +rx) and the image file and the raw disk need to be readable and writable (chmod +rw).



              You'll need to allow your user to access the disk; since /dev is populated automatically at each boot, you'll need to add a udev to do this. See Give a specific user permissions to a device without giving access to other users






              share|improve this answer















              Check the permission on all the files involved, including the directories: ~/VirtualBox VMs, ~/VirtualBox VMs/MyTinyLinux, ~/VirtualBox VMs/MyTinyLinux/rawdiskonusb.vmdk, /dev/disk2. The directories need to be readable and traversable by your user (chmod +rx) and the image file and the raw disk need to be readable and writable (chmod +rw).



              You'll need to allow your user to access the disk; since /dev is populated automatically at each boot, you'll need to add a udev to do this. See Give a specific user permissions to a device without giving access to other users







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Apr 13 '17 at 12:37









              Community

              1




              1










              answered May 21 '16 at 23:35









              GillesGilles

              574k140 gold badges1184 silver badges1697 bronze badges




              574k140 gold badges1184 silver badges1697 bronze badges


























                  8
















                  The poster used linux on the host machine. If you came here and use Windows as a host (like me) there is an easy solution to this error. Windows doesn't allow raw disk access if you don't start VirtualBox with administrator priviledges.






                  share|improve this answer























                  • 1





                    I have this problem right now even when running VB with elevated priveleges.

                    – Euri Pinhollow
                    Feb 28 at 16:21











                  • Did you start VirtualBox from an administrator account or by running as administrator? If not, you could try with the highest privileges and try with less once you get it working.

                    – Pascal
                    Mar 18 at 11:36











                  • Thanks for reply. I tried that and much more than that, it turned out to be more complicated than I thought. I just wanted to point out that there is not a single source of this error.

                    – Euri Pinhollow
                    Mar 19 at 17:03













                  • @EuriPinhollow Have resolved the problem? I get the same error om Windows (even running VBox manager as admin)

                    – C-F
                    Aug 25 at 2:42
















                  8
















                  The poster used linux on the host machine. If you came here and use Windows as a host (like me) there is an easy solution to this error. Windows doesn't allow raw disk access if you don't start VirtualBox with administrator priviledges.






                  share|improve this answer























                  • 1





                    I have this problem right now even when running VB with elevated priveleges.

                    – Euri Pinhollow
                    Feb 28 at 16:21











                  • Did you start VirtualBox from an administrator account or by running as administrator? If not, you could try with the highest privileges and try with less once you get it working.

                    – Pascal
                    Mar 18 at 11:36











                  • Thanks for reply. I tried that and much more than that, it turned out to be more complicated than I thought. I just wanted to point out that there is not a single source of this error.

                    – Euri Pinhollow
                    Mar 19 at 17:03













                  • @EuriPinhollow Have resolved the problem? I get the same error om Windows (even running VBox manager as admin)

                    – C-F
                    Aug 25 at 2:42














                  8














                  8










                  8









                  The poster used linux on the host machine. If you came here and use Windows as a host (like me) there is an easy solution to this error. Windows doesn't allow raw disk access if you don't start VirtualBox with administrator priviledges.






                  share|improve this answer















                  The poster used linux on the host machine. If you came here and use Windows as a host (like me) there is an easy solution to this error. Windows doesn't allow raw disk access if you don't start VirtualBox with administrator priviledges.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Apr 9 '18 at 19:50

























                  answered Apr 9 '18 at 14:36









                  PascalPascal

                  1811 silver badge3 bronze badges




                  1811 silver badge3 bronze badges











                  • 1





                    I have this problem right now even when running VB with elevated priveleges.

                    – Euri Pinhollow
                    Feb 28 at 16:21











                  • Did you start VirtualBox from an administrator account or by running as administrator? If not, you could try with the highest privileges and try with less once you get it working.

                    – Pascal
                    Mar 18 at 11:36











                  • Thanks for reply. I tried that and much more than that, it turned out to be more complicated than I thought. I just wanted to point out that there is not a single source of this error.

                    – Euri Pinhollow
                    Mar 19 at 17:03













                  • @EuriPinhollow Have resolved the problem? I get the same error om Windows (even running VBox manager as admin)

                    – C-F
                    Aug 25 at 2:42














                  • 1





                    I have this problem right now even when running VB with elevated priveleges.

                    – Euri Pinhollow
                    Feb 28 at 16:21











                  • Did you start VirtualBox from an administrator account or by running as administrator? If not, you could try with the highest privileges and try with less once you get it working.

                    – Pascal
                    Mar 18 at 11:36











                  • Thanks for reply. I tried that and much more than that, it turned out to be more complicated than I thought. I just wanted to point out that there is not a single source of this error.

                    – Euri Pinhollow
                    Mar 19 at 17:03













                  • @EuriPinhollow Have resolved the problem? I get the same error om Windows (even running VBox manager as admin)

                    – C-F
                    Aug 25 at 2:42








                  1




                  1





                  I have this problem right now even when running VB with elevated priveleges.

                  – Euri Pinhollow
                  Feb 28 at 16:21





                  I have this problem right now even when running VB with elevated priveleges.

                  – Euri Pinhollow
                  Feb 28 at 16:21













                  Did you start VirtualBox from an administrator account or by running as administrator? If not, you could try with the highest privileges and try with less once you get it working.

                  – Pascal
                  Mar 18 at 11:36





                  Did you start VirtualBox from an administrator account or by running as administrator? If not, you could try with the highest privileges and try with less once you get it working.

                  – Pascal
                  Mar 18 at 11:36













                  Thanks for reply. I tried that and much more than that, it turned out to be more complicated than I thought. I just wanted to point out that there is not a single source of this error.

                  – Euri Pinhollow
                  Mar 19 at 17:03







                  Thanks for reply. I tried that and much more than that, it turned out to be more complicated than I thought. I just wanted to point out that there is not a single source of this error.

                  – Euri Pinhollow
                  Mar 19 at 17:03















                  @EuriPinhollow Have resolved the problem? I get the same error om Windows (even running VBox manager as admin)

                  – C-F
                  Aug 25 at 2:42





                  @EuriPinhollow Have resolved the problem? I get the same error om Windows (even running VBox manager as admin)

                  – C-F
                  Aug 25 at 2:42











                  3
















                  Depending on the distribution, you might have to add your username to the VirtualBox group.



                  usermod -a -G vboxusers myusername


                  Additionally, according a similar Q&A on askubunt, you might have a corrupt ISO. In your case, I would guess it means a botched conversion to raw disk. Try searching on how to correctly do that procedure and repeat it, in case the conversion got botched somehow during the first procedure.





                  If that's still not a solution, then follow the advice in the VirtualBox Manual and add the -relative option:




                  Creating the image requires read/write access for the given device.
                  Read/write access is also later needed when using the image from a
                  virtual machine. If this is not feasible, there is a special variant
                  for raw partition access (currently only available on Linux hosts)
                  that avoids having to give the current user access to the entire disk.
                  To set up such an image, use



                  VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
                  -rawdisk /dev/sda -partitions 1,5 -relative



                  When used from a virtual machine, the image will then refer not to the
                  entire disk, but only to the individual partitions (in the example
                  /dev/sda1 and /dev/sda5). As a consequence, read/write access is only
                  required for the affected partitions, not for the entire disk. During
                  creation however, read-only access to the entire disk is required to
                  obtain the partitioning information.







                  share|improve this answer
































                    3
















                    Depending on the distribution, you might have to add your username to the VirtualBox group.



                    usermod -a -G vboxusers myusername


                    Additionally, according a similar Q&A on askubunt, you might have a corrupt ISO. In your case, I would guess it means a botched conversion to raw disk. Try searching on how to correctly do that procedure and repeat it, in case the conversion got botched somehow during the first procedure.





                    If that's still not a solution, then follow the advice in the VirtualBox Manual and add the -relative option:




                    Creating the image requires read/write access for the given device.
                    Read/write access is also later needed when using the image from a
                    virtual machine. If this is not feasible, there is a special variant
                    for raw partition access (currently only available on Linux hosts)
                    that avoids having to give the current user access to the entire disk.
                    To set up such an image, use



                    VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
                    -rawdisk /dev/sda -partitions 1,5 -relative



                    When used from a virtual machine, the image will then refer not to the
                    entire disk, but only to the individual partitions (in the example
                    /dev/sda1 and /dev/sda5). As a consequence, read/write access is only
                    required for the affected partitions, not for the entire disk. During
                    creation however, read-only access to the entire disk is required to
                    obtain the partitioning information.







                    share|improve this answer






























                      3














                      3










                      3









                      Depending on the distribution, you might have to add your username to the VirtualBox group.



                      usermod -a -G vboxusers myusername


                      Additionally, according a similar Q&A on askubunt, you might have a corrupt ISO. In your case, I would guess it means a botched conversion to raw disk. Try searching on how to correctly do that procedure and repeat it, in case the conversion got botched somehow during the first procedure.





                      If that's still not a solution, then follow the advice in the VirtualBox Manual and add the -relative option:




                      Creating the image requires read/write access for the given device.
                      Read/write access is also later needed when using the image from a
                      virtual machine. If this is not feasible, there is a special variant
                      for raw partition access (currently only available on Linux hosts)
                      that avoids having to give the current user access to the entire disk.
                      To set up such an image, use



                      VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
                      -rawdisk /dev/sda -partitions 1,5 -relative



                      When used from a virtual machine, the image will then refer not to the
                      entire disk, but only to the individual partitions (in the example
                      /dev/sda1 and /dev/sda5). As a consequence, read/write access is only
                      required for the affected partitions, not for the entire disk. During
                      creation however, read-only access to the entire disk is required to
                      obtain the partitioning information.







                      share|improve this answer















                      Depending on the distribution, you might have to add your username to the VirtualBox group.



                      usermod -a -G vboxusers myusername


                      Additionally, according a similar Q&A on askubunt, you might have a corrupt ISO. In your case, I would guess it means a botched conversion to raw disk. Try searching on how to correctly do that procedure and repeat it, in case the conversion got botched somehow during the first procedure.





                      If that's still not a solution, then follow the advice in the VirtualBox Manual and add the -relative option:




                      Creating the image requires read/write access for the given device.
                      Read/write access is also later needed when using the image from a
                      virtual machine. If this is not feasible, there is a special variant
                      for raw partition access (currently only available on Linux hosts)
                      that avoids having to give the current user access to the entire disk.
                      To set up such an image, use



                      VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
                      -rawdisk /dev/sda -partitions 1,5 -relative



                      When used from a virtual machine, the image will then refer not to the
                      entire disk, but only to the individual partitions (in the example
                      /dev/sda1 and /dev/sda5). As a consequence, read/write access is only
                      required for the affected partitions, not for the entire disk. During
                      creation however, read-only access to the entire disk is required to
                      obtain the partitioning information.








                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Apr 13 '17 at 12:22









                      Community

                      1




                      1










                      answered May 22 '16 at 0:41









                      ILMostro_7ILMostro_7

                      1,74415 silver badges22 bronze badges




                      1,74415 silver badges22 bronze badges


























                          2
















                          Since there's no accepted answer, I'll post this as an answer for the moment.
                          In addition to ensuring you're in the right groups, as others have posted above:



                          sudo usermod -a -G disk $USER
                          sudo usermod -a -G vboxusers $USER


                          If you are still getting the VERR_ACCESS_DENIED error, you need to, as per the comment by @Cybex, logout and log back in for the above group additions to take effect.






                          share|improve this answer


























                          • "vboxusers" was not needed for my case, only "disk" (fedora29). On mint19, I could not run that VM with rawdisk, except using sudo.

                            – kokbira
                            Mar 28 at 18:00
















                          2
















                          Since there's no accepted answer, I'll post this as an answer for the moment.
                          In addition to ensuring you're in the right groups, as others have posted above:



                          sudo usermod -a -G disk $USER
                          sudo usermod -a -G vboxusers $USER


                          If you are still getting the VERR_ACCESS_DENIED error, you need to, as per the comment by @Cybex, logout and log back in for the above group additions to take effect.






                          share|improve this answer


























                          • "vboxusers" was not needed for my case, only "disk" (fedora29). On mint19, I could not run that VM with rawdisk, except using sudo.

                            – kokbira
                            Mar 28 at 18:00














                          2














                          2










                          2









                          Since there's no accepted answer, I'll post this as an answer for the moment.
                          In addition to ensuring you're in the right groups, as others have posted above:



                          sudo usermod -a -G disk $USER
                          sudo usermod -a -G vboxusers $USER


                          If you are still getting the VERR_ACCESS_DENIED error, you need to, as per the comment by @Cybex, logout and log back in for the above group additions to take effect.






                          share|improve this answer













                          Since there's no accepted answer, I'll post this as an answer for the moment.
                          In addition to ensuring you're in the right groups, as others have posted above:



                          sudo usermod -a -G disk $USER
                          sudo usermod -a -G vboxusers $USER


                          If you are still getting the VERR_ACCESS_DENIED error, you need to, as per the comment by @Cybex, logout and log back in for the above group additions to take effect.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Dec 21 '18 at 15:08









                          gonegone

                          1236 bronze badges




                          1236 bronze badges
















                          • "vboxusers" was not needed for my case, only "disk" (fedora29). On mint19, I could not run that VM with rawdisk, except using sudo.

                            – kokbira
                            Mar 28 at 18:00



















                          • "vboxusers" was not needed for my case, only "disk" (fedora29). On mint19, I could not run that VM with rawdisk, except using sudo.

                            – kokbira
                            Mar 28 at 18:00

















                          "vboxusers" was not needed for my case, only "disk" (fedora29). On mint19, I could not run that VM with rawdisk, except using sudo.

                          – kokbira
                          Mar 28 at 18:00





                          "vboxusers" was not needed for my case, only "disk" (fedora29). On mint19, I could not run that VM with rawdisk, except using sudo.

                          – kokbira
                          Mar 28 at 18:00











                          0
















                          I had a similar problem but the issue was that I was running the sudo command while in finder I was in my home volume, I cd'd to Volume/Users/Owner where my profile is called owner and then it worked perfectly.






                          share|improve this answer






























                            0
















                            I had a similar problem but the issue was that I was running the sudo command while in finder I was in my home volume, I cd'd to Volume/Users/Owner where my profile is called owner and then it worked perfectly.






                            share|improve this answer




























                              0














                              0










                              0









                              I had a similar problem but the issue was that I was running the sudo command while in finder I was in my home volume, I cd'd to Volume/Users/Owner where my profile is called owner and then it worked perfectly.






                              share|improve this answer













                              I had a similar problem but the issue was that I was running the sudo command while in finder I was in my home volume, I cd'd to Volume/Users/Owner where my profile is called owner and then it worked perfectly.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Sep 21 '17 at 11:58









                              Jesus JonesJesus Jones

                              1




                              1


























                                  0
















                                  The problem (for me) was To show only file name without the entire directory path. ... Only filename is needed-



                                  VBoxManage internalcommands createrawvmdk -filename rawdiskonusb.vmdk -rawdisk .PhysicalDrive#



                                  worked nicely.






                                  share|improve this answer








                                  New contributor



                                  Hariyanto Hariyanto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                  Check out our Code of Conduct.


























                                    0
















                                    The problem (for me) was To show only file name without the entire directory path. ... Only filename is needed-



                                    VBoxManage internalcommands createrawvmdk -filename rawdiskonusb.vmdk -rawdisk .PhysicalDrive#



                                    worked nicely.






                                    share|improve this answer








                                    New contributor



                                    Hariyanto Hariyanto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.
























                                      0














                                      0










                                      0









                                      The problem (for me) was To show only file name without the entire directory path. ... Only filename is needed-



                                      VBoxManage internalcommands createrawvmdk -filename rawdiskonusb.vmdk -rawdisk .PhysicalDrive#



                                      worked nicely.






                                      share|improve this answer








                                      New contributor



                                      Hariyanto Hariyanto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                      Check out our Code of Conduct.









                                      The problem (for me) was To show only file name without the entire directory path. ... Only filename is needed-



                                      VBoxManage internalcommands createrawvmdk -filename rawdiskonusb.vmdk -rawdisk .PhysicalDrive#



                                      worked nicely.







                                      share|improve this answer








                                      New contributor



                                      Hariyanto Hariyanto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                      Check out our Code of Conduct.








                                      share|improve this answer



                                      share|improve this answer






                                      New contributor



                                      Hariyanto Hariyanto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                      Check out our Code of Conduct.








                                      answered 2 hours ago









                                      Hariyanto HariyantoHariyanto Hariyanto

                                      1




                                      1




                                      New contributor



                                      Hariyanto Hariyanto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                      Check out our Code of Conduct.




                                      New contributor




                                      Hariyanto Hariyanto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                      Check out our Code of Conduct.




































                                          draft saved

                                          draft discarded



















































                                          Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f284704%2fverr-access-denied-when-trying-to-add-a-raw-disk-to-virtual-box%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                                          Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                                          Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...