vagrant up fails with `bash: line 4: setup: command not found`

Bug #1740178 reported by Jarl
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-images
Invalid
Undecided
Unassigned

Bug Description

On a Ubuntu 17.10 and vagrant 2.0.1 installed from https://www.vagrantup.com/downloads.html

I do a

vagrant init ubuntu/artful32
vagrant up

This results in
-----------------------------------------
==> default: Machine booted and ready!
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 5.1.28
VBoxService inside the vm claims: 5.1.30
Going on, assuming VBoxService is correct...
[default] GuestAdditions seems to be installed (5.1.30) correctly, but not running.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 5.1.28
VBoxService inside the vm claims: 5.1.30
Going on, assuming VBoxService is correct...
Failed to start vboxadd.service: Unit vboxadd.service not found.
Failed to start vboxadd-service.service: Unit vboxadd-service.service not found.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 5.1.28
VBoxService inside the vm claims: 5.1.30
Going on, assuming VBoxService is correct...
bash: line 4: setup: command not found
==> default: Checking for guest additions in VM...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

 setup

Stdout from the command:

Stderr from the command:

bash: line 4: setup: command not found
-----------------------------------------

I can "fix" it with `vagrant vbguest --do install`

vagrant@ubuntu-artful:~$ cat /etc/cloud/build.info
build_name: server
serial: 20171220

Revision history for this message
Chris Glass (tribaal) wrote :

I cannot reproduce this issue on my setup (running on Xenial): https://pastebin.ubuntu.com/26312647/

This means the problem is likely not with the image but with your setup.

It seems like you are installing vagrant from the vagrant upstream *debian* package, and not from the Ubuntu package, which is likely to cause funny interactions.

Please try again after install vagrant and virtualbox from a supported source - in other words:

"sudo apt install vagrant"

Revision history for this message
John Patrick (nhoj.patrick) wrote :

I can reproduce this same error on a Mac, see duplicate defect https://bugs.launchpad.net/cloud-images/+bug/1740797

I've got vagrant 2.0.1 and virtualbox 5.1.30.

Revision history for this message
John Patrick (nhoj.patrick) wrote :

Also my original defect that was marked as a duplicate was using ubuntu/artful64, not ubuntu/artful32 which this defect is talking about.

https://bugs.launchpad.net/cloud-images/+bug/1740797

Revision history for this message
Chris Glass (tribaal) wrote :

Well, that's weird.

Virtualbox guest additions 5.1.30 *are* installed on the artful images (you can check that by running "apt-cache policy virtualbox-guest-utils" inside the machine).

The virtualbox version I'm running is 5.1.30 as well, from the Ubuntu repositories.

While I don't think it's too relevant, I'm running vagrant 1.9.1

Revision history for this message
Jarl (jarl-dk) wrote :

The choice of ubuntu/artful32 is arbitrary. The same problem exists for ubuntu/artful64

Revision history for this message
Jarl (jarl-dk) wrote :

To be completely honest This bug is found using vagrant from hashicorp:
$ LANG=C aptitude show vagrant
Package: vagrant
Version: 1:2.0.1
State: installed
Automatically installed: no
Priority: extra
Section: default
Maintainer: HashiCorp <email address hidden>
Architecture: amd64
Uncompressed Size: 195 M
Description: no description given

Homepage: https://www.vagrantup.com/

I will try to reproduce using the vagrant package shiped with ubuntu.

Revision history for this message
Jarl (jarl-dk) wrote :

After retrying this with ubuntus version of vagrant I cannot reproduce this problem.

$ LANG=C aptitude show vagrant
Package: vagrant
Version: 1.9.1+dfsg-1
State: installed
Automatically installed: no
Priority: optional
Section: universe/admin
Maintainer: Ubuntu Developers <email address hidden>
Architecture: all
Uncompressed Size: 2551 k
Depends: bsdtar, curl, openssh-client, ruby, ruby-bundler (>= 1.12.5), ruby-childprocess (>= 0.3.7),
         ruby-erubis (>= 2.7.0), ruby-i18n (>= 0.6.0), ruby-listen, ruby-log4r (>= 1.1.9),
         ruby-net-scp (>= 1.1.0), ruby-net-sftp, ruby-net-ssh (>= 1:2.6.6), ruby-nokogiri,
         ruby-rb-inotify, ruby-rest-client
Suggests: virtualbox (>= 4.0)
Description: Tool for building and distributing virtualized development environments
 This package provides the tools to create and configure lightweight, reproducible, and portable
 virtual environments.

 Vagrant uses Oracle??s VirtualBox to create its virtual machines and then uses Chef or Puppet to
 provision them.
Homepage: http://vagrantup.com/

So conclusion must be that there is no problem with cloud image. Neither with ubuntus version of vagrant but it is related to the latest version of vagrant from Hashicorp.

Changed in cloud-images:
status: New → Invalid
Revision history for this message
Dan Watkins (oddbloke) wrote :

I've just filed https://github.com/hashicorp/vagrant/issues/9334 asking for some help from the Vagrant folks with working out what the problem is here.

As it looks like the box is broken on Vagrant 2.0.1 regardless of the host environment, I'm going to reopen this as that's definitely not a state of affairs that we're happy with.

Changed in cloud-images:
status: Invalid → Confirmed
Revision history for this message
John Patrick (nhoj.patrick) wrote :

I tried with Vagrant 2 before upgrading to Vagrant 2.0.1 to see if that fixed the issue, but it didn't.

I've also tried other ubuntu 64bit images which are listed below and they all work with 2 and 2.0.1, it's just the ubuntu/artful64 that fails for me on Mac.

ubuntu/trusty64
ubuntu/xenial64
ubuntu/zesty64

Revision history for this message
Jarl (jarl-dk) wrote :

After uninstalling all versions of vagrant and reinstalling the vagrant version (2.0.1) from Hashicorp I can no longer reproduce the problem... In the process I have lost (i.e. uninstalled) all vagrant plugins. So one of them may very well be the cause of the problem. I think it has been https://github.com/dotless-de/vagrant-vbguest

Revision history for this message
Jarl (jarl-dk) wrote :

It is definitely https://github.com/dotless-de/vagrant-vbguest causing the problem. It is reproducible with that plugin. Sorry for wasting your time. I will file a bug to that project.

Revision history for this message
Jarl (jarl-dk) wrote :
Revision history for this message
Dan Watkins (oddbloke) wrote :

I've had a quick browse through vagrant-vbguest, and I don't think there's anything for us to do to the Vagrant images, so I'm going to close this out.

Please do reopen it if there are any changes required to support the fix there!

Changed in cloud-images:
status: Confirmed → Invalid
tags: added: id-5a4b99b05e4bd6a0fdd2580e
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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