scotch-io / scotch-box-build-scripts

These are the build scripts that come with purchasing access to Scotch Box Pro.
41 stars 30 forks source link

VMware issues (with workarounds) #5

Open Kier opened 6 years ago

Kier commented 6 years ago

The build scripts have a few issues when working with the vmware_desktop provider instead of the default virtualbox host - but thankfully they can be worked around as far as I can tell.

Vagrantfile

Obviously, the Vagrantfile needs some adjustment to work with VMware - and in some cases the edits are not obvious.

Firstly, the build scripts need to be told not to create a linked clone of the base box, otherwise packaging will fail later. The config additions look like this (as far as I can tell):

    config.vm.provider "vmware_desktop" do |vmware|
        vmware.linked_clone = false
    end

Secondly, the default scotchbox synced_folder config won't work with VMware, because the VMware version doesn't support dmode and fmode parameters, relying instead on umask config.

Therefore, we change the folder sync line as follows:

config.vm.synced_folder ".", "/var/www", :mount_options => ["umask=000"]

Apache installation

This has been a painful learning process, but it turns out that for some reason there is a permissions failure when attempting to install Apache due to it trying to create /var/www/html and failing, which results in Apache not being installed at all. This applies only to VMware, but the issue can be mitigated by creating a html folder in the folder along with the Vagrantfile and install.sh before attempting to run vagrant up.

Conclusion

I'll keep this updated with any further issues and workarounds I find, as I find them.

Kier commented 6 years ago

A few notes on the Apache issue:

https://github.com/geerlingguy/drupal-vm/issues/247 resolved in https://github.com/geerlingguy/drupal-vm/commit/e4ee925186449414612c8cc1d90cada8863f40de