-
Notifications
You must be signed in to change notification settings - Fork 30
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
DTT1 - Iteration 3 - Allocation module - Fix Vagrant inventory IP is always localhost #4874
Comments
Extra infoPossible solution tested in a local Output of vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'generic/ubuntu2004'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'generic/ubuntu2004' version '4.3.8' is up to date...
==> default: Setting the name of the VM: test_default_1705674568055_3441
==> default: Fixed port collision for 22 => 2222. Now on port 2201.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2201 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 192.168.57.3:2201
default: SSH username: vagrant
default: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value. |
Update reportAfter some research and testing we found that in order to do the desired configuration, we need to manually set every Continuing with the research. |
Update reportIt was not possible to configure the host on Vagrant's SolutionAs the connection using the host configured in Vagrant's init_indicator = "./init"
if not ::File.exists?(init_indicator)
File.write(init_indicator, "initialized")
else
# Use the IP address of the VM to connect via SSH
config.ssh.host = "{{ config.ip }}"
config.ssh.port = 22
config.ssh.private_key_path = "{{ config.private_key }}"
end It is not a great solution, maybe a better way could be found with some more research, especially in the VBoxManage documentation and how to apply it in the vagrantfile. |
Review NotesTests 🟢 |
Description
This issue aims to fix the Vagrant provider retrieving always 127.0.0.1 as VM's IP, this problem occurs because
vagrant ssh-config
returns the defaultconfig.ssh
values, a possible fix is to defineconfig.ssh.host
with the provider configured IP (check this guide).Tasks
config.ssh
.The text was updated successfully, but these errors were encountered: