Use the proper provider upgrade mechanism in V1 VM

This commit is contained in:
Mitchell Hashimoto 2013-02-06 16:55:49 -08:00
parent acbd024fa2
commit d53e189063
1 changed files with 10 additions and 4 deletions

View File

@ -100,14 +100,20 @@ module VagrantPlugins
new.vm.usable_port_range = self.auto_port_range if self.auto_port_range
if self.boot_mode
new.vm.provider :virtualbox do |vb|
# Enable the GUI if the boot mode is GUI.
new.vm.providers[:virtualbox].config.gui = (self.boot_mode.to_s == "gui")
vb.gui = (self.boot_mode.to_s == "gui")
end
end
# If we have VM customizations, then we enable them on the
# VirtualBox provider on the new VM.
if !self.customizations.empty?
new.vm.provider :virtualbox do |vb|
self.customizations.each do |customization|
new.vm.providers[:virtualbox].config.customize(customization)
vb.customize(customization)
end
end
end
# Re-define all networks.