Read-only Shared Folder for Vagrant

1.2k views Asked by At

I would just like to ask if it's possible to share a folder from the guest VM in vagrant as a read-only to the host machine? My use case is I want to be able to see the logs of the guest VM in the host machine so I can check it using other software. I am currently using a PuPHPet generated vagrant box.

I tried to do a shared folder (with RW perms) but sadly, the direction of this is from host machine down to the guest VM. That means that the guest machine only has files if the host machine adds new files. I need the reverse of this process, which means reading the files of the guest machine from the host machine.

Thanks,

Jan

HOST: Windows 10 with Virtual Box Guest: Ubuntu Linux 64bit

1

There are 1 answers

0
Chase On

Shared directories in Vagrant are not direction dependent. A file created in the guest will show up in the host, the same as files from the host show in the guest.

Check your shared directory settings and check that you are looking in the correct directory.