Default VM name for VirtualBox contains Vagrantfile VM name [GH-1281]

This commit is contained in:
Mitchell Hashimoto 2013-07-18 00:05:23 -04:00
parent 3028940adb
commit 3e9c1cfcde
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,8 @@ BUG FIXES:
- NFS export fsid's are now 32-bit integers, rather than UUIDs. This
lets NFS exports work with Linux kernels older than 2.6.20. [GH-1127]
- NFS export allows access from all private networks on the VM. [GH-1204]
- Default VirtualBox VM name now contains the machine name as defined
in the Vagrantfile, helping differentiate multi-VM. [GH-1281]
## 1.2.4 (July 16, 2013)

View File

@ -14,7 +14,7 @@ module VagrantPlugins
# If no name was manually set, then use a default
if !name
prefix = env[:root_path].basename.to_s
prefix = "#{env[:root_path].basename.to_s}_#{env[:machine].name}"
prefix.gsub!(/[^-a-z0-9_]/i, "")
name = prefix + "_#{Time.now.to_i}"
end