Every time I run
vagrant up, ubuntu 16.04 freezes and I have to restart it.
I can't event run
vagrant up --debug.
I am using widgetbox-php53 box.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
So, I had the same problem freezing at
booting VM using Ubuntu 16.04 LTS.
And to solve this in some steps with a lot of hard resets - I've updated to Vagrant 2.0.1 and VirtualBox 5.2.
Check what versions you have:
vagrant -v(opened the GUI: Help --> About)
index.lockfiles in folder
sudo dpkg -i vagrant_2.0.1_x86_64.deb
Remove the current virtualbox
sudo apt-get purge virtualbox*to remove all files
dpkg -l | grep virtualbox
sudo apt-get purge unity-scope-virtualbox
Add repository for Virtualbox (use apt to install)
sudo nano /etc/apt/sources.list
deb https://download.virtualbox.org/virtualbox/debian xenial contrib
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
sudo apt-get update
Install latest virtualbox
sudo apt-get install virtualbox-5.2
sudo /sbin/vboxconfigto rebuild the settings
Issues I had
You probably need to destroy your box and build again.
Vagrant user issue
The VirtualBox VM was created with a user that doesn't match the current user running Vagrant. VirtualBox requires that the same user be used to manage the VM that was created. Please re-run Vagrant with that user. This is not a Vagrant issue.
Removed the .vagrant folder
rm -rf .vagrant to solve that.
Duplicated VM names issue
The name of your virtual machine couldn't be set because VirtualBox is reporting another VM with that name already exists. Most of the time, this is because of an error with VirtualBox not cleaning up properly. To fix this, verify that no VMs with that name do exist (by opening the VirtualBox GUI). If they don't, then look at the folder in the error message from VirtualBox below and remove it if there isn't any information you need in there.
I had issues with duplicated Virtualbox names as
VBoxManage: error: Could not rename the directory error prevented
vagrant up from finishing. Just removed the folders in my Virtualbox VMs folder and through the GUI.
Machine index issue
This is what started my adventure and got me here from Googling.
The machine index which stores all required information about running Vagrant environments has become corrupt. This is usually caused by external tampering of the Vagrant data folder. Vagrant cannot manage any Vagrant environments if the index is corrupt. Please attempt to manually correct it. If you are unable to manually correct it, then remove the data file at the path below. This will leave all existing Vagrant environments "orphaned" and they'll have to be destroyed manually.
Basically, you need to upgrade the Virtualbox and Vagrant version.
Vagrant is easy to update (I updated to 2.0.1)
Here is how I updated the Virtualbox(more or less) to 5.1:
sudo apt remove virtualbox-X.X sudo apt-get purge virtualbox-X.X virtualbox-qt virtualbox-dkms
Now, install the Virtualbox(it's important to install with apt)
sudo apt-get install virtualbox-5.1 sudo /sbin/vboxconfig sudo apt-get install software-properties-common sudo apt-add-repository ppa:ansible/ansible sudo apt-get update sudo apt-get install ansible vagrant plugin install vagrant-vbguest vagrant plugin install vagrant-hostsupdater
Restart and build your VM again
PS: Never build vagrant with