From b5b59a4eee4fdd9f7a6a5f91b31e97fd9c062a76 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Fri, 22 Nov 2019 12:10:34 -0800 Subject: [PATCH] Base name for disk is vagrant_primary if primary --- plugins/kernel_v2/config/disk.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/kernel_v2/config/disk.rb b/plugins/kernel_v2/config/disk.rb index fd33e7d12..c5407edae 100644 --- a/plugins/kernel_v2/config/disk.rb +++ b/plugins/kernel_v2/config/disk.rb @@ -109,7 +109,13 @@ module VagrantPlugins # Give the disk a default name if unset # TODO: Name not required if primary? - @name = "vagrant_#{@type.to_s}_#{@id.split("-").last}" if @name == UNSET_VALUE + if @primary + base_name = "vagrant_primary" + else + base_name = "vagrant" + end + + @name = "#{base_name}_#{@type.to_s}_#{@id.split("-").last}" if @name == UNSET_VALUE @provider_config = nil if @provider_config == {} end