Class: ConfigBuilder::Model::Provider::Virtualbox
- Defined in:
- lib/config_builder/model/provider/virtualbox.rb
Overview
Instance Attribute Summary collapse
-
#customize ⇒ Array<String>
instantiation.
Instance Method Summary collapse
-
#auto_nat_dns_proxy ⇒ Boolean
Vagrant by default will make "smart" decisions to enable/disable the NAT DNS proxy.
-
#check_guest_additions ⇒ Boolean
If true, will check if guest additions are installed and up to date.
- #configure_customize(config, val) ⇒ Object
- #configure_linked_clone(config, val) ⇒ Object
- #configure_linked_clone_snapshot(config, val) ⇒ Object
-
#destroy_unused_network_interfaces ⇒ Boolean
If true, unused network interfaces will automatically be deleted.
-
#functional_vboxsf ⇒ Boolean
Whether or not this VM has a functional vboxsf filesystem module.
-
#gui ⇒ Boolean
If set to
true
, then VirtualBox will be launched with a GUI. -
#initialize ⇒ Virtualbox
constructor
A new instance of Virtualbox.
- #instance_id ⇒ Object
-
#linked_clone ⇒ Boolean
If set to
true
, then a linked clone is created from a master VM generated from the specified box. -
#linked_clone_snapshot ⇒ String
The snapshot to base the linked clone from.
-
#name ⇒ String
This should be set to the name of the machine in the VirtualBox GUI.
Methods inherited from Base
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
#initialize ⇒ Virtualbox
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
#customize ⇒ Array<String>
instantiation.
20 |
# File 'lib/config_builder/model/provider/virtualbox.rb', line 20 def_model_attribute :customize |
Instance Method Details
#auto_nat_dns_proxy ⇒ Boolean
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.
9 |
# File 'lib/config_builder/model/provider/virtualbox.rb', line 9 def_model_attribute :auto_nat_dns_proxy |
#check_guest_additions ⇒ Boolean
If true, will check if guest additions are installed and up to date. By default, this is true.
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_interfaces ⇒ Boolean
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.
34 |
# File 'lib/config_builder/model/provider/virtualbox.rb', line 34 def_model_attribute :destroy_unused_network_interfaces |
#functional_vboxsf ⇒ Boolean
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.
72 |
# File 'lib/config_builder/model/provider/virtualbox.rb', line 72 def_model_attribute :functional_vboxsf |
#gui ⇒ Boolean
If set to true
, then VirtualBox will be launched with a GUI.
39 |
# File 'lib/config_builder/model/provider/virtualbox.rb', line 39 def_model_attribute :gui |
#instance_id ⇒ Object
78 79 80 |
# File 'lib/config_builder/model/provider/virtualbox.rb', line 78 def instance_id 'virtualbox' end |
#linked_clone ⇒ Boolean
If set to true
, then a linked clone is created from a master
VM generated from the specified box.
45 |
# File 'lib/config_builder/model/provider/virtualbox.rb', line 45 def_model_attribute :linked_clone |
#linked_clone_snapshot ⇒ String
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.
53 |
# File 'lib/config_builder/model/provider/virtualbox.rb', line 53 def_model_attribute :linked_clone_snapshot |
#name ⇒ String
This should be set to the name of the machine in the VirtualBox GUI.
65 |
# File 'lib/config_builder/model/provider/virtualbox.rb', line 65 def_model_attribute :name |