Question

I am trying to create custom vagrant box file. I plan to use VirtualBox and I am reading this documentation: https://docs.vagrantup.com/v2/virtualbox/boxes.html

When the doc says,"VirtualBox Guest Additions must be installed so that things such as shared folders can function. Installing guest additions also usually improves performance since the guest OS can make some optimizations by knowing it is running within VirtualBox.

Before installing the guest additions, you'll need the linux kernel headers and the basic developer tools ...", but it doesn't say if this is to be done on the guest OS or host OS where I installed vargant and VirtualBox.

So I am guessing that I need to install a VM on VirtualBox and install the "VirtualBox Guest Addtitions" on this VM. Am I right?

Was it helpful?

Solution

The guest additions need to be installed on the guest OS. The host operating system only needs Virtualbox and vagrant installed. There are various descriptions out there for different operating systems and versions. It depends a bit on what your guest os looks like, so without a hint on what guest OS you are installing, I cannot provide more information.

Just FYI: You can use the boxes from vagrantcloud.com as a base, boot it and install softwareon top, exporting it to create "your" base box. In most cases, this works pretty well and you don't need to set up a whole new box. Take a look at the featured boxes, e.g. from chef. Chef boxes are the most basic setup one can create with really just the OS and the things vagrant need (ssh key, guest additions and so on).

I got a repo where I take a chef box and add some of my standard software stack (using chef) and export it as a new box. Have a look at Sgoettschkes/va for more information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top