openSUSE/vagrant-ceph

can't vagrant up

hemna opened this issue · 6 comments

hemna commented

Hey guys,
When I run vagrant up I get this error every time.

Bringing machine 'data1' up with 'libvirt' provider...
Bringing machine 'admin' up with 'libvirt' provider...
Error while connecting to libvirt: Error making a connection to libvirt URI qemu+ssh://root@localhost/system?no_verify=1&keyfile=/home/waboring/.ssh/id_rsa:
Call to virConnectOpen failed: packet 1349281117 bytes received from server too large, want 16777216

If I modify lib/settings.rb as such

diff --git a/lib/settings.rb b/lib/settings.rb
index dc5fcb0..107607b 100644
--- a/lib/settings.rb
+++ b/lib/settings.rb
@@ -15,13 +15,13 @@ def common_settings(node, config, name)
 end

 def libvirt_settings(provider, config, name)
-        provider.host = 'localhost'
-        provider.username = 'root'
+        #provider.host = 'localhost'
+        #provider.username = 'root'


         # Use DSA key if available, otherwise, defaults to RSA
-        provider.id_ssh_key_file = 'id_dsa' if File.exists?("#{ENV['HOME']}/.ssh/id_dsa")
-        provider.connect_via_ssh = true
+#        provider.id_ssh_key_file = 'id_dsa' if File.exists?("#{ENV['HOME']}/.ssh/id_dsa")
+#        provider.connect_via_ssh = true

         # Libvirt pool and prefix value
         provider.storage_pool_name = 'default'

then it works. Any ideas?

libvirt configuration?

Are you able to virsh -c qemu+ssh://root@localhost/system without password?
https://wiki.libvirt.org/page/SSHSetup

I remember some issues on some OS with it. Probably need to install from the scratch and document.

hemna commented

nah I get a failure with

virsh -c qemu+ssh://root@localhost/system                       ✔  (ssh)  01:10 Dur  17:53:27 
error: failed to connect to the hypervisor
error: packet 1349281117 bytes received from server too large, want 16777216

so I had to hack my lib/settings.rb to get it to work.

right, but that is not vagrant fault. That is purely libvirt config.

You need to configure it properly for qemu+ssh:// connection.

I remember I did add my ssh key for the root to authorized keys. And also check goups and etc that are described here:
https://wiki.libvirt.org/page/SSHSetup

hemna commented

This may be an older vagrant-libvirt issue.

@hemna is this still an issue?

during CI automation for this project I am doing:

ssh-keygen -t rsa -f /root/.ssh/id_rsa -P ""
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

curl https://raw.githubusercontent.com/openSUSE/vagrant-ceph/master/openSUSE_vagrant_setup.sh -o openSUSE_vagrant_setup.sh
chmod +x openSUSE_vagrant_setup.sh

./openSUSE_vagrant_setup.sh

cd vagrant-ceph

vagrant up || true
vagrant provision

generating key to connect to the libvirtd.

btw openSUSE_vagrant_setup.sh also was updated. Works fine for 42.3 now. pls reopen if you still have an issue.