From 056f837fedf76837c02ce4f562d40523e2b3c8eb Mon Sep 17 00:00:00 2001 From: Richard Gareau Date: Tue, 16 Aug 2016 11:49:47 -0400 Subject: [PATCH] Do not use UNC path for Solaris guest on Windows --- plugins/providers/virtualbox/driver/version_4_3.rb | 3 ++- plugins/providers/virtualbox/driver/version_5_0.rb | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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",