ubuntu/eoan64 box does not contain guest additions

Bug #1851186 reported by Yasuo Honda
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-images
New
Undecided
John Chittum

Bug Description

https://github.com/rails/rails-dev-box project is making use of Vagrant Ubuntu boxes.

Recently I attempted to upgrade Vagrant box Ubuntu version from 19.04 to 19.10 https://github.com/rails/rails-dev-box/pull/169 then
it gets the following error due to missing Virtualbox guest additions.

Current workaround is installing `vagrant-vbguest` vagrant plugin.

* Error with Ubuntu 10.10

```
$ 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 '20191031.0.0' is up to date...
==> default: Setting the name of the VM: rails-dev-box_default_1572829689700_69040
==> 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
    default: Warning: Connection reset. 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: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: No guest additions were detected on the base box for this VM! Guest
    default: additions are required for forwarded ports, shared folders, host only
    default: networking, and more. If SSH fails on this machine, please install
    default: the guest additions and repackage the box to continue.
    default:
    default: This is not an error message; everything may continue to work properly,
    default: in which case you may ignore this message.
==> default: Setting hostname...
==> default: Mounting shared folders...
    default: /vagrant => /home/yahonda/git/rails-dev-box
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:

/sbin/mount.vboxsf: mounting failed with the error: No such device

```

* Vagrantfile

```
$ more Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure('2') do |config|
  config.vm.box = 'ubuntu/eoan64' # 19.10
  config.vm.hostname = 'rails-dev-box'

  config.vm.network :forwarded_port, guest: 3000, host: 3000

  config.vm.provision :shell, path: 'bootstrap.sh', keep_color: true

  config.vm.provider 'virtualbox' do |v|
    v.memory = ENV.fetch('RAILS_DEV_BOX_RAM', 2048).to_i
    v.cpus = ENV.fetch('RAILS_DEV_BOX_CPUS', 2).to_i
  end

  config.vm.boot_timeout = 600

end
$
```

* Workaround

```
$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Fetching: micromachine-3.0.0.gem (100%)
Fetching: vagrant-vbguest-0.20.0.gem (100%)
Installed the plugin 'vagrant-vbguest (0.20.0)'!
$
```

Yasuo Honda (yahonda)
description: updated
description: updated
tags: added: id-5dd2cf798e62ed0cdf203dfc
Revision history for this message
Germain Chazot (gchazot) wrote :

This problem is also present in current boxes:
* `focal64` 20200116.1.0
* `eoan64` 20200114.0.0

It's blocking development for those versions of Ubuntu for me as it prevents creation of a local development environment with the local folder mounted inside the virtual machine.

For reference I am running:
* Ubuntu 18.04.3 LTS
* Vagrant 2.2.2
* Virtualbox 5.2.34_Ubuntur133883

Revision history for this message
Germain Chazot (gchazot) wrote :

Note that the suggested workaround (using vagrant plugin vagrant-vbguest) works for `eoan64` but not for `focal64`

Revision history for this message
Yasuo Honda (yahonda) wrote :

In my environment installing vagrant-vbguest plugin workarounds this issue.

% vagrant box list
ubuntu/focal64 (virtualbox, 20200423.0.0)

% vagrant plugin list
vagrant-vbguest (0.23.0, global)

Revision history for this message
Germain Chazot (gchazot) wrote :
Download full text (8.4 KiB)

Still doesn't work for me :-(

I have the same plugin version as Yasuo Honda ^ so I'm thinking could it be related to VirtualBox and guest additions versions ?

Here's the output of my attempt:

% /tmp/vagrant_ubuntu_bug$ VBoxManage --version
5.2.34_Ubuntur133883

% /tmp/vagrant_ubuntu_bug$ vagrant version
Installed Version: 2.2.2

% /tmp/vagrant_ubuntu_bug$ vagrant plugin list
vagrant-disksize (0.1.3, global)
vagrant-hosts (2.9.0, global)
vagrant-vbguest (0.23.0, global)

% /tmp/vagrant_ubuntu_bug$ vagrant box list
ubuntu/focal64 (virtualbox, 20200428.0.0)

% /tmp/vagrant_ubuntu_bug$ cat Vagrantfile
Vagrant.configure("2") do |config|

  config.vm.box = "ubuntu/focal64"

  config.vm.provider :virtualbox do |vb|
    vb.memory = 2048
    vb.cpus = 4
  end

end

% /tmp/vagrant_ubuntu_bug$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/focal64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/focal64' is up to date...
==> default: Setting the name of the VM: vagrant_ubuntu_bug_default_1588151986857_63626
==> 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
    default: Warning: Connection reset. 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: Machine booted and ready!
[default] No Virtualbox Guest Additions installation found.
rmmod: ERROR: Module vboxsf is not currently loaded
rmmod: ERROR: Module vboxguest is not currently loaded
Reading package lists...
Building dependency tree...
Reading state information...
Package 'virtualbox-guest-x11' is not installed, so not removed
The following packages will be REMOVED:
  virtualbox-guest-utils*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 5832 kB disk space will be freed.
(Reading database ... 62770 files and directories currently installed.)
Removing virtualbox-guest-utils (6.1.6-dfsg-1) ...
Processing triggers for man-db (2.9.1-1) ...
(Reading database ... 62757 files and directories currently installed.)
Purging configuration files for virtualbox-guest-utils (6.1.6-dfsg-1) ...
Processing triggers for systemd (245.4-4ubuntu3) ...
Reading package lists...
Building dependency tree...
Reading state information...
linux-headers-5.4.0-28-generic is already the newest version (5.4....

Read more...

Éric St-Jean (esj)
Changed in cloud-images:
assignee: nobody → John Chittum (jchittum)
Revision history for this message
John Chittum (jchittum) wrote :

A fix for this has been released as part of 1873506. The latest eoan images have guest additions installed and can mount shared folders.

Revision history for this message
Yasuo Honda (yahonda) wrote :

Thank you for the fix.

Revision history for this message
Germain Chazot (gchazot) wrote :

Awesome. Thanks for the fix!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.