Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Vagrant with GUIs and Windows

Parent Feed: 

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.

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?

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web