Active
Project:
Drupal-up
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
20 Aug 2012 at 16:26 UTC
Updated:
26 Jun 2013 at 16:03 UTC
Usage:
drush vagrant-build --project-name=Example --blueprint=drupal7 --docroot=~/src/mysite/docroot
In this case /var/www/drupal would be a NFS shared folder of "~/src/mysite/docroot".
This is a follow-up to #1734782: Make it easy to import an existing site
Comments
Comment #1
discipolo commentedthis is working in aegir-up. so that functionality could maybe be ported over?
Comment #2
wizonesolutionsI'd love this option as well. I just realized that /var/www/drupal only exists in the VM. This defeats the purpose of Vagrant, which is to be able to work near-transparently on my laptop instead of having to use Vim inside of the VM. I'm OK with that, mind, but I'm trying to switch over to using GUI Vim on my laptop just because it's more fluid. This makes that harder (I guess the workaround is to run nfsd on the guest and share the folder to the host).
Comment #3
wizonesolutionsWorkaround for Mac OS X host:
Install NFS on the VM
vim /etc/exports
/path/to/docroot <your_host_ip>(rw,sync,all_squash,no_subtree_check,insecure,anonuid=33,anongid=33)From mine:
/var/www 192.168.11.1(rw,wdelay,insecure,root_squash,all_squash,no_subtree_check,anonuid=33,anongid=33)In Mac OS X, open Disk Utility. File -> NFS Mounts. Type
nfs://<vm_ip_on_host_network>/path/to/docroot(only one preceding slash)My
<vm_ip_on_host_network>is192.168.11.11.Enter the path corresponding to
docroot. The files and folders in docroot will appear under here.Expand advanced options, type resvport.
Save, exit out of Disk Utility (enter password if prompted), wait a couple seconds while the automounter runs, and then browse to your directory. With any luck, you'll be able to work locally now.
Bonus: Add an appropriate symlink to
/path/to/docrooton the *host*, if possible (probably needs sudo), to make Xdebug-in-Vim work :)Comment #4
eli-tYou need to restart nfs on the virtual machine after editing /etc/exports before the new export will be mountable from OSX.
sudo /etc/init.d/nfs-kernel-server restartComment #5
discipolo commentedJust to verify. It seems issues with docroot NFS occur when building the second project(vm)