I want to use: https://app.vagrantup.com/FritsHoogland/boxes/centos39-oracle817
The basic vagrant up command fails:
$ vagrant init FritsHoogland/centos39-oracle817
$ vagrant up
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "0e84ac28-6e1d-432a-b417-cc99c71562b7", "--type", "headless"]
Stderr: VBoxManage: error: Implementation of the USB 2.0 controller not found!
VBoxManage: error: Because the USB 2.0 controller state is part of the saved VM state, the VM cannot be started. To fix this problem, either install the 'Oracle VM VirtualBox Extension Pack' or disable USB 2.0 support in the VM settings.
VBoxManage: error: Note! This error could also mean that an incompatible version of the 'Oracle VM VirtualBox Extension Pack' is installed (VERR_NOT_FOUND)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
I edited Vagrantfile to ignore the USB error:
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--usb", "on"]
vb.customize ["modifyvm", :id, "--usbehci", "off"]
end
This starts the VM, but the initial ssh to the VM fails:
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'FritsHoogland/centos39-oracle817'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'FritsHoogland/centos39-oracle817' version '0.0.2' is up to date...
==> default: Setting the name of the VM: c_default_1689909952468_41
==> default: Fixed port collision for 22 => 2222. Now on port 2206.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2206 (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: 127.0.0.1:2206
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
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.
It seems Vagrant is running:
/usr/bin/ssh -vv -p 2206 -o LogLevel=FATAL -o Compression=yes -o DSAAuthentication=yes -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o KexAlgorithms=+diffie-hellman-group1-sha1 -o UserKnownHostsFile=/dev/null -i /home/tange/.vagrant.d/insecure_private_key [email protected]
which fails.
How can I make it add -o KexAlgorithms=+diffie-hellman-group1-sha1 which seems to work:
/usr/bin/ssh -vv -p 2206 -o LogLevel=FATAL -o Compression=yes -o DSAAuthentication=yes -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o KexAlgorithms=+diffie-hellman-group1-sha1 -o UserKnownHostsFile=/dev/null -i /home/tange/.vagrant.d/insecure_private_key [email protected]
This logs into the VM.
I tried adding this to ~/.ssh/config:
Host *
KexAlgorithms +diffie-hellman-group1-sha1
But the initial vagrant up seems to ignore this.
I added to Vagrantfile:
config.ssh.extra_args = ["-o" "KexAlgorithms=+diffie-hellman-group1-sha1"]
This seems to be used by vagrant ssh but not by vagrant up. In other words: vagrant up hangs, but vagrant ssh works after the system is booted.
Is there a section of Vagrantfile where I can set -o KexAlgorithms +diffie-hellman-group1-sha1 or some other way to make vagrant up use that?