There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.

Si recibimos el siguiente error arrancando Homestead

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: [«startvm», «5f543d1a-ab88-4fc9-a6f4-d79f701d0925», «–type», «headless»]

Stderr: VBoxManage: error: Could not open the medium ‘/Users/kikebeltran/VirtualBox VMs/homestead-7/ubuntu-16.04-amd64-disk001.vmdk’.
VBoxManage: error: VD: error VERR_FILE_NOT_FOUND opening image file ‘/Users/kikebeltran/VirtualBox VMs/homestead-7/ubuntu-16.04-amd64-disk001.vmdk’ (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MediumWrap, interface IMedium

El primer paso es no preocuparnos… es posible que nos hemos cargado nuestra imagen, en mi caso borré «ubuntu-16.04-amd64-disk001.vmdk» como podemos ver en la descripción del error (/Users/kikebeltran/VirtualBox VMs/homestead-7/ubuntu-16.04-amd64-disk001.vmdk)

Para verificar que el error es este podemos abrir nuestro Virtual Box y comprobar primero, que nuestra máquina homestead se encuentra ahí. Si intentamos iniciarla desde ahí nos dará el siguiente error:

Vamos a ver cual es el estado de nuestro vagrant:

vagrant global-status

Nos responderá algo como:

id name provider state directory
——————————————————————–
There are no active Vagrant environments on this computer! Or,
you haven’t destroyed and recreated Vagrant environments that were
started with an older version of Vagrant.

O algo como:

id name provider state directory
—————————————————————————–
58669e6 homestead-7 virtualbox poweroff /Users/kikebeltran/Homestead

The above shows information about all known Vagrant environments
on this machine. This data is cached and may not be completely
up-to-date. To interact with any of the machines, you can go to
that directory and run Vagrant, or you can use the ID directly
with Vagrant commands from any directory. For example:
«vagrant destroy 1a2b3c4d»

En este segundo nos da la opción de eliminar la máquina desde la misma terminal. Ejecutamos (siendo el último número el ID de la máquina)

vagrant destroy 58669e6

y nos responderá:

homestead-7: Are you sure you want to destroy the ‘homestead-7’ VM? [y/N] y
==> homestead-7: Destroying VM and associated drives…

En el caso de que no aparezca nada, podriamos (si en Virtual Box apareciese la máquina) eliminarla con desde la UI. Botón derecho sobre la máquina (en mi caso homestead-7, segun la imagen anterior) y clic en «Eliminar».

Para volvera a crear solo tenemos que ejecutar:

vagrant up --provision

El proceso tardará un poquito porque tiene que crear la máquina virtual de nuevo…y… Todo arreglado, microinfarto salvado, la máquina se arranca ella misma y ya podemos seguir desarrollando nuestro proyecto felizmente.

Saluuudoss 🙂


Tu opinión es importante para mi, ¿Te ha resultado útil este artículo?

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

*