diff --git a/plugins/providers/virtualbox/provider.rb b/plugins/providers/virtualbox/provider.rb index 270286341..969fb4718 100644 --- a/plugins/providers/virtualbox/provider.rb +++ b/plugins/providers/virtualbox/provider.rb @@ -76,8 +76,10 @@ module VagrantPlugins # We have to check if the UID matches to avoid issues with # VirtualBox. uid = @machine.uid - if uid && uid.to_s == Process.uid.to_s - raise Vagrant::Errors::VirtualBoxUserMismatch, uid: uid.to_s + if uid && uid.to_s != Process.uid.to_s + raise Vagrant::Errors::VirtualBoxUserMismatch, + original_uid: uid.to_s, + uid: Process.uid.to_s end # Determine the ID of the state here. diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 285960f39..fd01e17e9 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -1321,9 +1321,10 @@ en: The VirtualBox VM was created with a user that doesn't match the current user running Vagrant. VirtualBox requires that the same user be used to manage the VM that was created. Please re-run Vagrant with - that user. + that user. This is not a Vagrant issue. - The UID used to create the VM was: %{uid} + The UID used to create the VM was: %{original_uid} + Your UID is: %{uid} virtualbox_version_empty: |- Vagrant detected that VirtualBox appears installed on your system, but calls to detect the version are returning empty. This is often