我已按照此说明操作并尝试准备我自己的 vagrant box: how to create custom vagrant box from libvirt/kvm instance?
不幸的是,我面临一个问题。Vagrant up 挂断:
==> default: Waiting for SSH to become available...
更详细的日志向我展示了这样的内容:
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)
官方盒子(如 ubuntu1604)不会出现最后一个错误。
我注意到的是以下目录中没有private_key :
ls .vagrant/machines/default/libvirt/
creator_uid id index_uuid vagrant_cwd
例如,官方 libvirt 盒(https://app.vagrantup.com/generic/boxes/ubuntu1604)的相同目录看起来不同。
ls .vagrant/machines/default/libvirt/
action_provision creator_uid id index_uuid private_key synced_folders vagrant_cwd
在盒子配置过程中我错过了什么吗?