Repository is archived
No commit activity in last 3 years
No release in over 3 years
A vagrant plugin to create a mount sparse images into the guest VM.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.2.0
>= 1.2
 Project Readme

vagrant-sparseimage

vagrant-sparseimage is a Vagrant plugin which automatically creates and mounts a sparseimage for the guest system to share. This allows alternative filesystems to be used between the host and the guest (eg. journaled, case sensitive).

The image can be browser from OSX Finder and is completely configurable. It can be unmounted automatically when the guest is halted, or left mounted for other uses. When the Vagrant guest is destroyed, the image can optionally be destroyed too.

Dependencies

Only runs in OSX. Requires Vagrant v1.2+.

Installation

See building below for building the gem.

Use vagrant plugin to install the gem in your Vagrant environment:

$ vagrant plugin install vagrant-sparseimage.gem

Configuration

See example-box/Vagrantfile. Each vm has a sparseimage configuration object which can have an arbitrary number of images added to it.

The following config properties for config.sparseimage are compulsory:

  • volume_name: the name that will be used to mount the volume and derive its filename
  • image_type: SPARSEIMAGE or SPARSEBUNDLE
  • image_fs: filesystem type: see below for list of supported formats
  • vm_mountpoint: where to mount the image wihtin the guest
  • image_size: size in MB. both image types will consume space lazily
  • image_folder: the folder on the host to store the image file in

The following properties are optional:

  • auto_unmount: whether to unmount the image from the host when the guest is stopped. Defaults to true.
  • mounted_name: the full path to mount the sparse bundles in. Defaults using the name of the volume.

Filesystems

  • HFS+
  • HFS+J (JHFS+ in the config)
  • HFSX
  • JHFS+X
  • MS-DOS
  • UDF

Building

If you installed vagrant using RubyGems, use:

$ bundle install
$ gem build vagrant-sparseimage.gemspec

If you installed Vagrant with a prebuilt package or installer, you need to use Vagrant's gem wrapper: