vagrant fails to create box with libvirt





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







4















I am trying to setup a box with vagrant and libvirt with the following Vagrantfile



Vagrant.configure("2") do |config|
config.vm.define :test_vm do |test_vm|
test_vm.vm.box = "test"
test_vm.vm.network :private_network, :ip => '10.20.30.40'
end

config.vm.provider :libvirt do |libvirt|
libvirt.driver = "qemu"
libvirt.host = "localhost"
libvirt.connect_via_ssh = false
libvirt.username = "root"
libvirt.storage_pool_name = "data"
end
end


On RHEL 6.4 I get the following error



Error while connecting to libvirt: Error making a connection to libvirt URI qemu://localhost/system?no_verify=1:
Call to virConnectOpen failed: Unable to import client certificate /etc/pki/CA/cacert.pem


I tried to setup the cert like described here http://libvirt.org/remote.html#Remote_TLS_CA but this didnt change anything.



If i try to connect via ssh vagrant is able to slowly upload the box but afterwards I get the next failure



Call to virDomainCreateWithFlags failed: internal error Process exited while reading console log output: char device redirected to /dev/pts/20
qemu-kvm: -drive file=/local/data/virtualbox/root_1372773363.img,if=none,id=drive-virtio-disk0,format=qcow2: could not open disk image /local/data/virtualbox/root_1372773363.img: Invalid argument


On Fedora 17 or Arch Linux I cannot even install the vagrant-libvirt plugin, because it cannot find the libvirt library (lying under /usr/lib).



Does someone somehow manage to get vagrant working with libvirt or is the libvirt plugin still to alpha?



TIA && have a nice day!



Basti










share|improve this question





























    4















    I am trying to setup a box with vagrant and libvirt with the following Vagrantfile



    Vagrant.configure("2") do |config|
    config.vm.define :test_vm do |test_vm|
    test_vm.vm.box = "test"
    test_vm.vm.network :private_network, :ip => '10.20.30.40'
    end

    config.vm.provider :libvirt do |libvirt|
    libvirt.driver = "qemu"
    libvirt.host = "localhost"
    libvirt.connect_via_ssh = false
    libvirt.username = "root"
    libvirt.storage_pool_name = "data"
    end
    end


    On RHEL 6.4 I get the following error



    Error while connecting to libvirt: Error making a connection to libvirt URI qemu://localhost/system?no_verify=1:
    Call to virConnectOpen failed: Unable to import client certificate /etc/pki/CA/cacert.pem


    I tried to setup the cert like described here http://libvirt.org/remote.html#Remote_TLS_CA but this didnt change anything.



    If i try to connect via ssh vagrant is able to slowly upload the box but afterwards I get the next failure



    Call to virDomainCreateWithFlags failed: internal error Process exited while reading console log output: char device redirected to /dev/pts/20
    qemu-kvm: -drive file=/local/data/virtualbox/root_1372773363.img,if=none,id=drive-virtio-disk0,format=qcow2: could not open disk image /local/data/virtualbox/root_1372773363.img: Invalid argument


    On Fedora 17 or Arch Linux I cannot even install the vagrant-libvirt plugin, because it cannot find the libvirt library (lying under /usr/lib).



    Does someone somehow manage to get vagrant working with libvirt or is the libvirt plugin still to alpha?



    TIA && have a nice day!



    Basti










    share|improve this question

























      4












      4








      4








      I am trying to setup a box with vagrant and libvirt with the following Vagrantfile



      Vagrant.configure("2") do |config|
      config.vm.define :test_vm do |test_vm|
      test_vm.vm.box = "test"
      test_vm.vm.network :private_network, :ip => '10.20.30.40'
      end

      config.vm.provider :libvirt do |libvirt|
      libvirt.driver = "qemu"
      libvirt.host = "localhost"
      libvirt.connect_via_ssh = false
      libvirt.username = "root"
      libvirt.storage_pool_name = "data"
      end
      end


      On RHEL 6.4 I get the following error



      Error while connecting to libvirt: Error making a connection to libvirt URI qemu://localhost/system?no_verify=1:
      Call to virConnectOpen failed: Unable to import client certificate /etc/pki/CA/cacert.pem


      I tried to setup the cert like described here http://libvirt.org/remote.html#Remote_TLS_CA but this didnt change anything.



      If i try to connect via ssh vagrant is able to slowly upload the box but afterwards I get the next failure



      Call to virDomainCreateWithFlags failed: internal error Process exited while reading console log output: char device redirected to /dev/pts/20
      qemu-kvm: -drive file=/local/data/virtualbox/root_1372773363.img,if=none,id=drive-virtio-disk0,format=qcow2: could not open disk image /local/data/virtualbox/root_1372773363.img: Invalid argument


      On Fedora 17 or Arch Linux I cannot even install the vagrant-libvirt plugin, because it cannot find the libvirt library (lying under /usr/lib).



      Does someone somehow manage to get vagrant working with libvirt or is the libvirt plugin still to alpha?



      TIA && have a nice day!



      Basti










      share|improve this question














      I am trying to setup a box with vagrant and libvirt with the following Vagrantfile



      Vagrant.configure("2") do |config|
      config.vm.define :test_vm do |test_vm|
      test_vm.vm.box = "test"
      test_vm.vm.network :private_network, :ip => '10.20.30.40'
      end

      config.vm.provider :libvirt do |libvirt|
      libvirt.driver = "qemu"
      libvirt.host = "localhost"
      libvirt.connect_via_ssh = false
      libvirt.username = "root"
      libvirt.storage_pool_name = "data"
      end
      end


      On RHEL 6.4 I get the following error



      Error while connecting to libvirt: Error making a connection to libvirt URI qemu://localhost/system?no_verify=1:
      Call to virConnectOpen failed: Unable to import client certificate /etc/pki/CA/cacert.pem


      I tried to setup the cert like described here http://libvirt.org/remote.html#Remote_TLS_CA but this didnt change anything.



      If i try to connect via ssh vagrant is able to slowly upload the box but afterwards I get the next failure



      Call to virDomainCreateWithFlags failed: internal error Process exited while reading console log output: char device redirected to /dev/pts/20
      qemu-kvm: -drive file=/local/data/virtualbox/root_1372773363.img,if=none,id=drive-virtio-disk0,format=qcow2: could not open disk image /local/data/virtualbox/root_1372773363.img: Invalid argument


      On Fedora 17 or Arch Linux I cannot even install the vagrant-libvirt plugin, because it cannot find the libvirt library (lying under /usr/lib).



      Does someone somehow manage to get vagrant working with libvirt or is the libvirt plugin still to alpha?



      TIA && have a nice day!



      Basti







      linux linux-kvm qemu vagrant






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 3 '13 at 8:59









      Bastian BallmannBastian Ballmann

      2113




      2113






















          3 Answers
          3






          active

          oldest

          votes


















          2














          I got this Error while connecting to libvirt error but it was simply a case that I was running vagrant up without specifying the provider.



          In my case I needed



          $ vagrant up --provider virtualbox





          share|improve this answer































            1














            I got this error while trying yo vagrant up a machine, without having virtualbox already installed (although I had previously written I needed it).



            Installing virtualbox fixed this issue right away.






            share|improve this answer































              0














              I too had this same issue. To fix it I had to essentially follow this guide : http://wiki.libvirt.org/page/TLSSetup



              Note that the guide has multiple steps and it is LONG. Its not an "easy" fix though once you have the CAcert/key HostCert/key and ClientCert/key all in place, with the correct permissions and the correct ownership, everything works as expected.



              thanks for reporting this and I hope this helps.






              share|improve this answer
























                Your Answer








                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "3"
                };
                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: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                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/3.0/"u003ecc by-sa 3.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%2fsuperuser.com%2fquestions%2f614941%2fvagrant-fails-to-create-box-with-libvirt%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                2














                I got this Error while connecting to libvirt error but it was simply a case that I was running vagrant up without specifying the provider.



                In my case I needed



                $ vagrant up --provider virtualbox





                share|improve this answer




























                  2














                  I got this Error while connecting to libvirt error but it was simply a case that I was running vagrant up without specifying the provider.



                  In my case I needed



                  $ vagrant up --provider virtualbox





                  share|improve this answer


























                    2












                    2








                    2







                    I got this Error while connecting to libvirt error but it was simply a case that I was running vagrant up without specifying the provider.



                    In my case I needed



                    $ vagrant up --provider virtualbox





                    share|improve this answer













                    I got this Error while connecting to libvirt error but it was simply a case that I was running vagrant up without specifying the provider.



                    In my case I needed



                    $ vagrant up --provider virtualbox






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jul 11 '18 at 1:30









                    icc97icc97

                    356315




                    356315

























                        1














                        I got this error while trying yo vagrant up a machine, without having virtualbox already installed (although I had previously written I needed it).



                        Installing virtualbox fixed this issue right away.






                        share|improve this answer




























                          1














                          I got this error while trying yo vagrant up a machine, without having virtualbox already installed (although I had previously written I needed it).



                          Installing virtualbox fixed this issue right away.






                          share|improve this answer


























                            1












                            1








                            1







                            I got this error while trying yo vagrant up a machine, without having virtualbox already installed (although I had previously written I needed it).



                            Installing virtualbox fixed this issue right away.






                            share|improve this answer













                            I got this error while trying yo vagrant up a machine, without having virtualbox already installed (although I had previously written I needed it).



                            Installing virtualbox fixed this issue right away.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Feb 5 at 15:43









                            Carlos Alberto Martínez GadeaCarlos Alberto Martínez Gadea

                            1136




                            1136























                                0














                                I too had this same issue. To fix it I had to essentially follow this guide : http://wiki.libvirt.org/page/TLSSetup



                                Note that the guide has multiple steps and it is LONG. Its not an "easy" fix though once you have the CAcert/key HostCert/key and ClientCert/key all in place, with the correct permissions and the correct ownership, everything works as expected.



                                thanks for reporting this and I hope this helps.






                                share|improve this answer




























                                  0














                                  I too had this same issue. To fix it I had to essentially follow this guide : http://wiki.libvirt.org/page/TLSSetup



                                  Note that the guide has multiple steps and it is LONG. Its not an "easy" fix though once you have the CAcert/key HostCert/key and ClientCert/key all in place, with the correct permissions and the correct ownership, everything works as expected.



                                  thanks for reporting this and I hope this helps.






                                  share|improve this answer


























                                    0












                                    0








                                    0







                                    I too had this same issue. To fix it I had to essentially follow this guide : http://wiki.libvirt.org/page/TLSSetup



                                    Note that the guide has multiple steps and it is LONG. Its not an "easy" fix though once you have the CAcert/key HostCert/key and ClientCert/key all in place, with the correct permissions and the correct ownership, everything works as expected.



                                    thanks for reporting this and I hope this helps.






                                    share|improve this answer













                                    I too had this same issue. To fix it I had to essentially follow this guide : http://wiki.libvirt.org/page/TLSSetup



                                    Note that the guide has multiple steps and it is LONG. Its not an "easy" fix though once you have the CAcert/key HostCert/key and ClientCert/key all in place, with the correct permissions and the correct ownership, everything works as expected.



                                    thanks for reporting this and I hope this helps.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Aug 8 '13 at 1:35









                                    cloudnullcloudnull

                                    1




                                    1






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Super User!


                                        • 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%2fsuperuser.com%2fquestions%2f614941%2fvagrant-fails-to-create-box-with-libvirt%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

                                        Plaza Victoria

                                        In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

                                        How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...