Publicado el Dejar un comentario

Vagrant was unable to mount VirtualBox shared folders.

A iniciar el box de icinga2 me mandaba el mensaje siguiente:

Vagrant was unable to mount VirtualBox shared folders. This is usually because the filesystem "vboxsf" is not available. This filesystem is made available via the VirtualBox Guest Additions and kernel module. Please verify that these guest additions are properly installed in the guest. This is not a bug in Vagrant and is usually caused by a faulty Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant

The error output from the command was:

: No such file or directory

En mi caso se debía a un bug en la versión de VirtualBox Guest Additions (vbguest) instalada en el box (la 5.1.21). Así que procedí a instalar la última versión (5.1.22) ejecutando las siguientes instrucciones:

%vagrant plugin install vagrant-vbguest
%vagrant up
%vagrant vbguest
%vagrant halt
%vagrant up

Instalar el más reciente plugin de vbguest, iniciar el box, instalar la última versión de vbguest, parar el box y volverlo a arrancar.

El mensaje de error desapareció. Espero les ayude.

¡Saludos!

Publicado el Dejar un comentario

Vagrant 1.8.5: “default: Warning: Authentication failure. Retrying…”

Al intentar ejecutar un máquina virtual con Vagrant (vagrant up), mandaba los siguientes mensajes:

==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. 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.

Levantaba la máquina virtual pero arrojaba errores al querer entrar a ella a través de ssh (vagrant ssh). No podía acceder a la máquina virtual.

La versión 1.8.5 de vagrant trae este bug. Para solucionarlo es necesario acceder a la máquina virtual a través de VirtualBox y cambiar los permisos del archivo /home/vagrant/.ssh/authorized_keys ejecutando el siguiente comando:

chmod 0600 /home/vagrant/.ssh/authorized_keys

Una vez hecho esto recargamos la máquina virtual (vagrant reload) y la máquina virtual debe arrancar sin ningún problema y ya podremos acceder a ella a través del ssh (vagrant ssh).

¡Saludos!