From 2a2f0a4751a7ea40f7db9941904291746d9729ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=B6ter?= Date: Wed, 12 Aug 2015 14:25:54 +0200 Subject: [PATCH] Use hash of machine name for lock file to avoid problems with invalid characters for file names. --- plugins/providers/virtualbox/action/import_master.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/providers/virtualbox/action/import_master.rb b/plugins/providers/virtualbox/action/import_master.rb index cba6216fd..61b0064eb 100644 --- a/plugins/providers/virtualbox/action/import_master.rb +++ b/plugins/providers/virtualbox/action/import_master.rb @@ -13,7 +13,7 @@ module VagrantPlugins def call(env) master_id_file = env[:machine].box.directory.join("master_id") - env[:machine].env.lock(env[:machine].box.name, retry: true) do + env[:machine].env.lock(Digest::MD5.hexdigest(env[:machine].box.name), retry: true) do env[:master_id] = master_id_file.read.chomp if master_id_file.file? if env[:master_id] && env[:machine].provider.driver.vm_exists?(env[:master_id]) # Master VM already exists -> nothing to do - continue.