Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5186: Warning: Authentication failure. Retrying... after packaging box #6406

Merged
merged 1 commit into from
Nov 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion plugins/providers/virtualbox/provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,20 @@ def ssh_info
# If the VM is not running that we can't possibly SSH into it
return nil if state.id != :running

# If the insecure key was automatically replaced with a newly generated key pair,
# use this key to connect to the machine
private_key_path = nil
if @machine.data_dir.join("private_key").file?
private_key_path = @machine.data_dir.join("private_key")
end

# Return what we know. The host is always "127.0.0.1" because
# VirtualBox VMs are always local. The port we try to discover
# by reading the forwarded ports.
return {
host: "127.0.0.1",
port: @driver.ssh_port(@machine.config.ssh.guest_port)
port: @driver.ssh_port(@machine.config.ssh.guest_port),
private_key_path: private_key_path
}
end

Expand Down