I've encountered an issue with Vagrant 1.8.1 and VirtualBox 5.0.10 - 18, for Solaris hosts.
vagrant up fails to create synced_folders, which appears to be due to the use of UNC file paths for the VirtualBox VM shared folders.
As a workaround I have had to revert to vagrant 1.7.4.
Vagrant 1.8.1
Windows 7
Solaris 11.3
Vagrant.configure("2") do |c|
c.ssh.insert_key = false
c.vm.define 'solaris-11-x64-agent' do |v|
v.vm.hostname = 'solaris-11-x64-agent'
v.vm.box = 'local/solaris11_3-x86_64-201608141117'
v.vm.box_url = 'http://172.16.14.157/virtimages/solaris11_3-x86_64-201608141117.box'
v.vm.box_check_update = 'true'
v.vm.network :private_network, ip: "10.255.241.182", :netmask => "255.255.0.0", :mac => "080027FD571E"
v.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', '1024', '--cpus', '1']
end
end
end
Provide a link to a GitHub Gist containing the complete debug output:
https://www.vagrantup.com/docs/other/debugging.html. Do NOT paste the debug
output in the issue, just paste the link to the Gist.
vagrant up - command should start the VM, a synced folder of should be created called /vagrant that allows data to be shared between the windows host and the VirtualBox VM.
/vagrant mountpoint created within the VM.
Start-up fails on Solaris 11, with an error creating the synced folder.
The command to create the mount complete with a success code:
sudo /sbin/mount -F vboxfs -o uid=/usr/xpg4/bin/id -u vagrant,gid=/usr/xpg4/bin/id -g vagrant vagrant /vagrant
But using the mountpoint fails, such as changing permissions which is the next thing vagrant tries to do:
sudo chown /usr/xpg4/bin/id -u vagrant:/usr/xpg4/bin/id -g vagrant /vagrant
`
Failed to exec 'vagrant up'. Error was The following SSH command responded with a non-zero exit status. (RuntimeError)
Vagrant assumes that this means the command failed!
sudo chown /usr/xpg4/bin/id -u vagrant:/usr/xpg4/bin/id -g vagrant /vagrant
Stdout from the command:
Stderr from the command:
chown: /vagrant: Invalid argument
from C:/apps/ruby/1.9.3/Ruby193/lib/ruby/1.9.1/open3.rb:208:in popen_run'
from C:/apps/ruby/1.9.3/Ruby193/lib/ruby/1.9.1/open3.rb:90:inpopen3'
from C:/apps/ruby/1.9.3/Ruby193/lib/ruby/gems/1.9.1/gems/beaker-2.39.0/lib/beaker/hypervisor/vagrant.rb:191:in block in vagrant_cmd'
from C:/apps/ruby/1.9.3/Ruby193/lib/ruby/gems/1.9.1/gems/beaker-2.39.0/lib/beaker/hypervisor/vagrant.rb:189:inchdir'
from C:/apps/ruby/1.9.3/Ruby193/lib/ruby/gems/1.9.1/gems/beaker-2.39.0/lib/beaker/hypervisor/vagrant.rb:189:in vagrant_cmd'
from C:/apps/ruby/1.9.3/Ruby193/lib/ruby/gems/1.9.1/gems/beaker-2.39.0/lib/beaker/hypervisor/vagrant.rb:151:inprovision'
from C:/apps/ruby/1.9.3/Ruby193/lib/ruby/gems/1.9.1/gems/beaker-2.39.0/lib/beaker/hypervisor.rb:75:in create'
from C:/apps/ruby/1.9.3/Ruby193/lib/ruby/gems/1.9.1/gems/beaker-2.39.0/lib/beaker/network_manager.rb:69:inblock in provision'
from C:/apps/ruby/1.9.3/Ruby193/lib/ruby/gems/1.9.1/gems/beaker-2.39.0/lib/beaker/network_manager.rb:68:in each_key'
from C:/apps/ruby/1.9.3/Ruby193/lib/ruby/gems/1.9.1/gems/beaker-2.39.0/lib/beaker/network_manager.rb:68:inprovision'
from C:/apps/ruby/1.9.3/Ruby193/lib/ruby/gems/1.9.1/gems/beaker-rspec-5.3.0/lib/beaker-rspec/beaker_shim.rb:35:in provision'
from C:/apps/ruby/1.9.3/Ruby193/lib/ruby/gems/1.9.1/gems/beaker-rspec-5.3.0/lib/beaker-rspec/spec_helper.rb:46:inblock in
The issue appears to be related to the sharedfolder configuration:
I can force the VM to 'work' by changing the VirtualBox VM Shared Folder setting to stop using UNC path
/usr/xpg4/bin/id -u vagrant,gid=/usr/xpg4/bin/id -g vagrant vagrant /vagrant/usr/xpg4/bin/id -u vagrant:/usr/xpg4/bin/id -g vagrant /vagrantrunning vboxmanage vminfo shows:
Shared folders:
Name: 'vagrant', Host path: '**\\?\**C:\Users\user1\sandbox-2015-12-23\loglogic\.vagrant\beaker_vagrant_files\solaris11.yml' (machine mapping), writable
If I stop the vm, change the shared folder configuration and restart the vm - then the mount point can be recreated manually
Name: 'vagrant', Host path: 'C:\Users\user1\sandbox-2015-12-23\loglogic\.vagrant\beaker_vagrant_files\solaris11.yml' (machine mapping), writable
Running vagrant up with the vagrant file above reproduces this issue for me on a windows 7 host. Running the same script on a centos host successfully starts up.
Are there any other GitHub issues (open or closed) that should be linked here?
For example:
If I revert to vagrant 1.7.4 - it works.
I've made a patch to the vagrant driver for virtualbox version 4.3, 5.0 and 5.1 that will not use UNC path when working with Solaris VM.
Looks like the virtualbox guest additions for solaris are not dealing correctly with UNC path for shared folders.
Fixed via #7723
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
If I revert to vagrant 1.7.4 - it works.