Varying-Vagrant-Vagrants / VVV

An open source Vagrant configuration for developing with WordPress
https://varyingvagrantvagrants.org
MIT License
4.54k stars 848 forks source link

BoxBuilder Timeouts #1897

Open tomjn opened 5 years ago

tomjn commented 5 years ago

Attempting to build a new base box is failing with SSH timeouts when bringing up a new box using the newly built .box file:

==> default: Box '/Users/tarendai/dev/www/BoxBuilder/builds/ubuntu-18.04-virtualbox.box' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box '/Users/tarendai/dev/www/BoxBuilder/builds/ubuntu-18.04-virtualbox.box' (v0) for provider: virtualbox
    default: Unpacking necessary files from: file:///Users/tarendai/dev/www/BoxBuilder/builds/ubuntu-18.04-virtualbox.box
==> default: Successfully added box '/Users/tarendai/dev/www/BoxBuilder/builds/ubuntu-18.04-virtualbox.box' (v0) for 'virtualbox'!
==> default: Importing base box '/Users/tarendai/dev/www/BoxBuilder/builds/ubuntu-18.04-virtualbox.box'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: ubuntu-1804-1562258041-virtualbox_default_1562259470579_33556
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (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:2222
    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.
+ TEST_EC=1
+ vagrant destroy -f
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
==> default: [vagrant-hostsupdater] Removing hosts
+ vagrant box remove --all /Users/tarendai/dev/www/BoxBuilder/builds/ubuntu-18.04-virtualbox.box
Removing box '/Users/tarendai/dev/www/BoxBuilder/builds/ubuntu-18.04-virtualbox.box' (v0) with provider 'virtualbox'...
+ popd
~/dev/www/BoxBuilder/ubuntu-18.04
+ rm -rf /Users/tarendai/dev/www/BoxBuilder/.spec/ubuntu-18.04-1562258041-virtualbox
+ exit 1
make[1]: *** [test] Error 1
make: *** [ubuntu-18.04] Error 2
tomjn commented 5 years ago

I loaded up VirtualBox management and put the UI up and saw this:

Screenshot 2019-07-04 at 21 44 10
Mte90 commented 5 years ago

On my tests is working and go over that point, maybe you have issues for https://github.com/Varying-Vagrant-Vagrants/VVV/issues/1900?

tomjn commented 5 years ago

Nope those are different issues to what I'm getting. For me it builds the box, it's just that the box is horribly broken and unusable as it Kernel Panics during boot

Mte90 commented 5 years ago

Ok this errors are happening when is launching the VM generated. I have the same error :-(

ghost commented 5 years ago

apparently, I don't get the same error yet, but I end up getting this when I'm at home, I have satellite internet,

VirtualBox_sandbox-packer_15_07_2019_23_43_25

but when I'm at work, i don't get this, any idea why.

ghost commented 5 years ago

it doesn't run this d-i pkgsel/include string build-essential cifs-utils cryptsetup dkms libreadline-dev libssl-dev linux-headers-$(uname -r) linux-source nfs-common openssh-server perl software-properties-common zlib1g-dev

it reaches to 80% and fails, during the configuration of the apt manager, it will say retreiving x out of 23 which consider a fail, but when it says x out of 63, it actually finishes the generation of the image.

Mte90 commented 5 years ago

In our cases the error was after the download of everything and installing, it is like that at restart of the vm there is a kernel panic that crash, so your error is something that doesn't involve the timouts.