2012-12-23 06:47:06 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module ProviderVirtualBox
|
|
|
|
class Config < Vagrant.plugin("2", :config)
|
|
|
|
attr_reader :customizations
|
|
|
|
|
2012-12-25 17:00:06 +00:00
|
|
|
# If set to `true`, then VirtualBox will be launched with a GUI.
|
|
|
|
attr_accessor :gui
|
|
|
|
|
2012-12-23 06:47:06 +00:00
|
|
|
def initialize
|
|
|
|
@customizations = []
|
2012-12-25 17:00:06 +00:00
|
|
|
@gui = UNSET_VALUE
|
2012-12-23 06:47:06 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# Customize the VM by calling `VBoxManage` with the given
|
|
|
|
# arguments.
|
|
|
|
#
|
|
|
|
# When called multiple times, the customizations will be applied
|
|
|
|
# in the order given.
|
|
|
|
#
|
|
|
|
# The special `:name` parameter in the command will be replaced with
|
|
|
|
# the unique ID or name of the virtual machine. This is useful for
|
|
|
|
# parameters to `modifyvm` and the like.
|
|
|
|
#
|
|
|
|
# @param [Array] command An array of arguments to pass to
|
|
|
|
# VBoxManage.
|
|
|
|
def customize(command)
|
|
|
|
@customizations << command
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|