diff --git a/plugins/kernel_v2/config/disk.rb b/plugins/kernel_v2/config/disk.rb index d4ba309cd..219a74aed 100644 --- a/plugins/kernel_v2/config/disk.rb +++ b/plugins/kernel_v2/config/disk.rb @@ -105,16 +105,14 @@ module VagrantPlugins @primary = false end - # Give the disk a default name if unset - # TODO: Name not required if primary? - if @primary - base_name = "vagrant_primary" - else - base_name = "vagrant" + if @name == UNSET_VALUE + if @primary + @name = "vagrant_primary" + else + @name = "name_#{@type.to_s}_#{@id.split("-").last}" + end end - @name = "#{base_name}_#{@type.to_s}_#{@id.split("-").last}" if @name == UNSET_VALUE - @provider_config = nil if @provider_config == {} end