Book Image

Creating Development Environments with Vagrant

By : MICHAEL KEITH PEACOCK
Book Image

Creating Development Environments with Vagrant

By: MICHAEL KEITH PEACOCK

Overview of this book

Table of Contents (17 chapters)
Creating Development Environments with Vagrant Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

VirtualBox Guest Additions


First, let's log in to our new virtual machine within VirtualBox. Once logged in, at the terminal, we should run apt-get update to update our package manager.

Vagrant has a set of tools called Guest Additions that provide some key integration points between the virtual machine and VirtualBox; this includes support for shared folders and networking integration.

To install these tools, once the VM is running, we should click on the Devices menu within Virtual Box and click on Install Guest Additions... (Host+D):

This simply boots a virtual CD within the virtual machine; we still need to actually install the Guest Additions, as follows:

  1. The first step is to install a prerequisite, which are the Linux headers:

    sudo apt-get install linux-headers-$(uname -r) build-essential
    
  2. Next, we will mount the virtual CD, which VirtualBox has loaded up into a folder within the VM:

    sudo mount /dev/cdrom /media/cdrom
    
  3. Finally, we will run the installation command:

    sudo sh /media/cdrom...