diff --git a/plugins/providers/virtualbox/driver/version_4_3.rb b/plugins/providers/virtualbox/driver/version_4_3.rb index 7636d996f..b9b3badb4 100644 --- a/plugins/providers/virtualbox/driver/version_4_3.rb +++ b/plugins/providers/virtualbox/driver/version_4_3.rb @@ -609,9 +609,10 @@ module VagrantPlugins end def share_folders(folders) + guestOS = read_guest_property("/VirtualBox/GuestInfo/OS/Product") folders.each do |folder| hostpath = folder[:hostpath] - if Vagrant::Util::Platform.windows? + if Vagrant::Util::Platform.windows? && guestOS != "SunOS" hostpath = Vagrant::Util::Platform.windows_unc_path(hostpath) end args = ["--name", diff --git a/plugins/providers/virtualbox/driver/version_5_0.rb b/plugins/providers/virtualbox/driver/version_5_0.rb index 6544e8785..3c01adce7 100644 --- a/plugins/providers/virtualbox/driver/version_5_0.rb +++ b/plugins/providers/virtualbox/driver/version_5_0.rb @@ -613,8 +613,15 @@ module VagrantPlugins end def share_folders(folders) + guestOS = read_guest_property("/VirtualBox/GuestInfo/OS/Product") folders.each do |folder| - hostpath = Vagrant::Util::Platform.windows_path(folder[:hostpath]) + # NOTE: Guest additions on Solaris guests do not properly handle + # UNC style paths so prevent conversion (See GH-7264) + if guestOS == "SunOS" + hostpath = folder[:hostpath] + else + hostpath = Vagrant::Util::Platform.windows_path(folder[:hostpath]) + end args = ["--name", folder[:name], "--hostpath",