hashicorp / packer-plugin-vagrant

Packer plugin for Vagrant
https://packer.io
Mozilla Public License 2.0
15 stars 23 forks source link

Vagrant builder ssh authentication error #34

Open hc-github-team-packer opened 2 years ago

hc-github-team-packer commented 2 years ago

This issue was originally opened by @thetimmorland in https://github.com/hashicorp/packer/issues/11334 and has been migrated to this repository. The original issue description is below.


When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.

Overview of the Issue

See logs below:

Reproduction Steps

$ packer build -force qvex-dev.json
vagrant: output will be in this color.

==> vagrant: Creating a Vagrantfile in the build directory...
==> vagrant: Adding box using vagrant box add ...
    vagrant: (this can take some time if we need to download the box)
==> vagrant: Calling Vagrant Up (this can take some time)...
==> vagrant: Using SSH communicator to connect: 127.0.0.1
==> vagrant: Waiting for SSH to become available...
==> vagrant: Error waiting for SSH: Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
==> vagrant: destroying Vagrant box...
==> vagrant: Deleting output directory...
Build 'vagrant' errored after 2 minutes 22 seconds: Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

==> Wait completed after 2 minutes 22 seconds

==> Some builds didn't complete successfully and had errors:
--> vagrant: Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

Packer version

From packer version

$ packer --version
1.7.6

Simplified Packer Template

$ cat qvex-dev.json
{
  "builders": [
    {
      "communicator": "ssh",
      "source_path": "archlinux/archlinux",
      "provider": "virtualbox",
      "add_force": true,
      "type": "vagrant"
    }
  ],
  "provisioners": [
    {
      "type": "shell",
      "script": "install.sh"
    }
  ]
}

Operating system and Environment details

Windows 10 x86_64

Log Fragments and crash.log files

N/A