boxcutter / macos

Virtual machine templates for macOS written in legacy JSON
MIT License
314 stars 65 forks source link

Successful Sierra build gets BSD-based guests error w. default Vagrantfile #31

Open darkn3rd opened 6 years ago

darkn3rd commented 6 years ago

The Vagrantfile produced from OS X 10.11 will yield errors after doing vagrant up. As there are no virtualbox guest editions built into the image, the default /vagrant file system with Shared Folders vboxsf cannot be mounted.

STEPS TO REPRODUCE

STEP 1: Build the Box

Build an image with Mac OX 10.12.1 (later versions apparently do not work).

sudo prepare_iso/prepare_iso.sh ~/Downloads/Install\ macOS\ Sierra.app dmg
packer build \
    -only=virtualbox-iso \
    -var-file=macos1012.json \
    -var iso_url=dmg/OSX_InstallESD_10.12.1_16B2657.dmg \
    macos.json

STEP2: Install Box and Init Env w/ Box

vagrant box add box/virtualbox/macos1012-0.1.0.box --name mac/sierra
mkdir macbox
cd macbox
vagrant init mac/sierra
vagrant up

ACTUAL RESULTS

Warning with this:

Vagrant is not able to mount VirtualBox shared folders on BSD-based
guests. BSD-based guests do not support the VirtualBox filesystem at
this time.

To change the type of the default synced folder, specify the type as
rsync or nfs:

    config.vm.synced_folder ".", "/vagrant", type: "nfs" # or "rsync"

Alternatively, if you do not need to mount the default synced folder,
you can also disable it entirely:

    config.vm.synced_folder ".", "/vagrant", disabled: true

You can read more about Vagrant's synced folder types and the various
configuration options on the Vagrant website.

This is not a bug in Vagrant.

EXPECTED RESULTS

Expected a Vagrantfile that would not cause an error.

darkn3rd commented 6 years ago

I did some further research on this, and recommend simply putting config.vm.synced_folder ".", "/vagrant", disabled: true with a comment in the default Vagrantfile.

Each iteration from Apple seems to break NFS in some new way, even to the point of kernel panics.