I have created and released a new PhotonOS box for Vagrant that has (uniquely?) got Shared Folders working under Virtualbox
The Photon VM was patched to the latest version (4.4.77-1.ph1) and the Shared Folders kernel addition was for the latest version of VirtualBox (5.1.26)
The Vagrant Cloud version is silverhighway/photon so the command is obviously
vagrant init silverhighway/photon
Let me know what you think.
Perhaps VMware would like to take a copy as well?
And for those of you interested, I took VMware's most recent Vagrant box (that didn't have Shared Folders working), upgraded the OS to the latest version, added the build tools, added the Kernel Headers and then compiled the Virtualboxaddtions.run script and then remove the Kernel files.
So it should be bang up to date and uses the latest version of Virtualbox and Shared Folders which works as it should.
Other than the few extra build tools I had to install, it's a base build.
Hi,
Thank you for your initiative.
I gave it a test it, but there is an issue when I try to start docker with vagrant :
==> default: Failed to start docker.service: Unit docker.service failed to load: Invalid argument. See system logs and 'systemctl status docker.service' for details.
The vagrantfile contains these lines in order to start docker on Photon OS :
# Start the docker daemon in Photon
config.vm.provision "start docker daemon", type: "shell" do |s|
s.privileged = true
s.inline = "systemctl start docker"
end
I think the issue can be solved by correcting a typo in the /usr/lib/systemd/system/docker.service file ( there is a "\" present at a bad position). It can be solve with this corrected version :
[Unit]
Description=Docker Daemon
Documentation=http://docs.docker.com
Wants=network-online.target
After=network-online.target docker-containerd.service
Requires=docker-containerd.service
[Service]
Type=notify
EnvironmentFile=-/etc/default/docker
ExecStart=/usr/bin/docker daemon $DOCKER_OPTS -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 \
--containerd /run/containerd.sock
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-abnormal
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
[Install]
WantedBy=multi-user.target
I add this problem with the version 0.1.1 of the box.
Another point... Vagrant always download the version 0.1.1, which is not the latest.
When I try to download last version v2017.08.25, I face another issue :
$ vagrant box add silverhighway/photon --box-version v2017.08.25
==> box: Loading metadata for box 'silverhighway/photon'
box: URL: https://atlas.hashicorp.com/silverhighway/photon
/usr/lib/ruby/2.3.0/rubygems/requirement.rb:101:in `parse': Illformed requirement ["v2017.08.25"] (Gem::Requirement::BadRequirementError)
from /usr/lib/ruby/2.3.0/rubygems/requirement.rb:131:in `block in initialize'
from /usr/lib/ruby/2.3.0/rubygems/requirement.rb:131:in `map!'
from /usr/lib/ruby/2.3.0/rubygems/requirement.rb:131:in `initialize'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/box_metadata.rb:53:in `new'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/box_metadata.rb:53:in `block in version'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/box_metadata.rb:52:in `map'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/box_metadata.rb:52:in `version'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/builtin/box_add.rb:204:in `add_from_metadata'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/builtin/box_add.rb:108:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/builder.rb:116:in `call'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in `block in run'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/util/busy.rb:19:in `busy'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in `run'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/plugins/commands/box/command/add.rb:78:in `execute'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/plugins/commands/box/command/root.rb:66:in `execute'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/cli.rb:42:in `execute'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/lib/vagrant/environment.rb:274:in `cli'
from /usr/share/rubygems-integration/all/gems/vagrant-1.9.1/bin/vagrant:122:in `<top (required)>'
from /usr/bin/vagrant:22:in `load'
from /usr/bin/vagrant:22:in `<main>'
Is there any trick to solve this ?