Class: ConfigBuilder::Model::Provider::Virtualbox

Inherits:
Base
  • Object
show all
Defined in:
lib/config_builder/model/provider/virtualbox.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#eval_overrides, #to_proc

Methods inherited from Base

#attr, #attrs=, #call, #configure!, def_model_attribute, def_model_delegator, def_model_id, def_model_option, #eval_models, #instance_options, model_attributes, model_delegators, #model_delegators, model_options, new_from_hash, #to_proc, #with_attr

Constructor Details

#initializeVirtualbox

Returns a new instance of Virtualbox.



74
75
76
# File 'lib/config_builder/model/provider/virtualbox.rb', line 74

def initialize
  @defaults = {:customize => []}
end

Instance Attribute Details

#customizeArray<String>

instantiation.

Returns:

  • (Array<String>)

    A list of customize arguments to use upon VM



20
# File 'lib/config_builder/model/provider/virtualbox.rb', line 20

def_model_attribute :customize

Instance Method Details

#auto_nat_dns_proxyBoolean

Vagrant by default will make "smart" decisions to enable/disable the NAT DNS proxy. If this is set to true, then the DNS proxy will not be enabled, and it is up to the end user to do it.

Returns:

  • (Boolean)


9
# File 'lib/config_builder/model/provider/virtualbox.rb', line 9

def_model_attribute :auto_nat_dns_proxy

#check_guest_additionsBoolean

If true, will check if guest additions are installed and up to date. By default, this is true.

Returns:

  • (Boolean)


15
# File 'lib/config_builder/model/provider/virtualbox.rb', line 15

def_model_attribute :check_guest_additions

#configure_customize(config, val) ⇒ Object



83
84
85
86
87
# File 'lib/config_builder/model/provider/virtualbox.rb', line 83

def configure_customize(config, val)
  val.each do |cmd|
    config.customize(cmd)
  end
end

#configure_linked_clone(config, val) ⇒ Object



90
91
92
93
# File 'lib/config_builder/model/provider/virtualbox.rb', line 90

def configure_linked_clone(config, val)
  # Linked clone support landed in Vagrant 1.8
  config.linked_clone = val if (Vagrant::VERSION > '1.8')
end

#configure_linked_clone_snapshot(config, val) ⇒ Object



96
97
98
99
# File 'lib/config_builder/model/provider/virtualbox.rb', line 96

def configure_linked_clone_snapshot(config, val)
  # Linked clone support landed in Vagrant 1.8
  config.linked_clone_snapshot = val if (Vagrant::VERSION > '1.8')
end

#destroy_unused_network_interfacesBoolean

If true, unused network interfaces will automatically be deleted. This defaults to false because the detection does not work across multiple users, and because on Windows this operation requires administrative privileges.

Returns:

  • (Boolean)


34
# File 'lib/config_builder/model/provider/virtualbox.rb', line 34

def_model_attribute :destroy_unused_network_interfaces

#functional_vboxsfBoolean

Whether or not this VM has a functional vboxsf filesystem module. This defaults to true. If you set this to false, then the "virtualbox" synced folder type won't be valid.

Returns:

  • (Boolean)


72
# File 'lib/config_builder/model/provider/virtualbox.rb', line 72

def_model_attribute :functional_vboxsf

#guiBoolean

If set to true, then VirtualBox will be launched with a GUI.

Returns:

  • (Boolean)


39
# File 'lib/config_builder/model/provider/virtualbox.rb', line 39

def_model_attribute :gui

#instance_idObject



78
79
80
# File 'lib/config_builder/model/provider/virtualbox.rb', line 78

def instance_id
  'virtualbox'
end

#linked_cloneBoolean

If set to true, then a linked clone is created from a master VM generated from the specified box.

Returns:

  • (Boolean)


45
# File 'lib/config_builder/model/provider/virtualbox.rb', line 45

def_model_attribute :linked_clone

#linked_clone_snapshotString

The snapshot to base the linked clone from. If this isn't set a snapshot will be made with the name of "base" which will be used.

If this is set, then the snapshot must already exist.

Returns:

  • (String)


53
# File 'lib/config_builder/model/provider/virtualbox.rb', line 53

def_model_attribute :linked_clone_snapshot

#nameString

This should be set to the name of the machine in the VirtualBox GUI.

Returns:

  • (String)


65
# File 'lib/config_builder/model/provider/virtualbox.rb', line 65

def_model_attribute :name