ubuntu xenial64 box password?
As mention by user @prometee in this launchpad discussion #1569237, you can find the password in:
~/.vagrant.d/ubuntu-VAGRANTSLASH-xenial64/20161221.0.0/virtualbox/Vagrantfile
or:
~/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-xenial64/20161221.0.0/virtualbox/Vagrantfile
depending on your version of Vagrant. (Note the 20161221.0.0
part of the path will vary depending on when the box was downloaded. Also, there might be more than one in your directory.)
Here is mine (line 8):
# Front load the includes
include_vagrantfile = File.expand_path("../include/_Vagrantfile", __FILE__)
load include_vagrantfile if File.exist?(include_vagrantfile)
Vagrant.configure("2") do |config|
config.vm.base_mac = "022999D56C03"
config.ssh.username = "ubuntu"
config.ssh.password = "fbcd1ed4fe8c83b157dc6e0f"
config.vm.provider "virtualbox" do |vb|
vb.customize [ "modifyvm", :id, "--uart1", "0x3F8", "4" ]
vb.customize [ "modifyvm", :id, "--uartmode1", "file", File.join(Dir.pwd, "ubuntu-xenial-16.04-cloudimg-console.log") ]
end
end
FYI, user @racb mention in the same discusison that the this bug report having been filed
to ubuntu and so far no [...] decision has been made yet
about it.
I banged my head against the wall for half a day yesterday until I realised I was running an old version of Virtualbox (5.0.x) and Vagrant (1.8.0)
Updated to VirtualBox 5.1.x and Vagrant 1.8.7 and got better results
Basically the ubuntu/xenial32
and ubuntu/xenial64
images are flawed as they don't come with the vagrant
user out of the box.
This is against the Vagrant specifications
I ended up using v0rtex/xenial64
as recommended in this bug report. Not sure why canonical
is not fixing this
My vagrant file is as follows
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "v0rtex/xenial64"
config.vm.network :private_network, ip: "10.10.10.10"
config.ssh.username = 'vagrant'
config.ssh.password = 'vagrant'
config.vm.provider :virtualbox do |vb|
vb.name = "supercool"
vb.customize ["modifyvm", :id, "--memory", "768"]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
end
If you still want to use the canonical
provided images it is possible using the following approach
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.network :private_network, ip: "10.10.10.10"
config.ssh.insert_key = true
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |vb|
vb.name = "supercool"
vb.customize ["modifyvm", :id, "--memory", "768"]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
end
If you do that the /vagrant
folder will be owned by ubuntu:ubuntu
instead of vagrant:vagrant
. If you have scripts relying on the vagrant
user to be there they will break
It has been fixed at last (2018/01/13): https://bugs.launchpad.net/cloud-images/+bug/1569237/comments/111
You may want to run vagrant box update
and then vagrant destroy
.