Create local virt-manager storage pool

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I want to create a storage pool for virt-manager's qcow2 images in my home directory but I get a strange error:



Error creating pool: Could not define storage pool: XML error: name /home/matthias/virtual-guests/virt-manager cannot contain '/'



Error creating pool



questions



  • Is it even possible to have the storage pool in my home directory?

  • Do I need special permissions for virt-manager to access the directory?

full error traceback




Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/createpool.py", line 442, in _async_pool_create
poolobj = self._pool.install(create=True, meter=meter, build=build)
File "/usr/share/virt-manager/virtinst/storage.py", line 531, in install
raise RuntimeError(_("Could not define storage pool: %s") % str(e))
RuntimeErError creating pool: Could not define storage poror: Could not define storage pool: XML error: name /home/matthias/virtual-guests/virt-manager cannot contain '/'







share|improve this question























    up vote
    0
    down vote

    favorite












    I want to create a storage pool for virt-manager's qcow2 images in my home directory but I get a strange error:



    Error creating pool: Could not define storage pool: XML error: name /home/matthias/virtual-guests/virt-manager cannot contain '/'



    Error creating pool



    questions



    • Is it even possible to have the storage pool in my home directory?

    • Do I need special permissions for virt-manager to access the directory?

    full error traceback




    Traceback (most recent call last):
    File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
    File "/usr/share/virt-manager/virtManager/createpool.py", line 442, in _async_pool_create
    poolobj = self._pool.install(create=True, meter=meter, build=build)
    File "/usr/share/virt-manager/virtinst/storage.py", line 531, in install
    raise RuntimeError(_("Could not define storage pool: %s") % str(e))
    RuntimeErError creating pool: Could not define storage poror: Could not define storage pool: XML error: name /home/matthias/virtual-guests/virt-manager cannot contain '/'







    share|improve this question





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I want to create a storage pool for virt-manager's qcow2 images in my home directory but I get a strange error:



      Error creating pool: Could not define storage pool: XML error: name /home/matthias/virtual-guests/virt-manager cannot contain '/'



      Error creating pool



      questions



      • Is it even possible to have the storage pool in my home directory?

      • Do I need special permissions for virt-manager to access the directory?

      full error traceback




      Traceback (most recent call last):
      File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
      callback(asyncjob, *args, **kwargs)
      File "/usr/share/virt-manager/virtManager/createpool.py", line 442, in _async_pool_create
      poolobj = self._pool.install(create=True, meter=meter, build=build)
      File "/usr/share/virt-manager/virtinst/storage.py", line 531, in install
      raise RuntimeError(_("Could not define storage pool: %s") % str(e))
      RuntimeErError creating pool: Could not define storage poror: Could not define storage pool: XML error: name /home/matthias/virtual-guests/virt-manager cannot contain '/'







      share|improve this question











      I want to create a storage pool for virt-manager's qcow2 images in my home directory but I get a strange error:



      Error creating pool: Could not define storage pool: XML error: name /home/matthias/virtual-guests/virt-manager cannot contain '/'



      Error creating pool



      questions



      • Is it even possible to have the storage pool in my home directory?

      • Do I need special permissions for virt-manager to access the directory?

      full error traceback




      Traceback (most recent call last):
      File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
      callback(asyncjob, *args, **kwargs)
      File "/usr/share/virt-manager/virtManager/createpool.py", line 442, in _async_pool_create
      poolobj = self._pool.install(create=True, meter=meter, build=build)
      File "/usr/share/virt-manager/virtinst/storage.py", line 531, in install
      raise RuntimeError(_("Could not define storage pool: %s") % str(e))
      RuntimeErError creating pool: Could not define storage poror: Could not define storage pool: XML error: name /home/matthias/virtual-guests/virt-manager cannot contain '/'









      share|improve this question










      share|improve this question




      share|improve this question









      asked Jun 3 at 13:04









      ukos

      478114




      478114




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          You can create pools, but there are a few things to consider.



          1. The "name" really has to be without a set of special characters, like '/'. If you want to create a /tmp/test pool you might name it "test" (on step 1 of 2) and give it the path "/tmp/test" (on step 2 of 2) and it will work.


          2. apparmor will stop you if you go too uncommon
            There is a limited set of paths that are allowed by default, if you go
            out of these at some point virt-aa-helper will no more able to access the files. But that would be needed so that it can allow the access for the per-guest custom profile. See the existing rules in /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper and add custom ones via /etc/apparmor.d/local/usr.lib.libvirt.virt-aa-helper
            See /etc/apparmor.d/local/README for more on this.


          3. Some pool types are yet unable to be handled by apparmor. The default pool type of virt-manager will be "dir" and that will be fine. But there are more advanced types like "lvm groups", for those types apparmor rules can not be created for the guest on the fly (see bug on this), in these cases you'll need to allow the extra paths you need via changing /etc/apparmor.d/abstractions/libvirt-qemu.






          share|improve this answer





















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            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',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1043198%2fcreate-local-virt-manager-storage-pool%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote













            You can create pools, but there are a few things to consider.



            1. The "name" really has to be without a set of special characters, like '/'. If you want to create a /tmp/test pool you might name it "test" (on step 1 of 2) and give it the path "/tmp/test" (on step 2 of 2) and it will work.


            2. apparmor will stop you if you go too uncommon
              There is a limited set of paths that are allowed by default, if you go
              out of these at some point virt-aa-helper will no more able to access the files. But that would be needed so that it can allow the access for the per-guest custom profile. See the existing rules in /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper and add custom ones via /etc/apparmor.d/local/usr.lib.libvirt.virt-aa-helper
              See /etc/apparmor.d/local/README for more on this.


            3. Some pool types are yet unable to be handled by apparmor. The default pool type of virt-manager will be "dir" and that will be fine. But there are more advanced types like "lvm groups", for those types apparmor rules can not be created for the guest on the fly (see bug on this), in these cases you'll need to allow the extra paths you need via changing /etc/apparmor.d/abstractions/libvirt-qemu.






            share|improve this answer

























              up vote
              1
              down vote













              You can create pools, but there are a few things to consider.



              1. The "name" really has to be without a set of special characters, like '/'. If you want to create a /tmp/test pool you might name it "test" (on step 1 of 2) and give it the path "/tmp/test" (on step 2 of 2) and it will work.


              2. apparmor will stop you if you go too uncommon
                There is a limited set of paths that are allowed by default, if you go
                out of these at some point virt-aa-helper will no more able to access the files. But that would be needed so that it can allow the access for the per-guest custom profile. See the existing rules in /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper and add custom ones via /etc/apparmor.d/local/usr.lib.libvirt.virt-aa-helper
                See /etc/apparmor.d/local/README for more on this.


              3. Some pool types are yet unable to be handled by apparmor. The default pool type of virt-manager will be "dir" and that will be fine. But there are more advanced types like "lvm groups", for those types apparmor rules can not be created for the guest on the fly (see bug on this), in these cases you'll need to allow the extra paths you need via changing /etc/apparmor.d/abstractions/libvirt-qemu.






              share|improve this answer























                up vote
                1
                down vote










                up vote
                1
                down vote









                You can create pools, but there are a few things to consider.



                1. The "name" really has to be without a set of special characters, like '/'. If you want to create a /tmp/test pool you might name it "test" (on step 1 of 2) and give it the path "/tmp/test" (on step 2 of 2) and it will work.


                2. apparmor will stop you if you go too uncommon
                  There is a limited set of paths that are allowed by default, if you go
                  out of these at some point virt-aa-helper will no more able to access the files. But that would be needed so that it can allow the access for the per-guest custom profile. See the existing rules in /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper and add custom ones via /etc/apparmor.d/local/usr.lib.libvirt.virt-aa-helper
                  See /etc/apparmor.d/local/README for more on this.


                3. Some pool types are yet unable to be handled by apparmor. The default pool type of virt-manager will be "dir" and that will be fine. But there are more advanced types like "lvm groups", for those types apparmor rules can not be created for the guest on the fly (see bug on this), in these cases you'll need to allow the extra paths you need via changing /etc/apparmor.d/abstractions/libvirt-qemu.






                share|improve this answer













                You can create pools, but there are a few things to consider.



                1. The "name" really has to be without a set of special characters, like '/'. If you want to create a /tmp/test pool you might name it "test" (on step 1 of 2) and give it the path "/tmp/test" (on step 2 of 2) and it will work.


                2. apparmor will stop you if you go too uncommon
                  There is a limited set of paths that are allowed by default, if you go
                  out of these at some point virt-aa-helper will no more able to access the files. But that would be needed so that it can allow the access for the per-guest custom profile. See the existing rules in /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper and add custom ones via /etc/apparmor.d/local/usr.lib.libvirt.virt-aa-helper
                  See /etc/apparmor.d/local/README for more on this.


                3. Some pool types are yet unable to be handled by apparmor. The default pool type of virt-manager will be "dir" and that will be fine. But there are more advanced types like "lvm groups", for those types apparmor rules can not be created for the guest on the fly (see bug on this), in these cases you'll need to allow the extra paths you need via changing /etc/apparmor.d/abstractions/libvirt-qemu.







                share|improve this answer













                share|improve this answer



                share|improve this answer











                answered Jun 4 at 5:45









                Christian Ehrhardt

                376110




                376110






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1043198%2fcreate-local-virt-manager-storage-pool%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

                    Trouble downloading packages list due to a “Hash sum mismatch” error

                    How do I move numbers in filenames, in a batch renaming operation?