0

I have followed this instruction and tried to prepare my own vagrant box: how to create custom vagrant box from libvirt/kvm instance?

Unfortunately I am facing one issue. Vagrant up hangs on:

==> default: Waiting for SSH to become available...

More detailed logs show me something like this:

D, [2018-04-04T15:51:40.628951 #6576] DEBUG -- net.ssh.authentication.methods.publickey[3fc61a560e58]: trying publickey (dd:3b:b8:2e:85:04:06:e9:ab:ff:a8:0a:c0:04:6e:d6)
D, [2018-04-04T15:51:40.629709 #6576] DEBUG -- socket[3fc61a8070e4]: queueing packet nr 5 type 50 len 348
D, [2018-04-04T15:51:40.629904 #6576] DEBUG -- socket[3fc61a8070e4]: sent 372 bytes
D, [2018-04-04T15:51:40.656401 #6576] DEBUG -- socket[3fc61a8070e4]: read 68 bytes
D, [2018-04-04T15:51:40.656589 #6576] DEBUG -- socket[3fc61a8070e4]: received packet nr 5 type 51 len 44
D, [2018-04-04T15:51:40.656660 #6576] DEBUG -- net.ssh.authentication.session[3fc61a593f9c]: allowed methods: publickey,password
E, [2018-04-04T15:51:40.656709 #6576] ERROR -- net.ssh.authentication.session[3fc61a593f9c]: all authorization methods failed (tried none, publickey)

This last error doesn't appear for official boxes (like ubuntu1604).

Thing I noticed is that there is no private_key in following directory:

ls .vagrant/machines/default/libvirt/
creator_uid  id  index_uuid  vagrant_cwd

For example the same directory for official libvirt box (https://app.vagrantup.com/generic/boxes/ubuntu1604) looks different.

ls .vagrant/machines/default/libvirt/
action_provision  creator_uid  id  index_uuid  private_key  synced_folders  vagrant_cwd

Did I miss something during box configuration?

0

I've been making stupid mistake. As a authorized_keys I've been using file copied from other vagrant system. So instead f using "vagrant insecure public key" I've tried to use "vagrant" pub key for that existing system.

When I used this https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub everything started working as I expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.