Class: Vagrant::Actions::VM::Up
- Inherits:
-
Base
- Object
- Base
- Vagrant::Actions::VM::Up
show all
- Defined in:
- lib/vagrant/actions/vm/up.rb
Instance Attribute Summary
Attributes inherited from Base
#runner
Instance Method Summary
collapse
Methods inherited from Base
#cleanup, #execute!, #follows, #initialize, #precedes, #rescue
Methods included from Util
#error_and_exit, included, #logger, #wrap_output
Instance Method Details
#after_import ⇒ Object
22
23
24
25
|
# File 'lib/vagrant/actions/vm/up.rb', line 22
def after_import
persist
setup_mac_address
end
|
#persist ⇒ Object
27
28
29
30
|
# File 'lib/vagrant/actions/vm/up.rb', line 27
def persist
logger.info "Persisting the VM UUID (#{@runner.uuid})..."
@runner.env.persist_vm
end
|
#prepare ⇒ Object
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/vagrant/actions/vm/up.rb', line 5
def prepare
if File.exist?(@runner.env.dotfile_path) && !File.file?(@runner.env.dotfile_path)
raise ActionException.new(:dotfile_error, :env => @runner.env)
end
steps = [Import, Customize, ForwardPorts, SharedFolders, Boot]
steps << Provision if !@runner.env.config.vm.provisioner.nil?
steps.insert(0, MoveHardDrive) if @runner.env.config.vm.hd_location
steps.each do |action_klass|
@runner.add_action(action_klass)
end
end
|
#setup_mac_address ⇒ Object
32
33
34
35
36
|
# File 'lib/vagrant/actions/vm/up.rb', line 32
def setup_mac_address
logger.info "Matching MAC addresses..."
@runner.vm.nics.first.macaddress = @runner.env.config.vm.base_mac
@runner.vm.save(true)
end
|