rails / rails-dev-box

A virtual machine for Ruby on Rails core development
MIT License
2.05k stars 580 forks source link

Use Ubuntu 19.10 #169

Closed yahonda closed 4 years ago

yahonda commented 4 years ago

This pull request bumps the Ubuntu version from 19.04 to 19.10.

Somehow, vagrant up gets time out. Adding config.vm.boot_timeout = 600 to workaround the time out error below.

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/eoan64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/eoan64' version '20191022.0.0' is up to date...
==> default: Setting the name of the VM: rails-dev-box_default_1571838570411_83143
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 3000 (guest) => 3000 (host) (adapter 1)
    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.
$
fxn commented 4 years ago

I've seen there time outs in other projects too, not sure what is going on, but does not seem related to this particular VM.

Thanks!

fxn commented 4 years ago

Have reverted by now, could not get guest additions working and had no shared folders in particular.

Let's see if this changes in the future.

yahonda commented 4 years ago

Thanks for the update. I have opened an issue at https://bugs.launchpad.net/cloud-images/+bug/1851186 for missing virtual box guest additions.

As I already have installed vagrant-vbguest plugin then this issue did not occur. I already have reproduced this error by uninstalling the vagrant-vbguest plugin.

fabOnReact commented 4 years ago

TL;DR

I was able to setup the environment by adding/changing my VagrantFile (as mentioned from the author Yasuo Honda):

config.vm.box      = 'ubuntu/eoan64' # 19.10
config.vm.boot_timeout = 600

and then running in the terminal:

vagrant plugin install vagrant-vbguest

LONG VERSION

I am experiencing the following issue while running vagrant up. Maybe related to end of support for Ubuntu 19.04 the 23rd of January 2020.

The image for Ubuntu 19.04 is not available at https://cloud-images.ubuntu.com as I verified in the locator tool.

host$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/disco64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: 20200122.0.0
==> default: Loading metadata for box 'ubuntu/disco64'
    default: URL: https://vagrantcloud.com/ubuntu/disco64
==> default: Adding box 'ubuntu/disco64' (v20200122.0.0) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/ubuntu/boxes/disco64/versions/20200122.0.0/providers/virtualbox.box
    default: Download redirected to host: cloud-images.ubuntu.com
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

The requested URL returned error: 404 Not Found

Changing the version to Ubuntu 19.10 (Eoan) solves the issue, but /vagrant shared folder was not available.

vagrant$ ls /vagrant
ls: cannot access '/vagrant': No such file or directory

As suggested from Yasuo Honda and Xavier Noria

vagrant plugin install vagrant-vbguest

The shared folders are available after restarting the machine:

vagrant@rails-dev-box:~$ ls /vagrant
bootstrap.sh  rails      ubuntu-bionic-18.04-cloudimg-console.log
MIT-LICENSE   README.md  Vagrantfile

I read the bug report which was experienced on Virtualbox 5.2.34 and Vagrant 2.2.2 on Ubuntu 18.04.3 LTS. I am currently using MacOS with VirtualBox 6.1.2 (I am just providing this information for investigation purpose).

VirtualBox 6.1.2 is available also for linux at VirtualBox page.

MacOS 10.15.2
VirtualBox 6.1.2 r135662 (Qt5.6.3)
vagrant 2.2.7
vagrant vbguest GuestAdditions 6.1.2

I would be happy to help further with the investigation. Thanks a lot

fxn commented 4 years ago

@fabriziobertoglio1987 thanks! Plugin installation has been documented in https://github.com/rails/rails-dev-box/commit/4d87263a16cb70a8883dbe3446be60dcdc870116.