Tag Archives: vagrant

New Oracle VirtualBox release – 5.1

Tool I use, VirtualBox, has a new version released 5.1. If you are new to this tool – Oracle has an announcement Oracle VM VirtualBox 5.1.0 is now available!, but for me it has two most important changes: Improved Performance and Improved Linux integration. I hope VirtualBox will be much faster now.

Release is out there in repository, just type sudo apt-get install virtualbox-5.1 and upgrade if you can. Because I can’t – another tool, Vagrant, that depends on VirtualBox, stops working. Issue Support Virtualbox 5.1 #7411 is already closed, but there is no stable version release with that patch. for now So I’ll wait until Vagrant 1.8.5 released.

Ubuntu + Vagrant + VirtualBox + Ubuntu = Sleepless night

Because of some migration experiment, required by the project I’m working on, I’ve had interesting issue at last sleepless night with Ubuntu, Vagrant, VirtualBox and more Ubuntu.

My current host setup:

  • Ubuntu 16.04 LTS (up to date)
  • VirtualBox 5.0.24
  • Vagrant 1.8.4

The goal: migrate Vagrant + Puppet development setup from Debian 7 to Ubuntu 16.04. At least try to and get familiar with part of the issues.

Because I’m familiar with Debian and Ubuntu, and all Puppet provisioning scripts done mostly by me or my team members with my supervision – migration of Puppet provisioning went well (almost well, some small changes ant tweaks left, but nothing special).

Troubles appeared a bit later – when I’ve tried to setup project’s NPM requirements inside the box. After running npm install and after few first packages where installed “root” partition of new VM became read-only and installation process failed. That’s a strange issue – PHP dependencies, managed by Composer, went well and without any error or warning.

Installation process of NPM packages just stops and do not respond to any command. In TTY console I see: “Rejecting I/O to offline device“. In SSH console I see many errors like: “glob error { [Error: EIO: i/o error, scandir '/home/<username>/.npm/<packagename>/2.0.1/package']

Spend few hours by searching solution over internet and nothing helps:

  • Upgrading VirtualBox Guest Additions
  • Adding vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"]
  • Adding vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
  • Adding vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant-root", "1"]
  • Running npm install --no-bin-links

By the way – sometimes this ends with kernel panic.

All that time I was using ubuntu/xenial64 box version 20160705.0.0.

One of the main reasons, described on the Internet was “symlinks don’t work on VirtualBox shared folders”. But this is not the case – I perfectly know shared folders issues and I don’t use them for project’s files sync between host and guest.

So, I’ve made clean Ubuntu Xenial install from ISO on fresh created virtual machine and everything went smoothly, from OS install to NPM – everything was installed!

Same good result was with PuppetLabs box puppetlabs/ubuntu-16.04-64-puppet.

This is how just a tiny issue with base box can keep you a bit sleepless. Yes, I know, that was my choice.

Now the question – should I build own box that I trust for this project or use something from third party Vagrant boxes available on Internet?