php[architect] logo

Want to check out an issue? Sign up to receive a special offer.

Vagrant with GUIs and Windows

Posted by on January 29, 2015

Last week, I had the pleasure to present at the Drupal NoVA meetup group about using Vagrant to automate setting up development environments for your projects. Using a VM has been the single biggest change to my workflow in recent years, no matter what CMS or framework I’m using on it.

You can view the slides below.

Building with Virtual Development Environments from Oscar Merida

Afterwards, I received a few questions—which means I need to update the slides—which led to some interesting research for answers.

Can you setup a VM through vagrant which allows GUI-based OS access

Now, Vagrant assumes you’re comfortable at the command line, and if you need to access the guest OS, it’s just a vagrant ssh away. But there are cases where you want more than a terming, maybe for providing a standard desktop environment for a GUI tool. It turns out, of course, that this is possible. Assuming you’re using Virtualbox, add the following line in your Vagrantfile to the block that configures Virtualbox settings.

v.gui = true;

With it, the box will not launch in headless mode. Of course, if using a Linux image your provisioner should install a desktop environment like Gnome or KDE.

For more, see the Vagrant Documentation on Headless Mode and this Question on StackOverflow

Can I install Windows of any flavor?

My initial instinct was that this wouldn’t be possible, because of licensing and activation. However, it turns out that I was wrong. From Windows Boxes for Vagrant Courtesy of Modern.ie:

One of the sites that helped make my environments simple was Modern.ie as they provided a series of Virtual Machine images with multiple versions of Windows with different versions of Internet Explorer installed. These images are available for users on a Mac, Linux or Windows machine by taking advantage of different virtualization technologies including Hyper-V, Parallels, Virtual Box and VMware Player/Fusion.

I’m pleased to be announcing a new way to leverage the Modern.ie VMs for your testing purposes — Vagrant. If you aren’t familiar with Vagrant, Vagrant is a handy tool for your tool belt which is used to create and configure lightweight, reproducible and portable development environments.

Read the post to see the limitations as well as what combinations of of Windows XP through Windows 8.1 and IE 6–11 are available.

Are you using Vagrant in your day-to-day work? What tips would you share with others getting started?


Oscar still remembers downloading an early version of the Apache HTTP server at the end of 1995, and promptly asking "Ok, what's this good for?" He started learning PHP in 2000 and hasn't stopped since. He's worked with Drupal, WordPress, Zend Framework, and bespoke PHP, to name a few. Follow him on Google+.
Tags: , , , ,
 

Responses and Pingbacks

Good information. The challenge I have is that I need to set up and configure 30 local VM’s as quickly as possible. Any suggestions on the best tool for something like this?

Leave a comment

Use the form below to leave a comment: