Vagrant version on Xenial does not support upgraded Virtualbox version

Bug #1759829 reported by dastillero
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vagrant (Ubuntu)
Fix Released
Undecided
Gianfranco Costamagna
Xenial
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
* Vagrant on xenial

[Test Case]
* Vagrant needs to work with the major jump we did for vbox in ubuntu

[Regression Potential]
* None, the new profile is a copy-paste from the 5.0 one, and it makes it work again (because of version mismatch)
* In case of regressions, I'll cherry-pick fixes too

[Other Info]
After Virtualbox packages were upgraded to version 5.1.34 in order to fix and issue with newer Xenial kernels (see https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1736116) vagrant package became outdated.
Current vagrant version on Xenial is 1.8.1 which supports Virtualbox until version 5.0, so we need vagrant to be updated (backport from Artful?) so it can support the new version on repos.

[Ubuntu release]
Description: Ubuntu 16.04.4 LTS
Release: 16.04

[Package version]
vagrant/xenial-updates,xenial-updates 1.8.1+dfsg-1ubuntu0.1

[Expected behaviour]
Current Virtualbox package version on Xenial (virtualbox/xenial-updates,now 5.1.34-dfsg-0ubuntu1.16.04.2) repos supported

[Problems found/reported error]
The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:

Vagrant has detected that you have a version of VirtualBox installed
that is not supported by this version of Vagrant. Please install one of
the supported versions listed below to use Vagrant:

4.0, 4.1, 4.2, 4.3, 5.0

A Vagrant update may also be available that adds support for the version
you specified. Please check www.vagrantup.com/downloads.html to download
the latest version.

Thanks!

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hello, thanks for opening this bug
Can you please try the build I did upload here?
https://launchpad.net/~costamagnagianfranco/+archive/ubuntu/locutusofborg-ppa/+packages

thanks!

Vlad Orlov (monsta)
tags: added: xenial
Revision history for this message
dastillero (dastillero) wrote :

Hi @LocutusOfBorg,

I tried the build you uploaded and it threw the next error when running "vagrant up":

/usr/share/vagrant/plugins/providers/virtualbox/driver/meta.rb:64:in `initialize': uninitialized constant VagrantPlugins::ProviderVirtualBox::Driver::Meta::Version_5_1 (NameError)
Did you mean? VagrantPlugins::ProviderVirtualBox::Driver::Version_5_0
               VagrantPlugins::ProviderVirtualBox::Driver::Version_4_1
               VagrantPlugins::ProviderVirtualBox::Driver::Version_4_3
               VagrantPlugins::ProviderVirtualBox::Driver::Version_4_2
               VagrantPlugins::ProviderVirtualBox::Driver::Version_4_0
 from /usr/share/vagrant/plugins/providers/virtualbox/provider.rb:20:in `new'
 from /usr/share/vagrant/plugins/providers/virtualbox/provider.rb:20:in `usable?'
 from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:347:in `block in default_provider'
 from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:345:in `each'
 from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:345:in `default_provider'
 from /usr/lib/ruby/vendor_ruby/vagrant/plugin/v2/command.rb:174:in `block in with_target_vms'
 from /usr/lib/ruby/vendor_ruby/vagrant/plugin/v2/command.rb:201:in `block in with_target_vms'
 from /usr/lib/ruby/vendor_ruby/vagrant/plugin/v2/command.rb:183:in `each'
 from /usr/lib/ruby/vendor_ruby/vagrant/plugin/v2/command.rb:183:in `with_target_vms'
 from /usr/share/vagrant/plugins/commands/up/command.rb:89:in `block in execute'
 from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:249:in `block (2 levels) in batch'
 from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:247:in `tap'
 from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:247:in `block in batch'
 from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:246:in `synchronize'
 from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:246:in `batch'
 from /usr/share/vagrant/plugins/commands/up/command.rb:88:in `execute'
 from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:42:in `execute'
 from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:268:in `cli'
 from /usr/bin/vagrant:173:in `<main>'

The Vagrantfile I'm using is the next one just in case:

# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.vm.box = "williamyeh/ubuntu-trusty64-docker"

  # Provision the VM with a script
  config.vm.provision "shell", path: "vagrant_provision.sh"

  # Forward SSH
  config.vm.network :forwarded_port, guest: 22, host: 2244, id: 'ssh'

  # Mount current directory on guest
  config.vm.synced_folder ".", "/vagrant"

  # Set hostname
  config.vm.hostname = "dev-factory"

  # Custom VM changes
  config.vm.provider "virtualbox" do |vb|
     # Use VBoxManage to customize the VM. For example to change memory:
     vb.name = "devfactory"
     vb.customize ["modifyvm", :id, "--memory", "768"]
     vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
  end
end

Thanks!

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Please try the one I'm uploading right now

Revision history for this message
dastillero (dastillero) wrote :
Download full text (4.2 KiB)

@LocutusOfBorg it worked now.
I was able to bring a VM up, access it via SSH, suspend it, resume it and finally halt it without any issues (I'm pasting the log below). Just tell me if you want me to test anything else.

Thanks!

vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'williamyeh/ubuntu-trusty64-docker' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'williamyeh/ubuntu-trusty64-docker'
    default: URL: https://vagrantcloud.com/williamyeh/ubuntu-trusty64-docker
==> default: Adding box 'williamyeh/ubuntu-trusty64-docker' (v1.12.1.20160830) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/williamyeh/boxes/ubuntu-trusty64-docker/versions/1.12.1.20160830/providers/virtualbox.box
==> default: Successfully added box 'williamyeh/ubuntu-trusty64-docker' (v1.12.1.20160830) for 'virtualbox'!
==> default: Importing base box 'williamyeh/ubuntu-trusty64-docker'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'williamyeh/ubuntu-trusty64-docker' is up to date...
==> default: Setting the name of the VM: devfactory
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2244 (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:2244
    default: SSH username: vagrant
    default: SSH auth method: private key
    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: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 5.0.24
    default: VirtualBox Version: 5.1
==> default: Setting hostname...

vagrant status
Current machine states:

default running (virtualbox)

The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.

...

Read more...

Changed in vagrant (Ubuntu):
status: New → In Progress
assignee: nobody → LocutusOfBorg (costamagnagianfranco)
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Proposed package upload rejected

An upload of vagrant to xenial-proposed has been rejected from the upload queue for the following reason: "There seems to be some leftover patch file in debian/patches/ called 'fix', which seems to have been merged into the cherry-pick. Also, please rename the newly added patch into something that makes sense - it's good practice to follow the same patch-naming convention as other patches in the given package. After that, it's good to be acceptedd.".

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello dastillero, or anyone else affected,

Accepted vagrant into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/vagrant/1.8.1+dfsg-1ubuntu0.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in vagrant (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
dastillero (dastillero) wrote :

I've just installed and tested the vagrant version uploaded to the -proposed repo (vagrant/xenial-proposed,xenial-proposed,now 1.8.1+dfsg-1ubuntu0.2) and I didn't find any issues so far.
Basically I up'ed a VM, checked that I can access it without problems, then suspend/resume halt and up again.

Please find the log I got attached.

Thanks!

Revision history for this message
dastillero (dastillero) wrote :

Sorry sil2100, I didn't find how to change the tag from verification-needed-xenial to verification-done-xenial, could you please or costamagnagianfranco manage that?.

Thanks!

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Done! thanks!

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Changed in vagrant (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vagrant - 1.8.1+dfsg-1ubuntu0.2

---------------
vagrant (1.8.1+dfsg-1ubuntu0.2) xenial; urgency=medium

  * 0014-support-vbox-5.1.patch: Add support for virtualbox 5.1 with upstream
    commit b57b0e0d48fe8b4196ca6b7e01bb6c1ecb4b69f9 (LP: #1759829)

 -- Gianfranco Costamagna <email address hidden> Thu, 29 Mar 2018 15:23:19 +0200

Changed in vagrant (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for vagrant has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.