Today we announce the release of Vagrant 1.8. Vagrant is a tool for building and managing development environments.
Vagrant 1.8 introduces a number of major features and hundreds of improvements and bug fixes. The major features are outlined below and the full list of improvements can be found in the official CHANGELOG. Thanks to the hundreds of contributors that helped make this release bigger and better than it could've been with just us working on it.
You can download Vagrant 1.8 from the project website. There are no major backward incompatibilities so you should be able to drop-in the update and get working right away!
Read on to learn more about the major new features in Vagrant 1.8.
Vagrant now uses linked clones to import boxes for VirtualBox and VMware. Linked cloning is a feature supported by many hypervisors that dramatically speeds up imports by only creating a differential disk versus copying the entire disk image of the virtual machine.
Linked cloning will happen automatically if your system supports it. Providers other than VirtualBox and VMware can be updated outside of Vagrant to support linked cloning automatically.
vagrant up times will be much faster and the amount of disk space
used will be significantly reduced.
As an anecdotal measure, a small Linux box on my machine went from a 10
second import to less than second. And a Windows box (typically very large)
went from a 40 second import also to less than a second.
The catch with linked cloning is that the original box can't be removed
until all environments using that box are destroyed. If you try to
vagrant box remove a box that is in use, Vagrant will give you a warning.
You can also force remove it, but this will corrupt any environments
using that box.
A new command
vagrant snapshot has been introduced to take and restore
point-in-time snapshots of development environments. VirtualBox and VMware
are both supported at release time, and other providers can begin
supporting snapshots through their own updates.
Snapshots are a feature of hypervisors that allow the point-in-time state of a virtual machine to be saved and restored. This is useful when experimenting with the virtual machine: you can take a snapshot before the experiment, and rollback (restore) at any point if something goes wrong.
For Vagrant, we expect this will be very useful in a variety of development cases. Some example use cases are:
When working on web applications, you can snapshot prior to manual testing and restore back to a clean database state.
When working on Chef, Puppet, etc. you can now snapshot prior to a run and rollback afterwards. This lets the feedback loop be shortened considerably.
Using snapshots is very easy. Very simple "push" and "pop" commands are available for quickly changing states:
$ vagrant snapshot push ...
$ vagrant ssh ...
$ vagrant snapshot pop ...
For more advanced users, you can also take multiple snapshots and name them. This lets you restore back to any arbitrary snapshot at any time:
$ vagrant snapshot save pre-db ...
$ vagrant snapshot restore pre-db ...
Snapshots are very easy to use and we believe will greatly improve workflows surrounding Vagrant.
Other Improvements and Smaller Features
In addition to the above two features, dozens of major improvements have been introduced in Vagrant 1.8. We outline some of these below but for the full list see the CHANGELOG.
New command: powershell - If your Vagrant environment is a Windows machine with WinRM enabled, the
vagrant powershellcommand will drop you into a PowerShell prompt.
New command: port - This will display a list of forwarded ports to the guest machine. This is especially useful if Vagrant is auto-correcting ports in the case of collisions.
New provisioner: ansible_local - This executes Ansible on the guest machine rather than on the host machine.
Vagrant now automatically installs VirtualBox for a smoother getting started experience on Mac OS X and Windows.
Performance improvements all around that should result in Vagrant being slightly faster overall.
More accurate pruning of the global state cache so that machine states are more quickly updated.
And more! See the full CHANGELOG for more details.
Vagrant 1.8 is our first major Vagrant release since releasing Otto. There was a lot of concern around the future of Vagrant since announcing Otto as the "successor to Vagrant". Many of the features of Vagrant 1.8 are the result of Otto needing them to reach that goal. Vagrant 1.8 is an example of how Vagrant will continue to improve -- in major ways -- alongside Otto.
The Vagrant 1.* series is now very mature. We plan to continue to make polish improvements and release Vagrant 1.9, and we're planning to release Vagrant 2.0 sometime in 2016. Following this, we have some more dramatic feature changes planned for 2.x.
Enjoy Vagrant 1.8! Happy holidays!