Vagrant fails to bring up xenial64 instance on VirtualBox

Bug #1615579 reported by Bruno Girin
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
vagrant (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

When trying to bring up a local vagrant box using the official vagrant ubuntu/xenial64 image, the process fails with the following error:

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/xenial64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/xenial64' is up to date...
==> default: Setting the name of the VM: ubuntu-xenial-16.04-cloudimg
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 80 (guest) => 8080 (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: ubuntu
    default: SSH auth method: password
    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: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/sbin/ifdown eth1 2> /dev/null

Stdout from the command:

Stderr from the command:

sudo: unable to resolve host ubuntu-xenial
mesg: ttyname failed: Inappropriate ioctl for device

The "unable to resolve hostname" and "ttyname" problems can be fixed through simple modification of a couple of files. However, because the default image doesn't include those, vagrant is unable to bring up a box properly.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: vagrant 1.8.1+dfsg-1
ProcVersionSignature: Ubuntu 4.4.0-34.53-generic 4.4.15
Uname: Linux 4.4.0-34-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Aug 22 11:16:14 2016
InstallationDate: Installed on 2016-05-02 (111 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
PackageArchitecture: all
SourcePackage: vagrant
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Bruno Girin (brunogirin) wrote :
Revision history for this message
pwaring (launchpad-pwaring) wrote :

I can't reproduce this on either of my Ubuntu machines, both of which are running the same version of Vagrant and the Linux kernel.

What happens if you run 'vagrant box update' in the same directory as the Vagrantfile? It could be that you are running an older box which doesn't have this issue fixed (the official Vagrant boxes are updated every few days).

For reference, the commands I ran were:

cd /tmp
vagrant init ubuntu/xenial64
vagrant up

I didn't have the ubuntu/xenial64 box installed, so it fetched the latest version automatically the first time I ran vagrant up.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vagrant (Ubuntu):
status: New → Confirmed
Revision history for this message
Vernon Cole (vernondcole) wrote :

I spent hours trying to find out what was wrong with my Vagrantfile -- but it was the box which is messed up. The clues are:
1) the username is "ubuntu" but it should be "vagrant".
2) the nameserver is not hooked up, so no DNS names are translated.

I tested this morning with the latest everything, on OS-x El Capitan and Ubuntu Make 16.04 host machines.

The first two of these work, the last one does not:

> $ vagrant box list
> cbednarski/ubuntu-1604 (virtualbox, 0.1.0)
> ubuntu/trusty64 (virtualbox, 20160830.0.0)
> ubuntu/xenial64 (virtualbox, 20160909.0.0)

Changed in vagrant (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Edgar Acosta (acosta-edgar) wrote :

I used to us this box without problem. But I faced the same problem when I updated the box. I spent time trying to figure out which version of the box still works.

I found that the last version that works fine is 20160715.0.0

Another thing I noticed is that the file /etc/resolv.conf is empty on all the versions that don't work.

Revision history for this message
pwaring (launchpad-pwaring) wrote :

Is this bug still relevant? I have tried the latest ubuntu/xenial64 (v20201104.0.0) and it boots without any problems.

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.