Permalink
Browse files

for the provider's vm name, use the vm's host_name if available

  • Loading branch information...
1 parent 54f7d83 commit 92adb3224604fe418baa35ad9c0994882054f174 @kbrock committed Dec 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/vagrant/action/vm/default_name.rb
@@ -11,7 +11,7 @@ def initialize(app, env)
def call(env)
@logger.info("Setting the default name of the VM")
- name = env[:root_path].basename.to_s + "_#{Time.now.to_i}"
+ name = (env[:vm].config.vm.host_name || env[:root_path].basename).to_s + "_#{Time.now.to_i}"
env[:vm].driver.set_name(name)
@app.call(env)

0 comments on commit 92adb32

Please sign in to comment.