From a0cf0c3761e90c7d84e05ae7c93d94248a9f9f9f Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 7 Jul 2011 23:27:09 -0700 Subject: [PATCH] Match MAC address using VM customize config to speed up `up` time --- lib/vagrant/action/vm/match_mac_address.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/action/vm/match_mac_address.rb b/lib/vagrant/action/vm/match_mac_address.rb index fc48d5a92..c8db65fa2 100644 --- a/lib/vagrant/action/vm/match_mac_address.rb +++ b/lib/vagrant/action/vm/match_mac_address.rb @@ -10,8 +10,9 @@ module Vagrant raise Errors::VMBaseMacNotSpecified if !env.env.config.vm.base_mac env.ui.info I18n.t("vagrant.actions.vm.match_mac.matching") - env["vm"].vm.network_adapters.first.mac_address = env.env.config.vm.base_mac - env["vm"].vm.save + env["config"].vm.customize do |vm| + vm.network_adapters.first.mac_address = env["config"].vm.base_mac + end @app.call(env) end