Code Monkey home page Code Monkey logo

Comments (7)

bacongravy avatar bacongravy commented on July 21, 2024 1

To support the default rsync case, perhaps we should update macinbox to create a synthetic.conf in the VM image and add an entry to it like this:

vagrant     var/root/vagrant

from macinbox.

adamwolf avatar adamwolf commented on July 21, 2024

I think that for NFS, we would want /etc/synthetic to just have

vagrant

For rsync, I did this

mkdir ~/vagrant_root
sudo su -c 'echo "vagrant\tUsers/vagrant/vagrant_root" >> /etc/synthetic.conf'
reboot

and it came up ok.

from macinbox.

bacongravy avatar bacongravy commented on July 21, 2024

@adamwolf I don’t use a workflow that relies on /vagrant so I haven’t encountered this before. I believe it might be possible to create /vagrant as part of a macinbox user script that runs during box creation, but I’m not sure that newly created directory would be any more writable than / once the system booted. I don’t know how it would impact rsync, but another approach to try would be to create, in a user script during box creation, a symlink at /vagrant that points to a non-SIP-protected location.

from macinbox.

adamwolf avatar adamwolf commented on July 21, 2024

It seems supported to me? man synthetic.conf on a 10.15 or higher machine.

On a pragmatic level, I created a directory in root's homedir and made a "synthetic firmlink" to it from /vagrant using synthetic.conf, and it's worked for me for few months so far.

from macinbox.

yeahdongcn avatar yeahdongcn commented on July 21, 2024

/etc/synthetic.conf works well.

On macOS 10.15, you could use sudo mount -uw / to make / writable (doesn't work on Big Sur).

from macinbox.

clusin avatar clusin commented on July 21, 2024

Deleted my previous post cuz I didn't read @adamwolf initial post carefully 😬

I followed the suggestions here and added my root directory name to /etc/synthetic.conf. My /etc/synthetic.conf file looks like:
<foldername>

For the synced folder I went the NFS route. I I'm trying to keep my box slim on disk space and degraded performance of nfs mount is okay for me. Using VirtualBox as the provider my final Vagrantfile looks like:

  config.vm.network "private_network", ip: "192.168.10.100"
  config.vm.network "public_network", ip: "192.168.20.200", bridge: "en1: Wi-Fi (AirPort)"
  config.vm.synced_folder "./Deployment/dev/", "/<foldername>", type: "nfs"

VirtualBox needed a host-only network interface setup to get NFS mounts working. Some hero on Stack Overflow suggested picking random unoccupied private IP addresses for the two interfaces. This worked for me to get macinbox up and running w/ Virtual Box running Catalina.

Thank you all.

from macinbox.

mcandre avatar mcandre commented on July 21, 2024

This appears to work for me:

% sudo sh -c "echo \"vagrant\\tUsers/vagrant/vagrant_root\" >>/etc/synthetic.conf"
% mkdir -p /Users/vagrant/vagrant_root

Maybe the /var/root/vagrant version of this just needs a similar mkdir -p done during provisioning to work, I dunno. But I get an I/O error that way, which is really just hiding a permission error. At least with the kishikawakatsumi/macos-catalina-xcode12 box on Vagrant Cloud (one of the few, uncorrupt, boxes available with a sufficiently recent patch level of macOS to satisfy Xcode 12 requirements).

from macinbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.