Solucionado (ver solução)
Solucionado
(ver solução)
6
respostas

Error no Vagrant up : Error while connecting to libvirt

Pessoal estou tentando subir minha maquina virtual no ubuntu 18.04, porem esta apresentando este erro alguém já viu este erro antes ?

rocha:Rocha-Ubuntu wordpress_com_ansible$ vagrant status Current machine states:

wordpress not created (libvirt)

The Libvirt domain is not created. Run vagrant up to create it. rocha:Rocha-Ubuntu wordpress_com_ansible$ vagrant up wordpress Bringing machine 'wordpress' up with 'libvirt' provider...

#<Thread:0x0000563533cb5598@/usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/batch_action.rb:71 run> terminated with exception (report_on_exception is true): Traceback (most recent call last): 25: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/batch_action.rb:82:in block (2 levels) in run' 24: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/machine.rb:188:inaction' 23: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/machine.rb:188:in call' 22: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/environment.rb:592:inlock' 21: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/machine.rb:202:in block in action' 20: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/machine.rb:227:inaction_raw' 19: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in run' 18: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/util/busy.rb:19:inbusy' 17: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in block in run' 16: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builder.rb:116:incall' 15: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in call' 14: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builtin/config_validate.rb:25:incall' 13: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in call' 12: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builtin/box_check_outdated.rb:31:incall' 11: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in call' 10: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builtin/call.rb:52:incall' 9: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builder.rb:170:in to_app' 8: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builder.rb:170:innew' 7: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:20:in initialize' 6: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:20:inmap' 5: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:20:in block in initialize' 4: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:90:infinalize_action' 3: from /usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:90:in new' 2: from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.0.43/lib/vagrant-libvirt/action/create_networks.rb:26:ininitialize' 1: from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.0.43/lib/vagrant-libvirt/driver.rb:40:in connection' /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.0.43/lib/vagrant-libvirt/driver.rb:43:inrescue in connection': Error while connecting to libvirt: Error making a connection to libvirt URI qemu:///system?no_verify=1&keyfile=/home/rocha/.ssh/id_rsa: (VagrantPlugins::ProviderLibvirt::Errors::FogLibvirtConnectionError) Call to virConnectOpen failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory Error while connecting to libvirt: Error making a connection to libvirt URI qemu:///system?no_verify=1&keyfile=/home/rocha/.ssh/id_rsa: Call to virConnectOpen failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory rocha:Rocha-Ubuntu wordpress_com_ansible$

6 respostas

Oi, Robson, tudo bem?

Eu fiz esse curso no Ubuntu 18.04 também e não deu esse erro. Apareceram outros, rs, mas foi já no final.

Posta aqui os arquivos que até então foram criados. E uma dúvida, você está com o virtualbox instalado na máquina?

Boa Tarde Lais estou bem obrigado, Sim estou com o VirtualBox, fiz a instalação da versão 6.0.8 Edition. Segue arquivos:

Vagrant.configure("2") do |config|

  config.vm.box = "ubuntu/trusty64"

  config.vm.provider "virtualbox" do |v|
    v.memory = 1024
  end

  config.vm.define "wordpress" do |m|
    m.vm.network "private_network", ip: "172.17.177.40"
  end

end
hosts
[wordpress]
172.17.177.40

não criei o playbook ainda porque não estou passando da criação da maquina.

rocha:Rocha-Ubuntu wordpress_com_ansible$ vagrant version
Installed Version: 2.0.2
rocha:Rocha-Ubuntu wordpress_com_ansible$ ansible --version
ansible 2.5.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/rocha/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0]
rocha:Rocha-Ubuntu wordpress_com_ansible$

Oi, Robson.

Você poderia verificar se na sua máquinha há algum tipo de instalação relacionada à tecnologia libvirt?

Ambos os seus arquivos subiram com sucesso no meu Ubuntu aqui.

Aguardo :}

Oi Laís não exista nada sobre libvirt na minha maquina a unica coisa que instalei foi o virtualbox. tentei outra coisa aqui mas também não obtive sucesso vou te passar caso consiga me ajudar fico agradecido. rodei o comando de instalação do pacotesudo apt install qemu-kvm libvirt-bin virt-manager na sequencia reiniciei minha maquina e tentei rodar novamente o vagrant up e agora o erro foi alterado, segue o erro:

/usr/share/rubygems-integration/all/gems/vagrant-2.0.2/lib/vagrant/action/builtin/box_add.rb:221:in `add_from_metadata': The box you're attempting to add doesn't support the provider (Vagrant::Errors::BoxAddNoMatchingProvider) you requested. Please find an alternate box or use an alternate provider. Double-check your requested provider to verify you didn't simply misspell it.

If you're adding a box from HashiCorp's Vagrant Cloud, make sure the box is released.

Name: ubuntu/trusty64 Address: https://vagrantcloud.com/ubuntu/trusty64 Requested provider: [:libvirt] The box you're attempting to add doesn't support the provider you requested. Please find an alternate box or use an alternate provider. Double-check your requested provider to verify you didn't simply misspell it.

If you're adding a box from HashiCorp's Vagrant Cloud, make sure the box is released.

Name: ubuntu/trusty64 Address: https://vagrantcloud.com/ubuntu/trusty64 Requested provider: [:libvirt] rocha:Rocha-Ubuntu wordpress_com_ansible$

solução!

Boa Noite Laís

Consegui resolver o problema era a versão que estava usando virtualbox-6.0 removi a instalação com o comando: sudo apt-get remove virtualbox-6.0

Usei o Virtualbox 5.2.20 de 64 bits usei o comando abaixo no terminal:

wget -c https://download.virtualbox.org/virtualbox/5.2.20/VirtualBox-5.2.20-125813-Linux_amd64.run -O virtualbox.run

O próximo passo é dar a permissão de execução, parar isso, executei o comando abaixo:

chmod +x virtualbox.run

Executei o arquivo com o sudo:

sudo ./virtualbox.run

e finalmente consegui da sequencia ufaaa,

Que ótimo, Robson que conseguiu solucionar!