<p>I would like to have a VM to look at how applications appear and to develop OS-specific applications, however, I want to keep all my code on my Windows machine so if I decide to nuke a VM or anything like that, it's all still there.</p>

<p>If it matters, I'm using VirtualBox.</p>

[{'answer_id': 46256, 'author': 'Curt Hagenlocher', 'author_id': 533, 'author_profile': 'https://Stackoverflow.com/users/533', 'pm_score': 1, 'selected': False, 'text': '<p>You should always be able make a normal network connection between the VM and the hosting OS, as though it were another computer on the same network.  Which, in some sense, it is.</p>\n'}, {'answer_id': 46257, 'author': 'Michael Haren', 'author_id': 29, 'author_profile': 'https://Stackoverflow.com/users/29', 'pm_score': 4, 'selected': True, 'text': '<p>This is usually handled with network shares. Share your code folder from your host machine and access it from the VMs.</p>\n'}, {'answer_id': 46263, 'author': 'Kristopher Johnson', 'author_id': 1175, 'author_profile': 'https://Stackoverflow.com/users/1175', 'pm_score': 2, 'selected': False, 'text': '<p>Aside from network shares, another tool to use for this is a version-control system.</p>\n'}, {'answer_id': 17328498, 'author': 'jlettvin', 'author_id': 1363592, 'author_profile': 'https://Stackoverflow.com/users/1363592', 'pm_score': 0, 'selected': False, 'text': '<p>I do this all the time.\nI have a directory in a Windows drive that I mount in my host ubuntu 12.04.\nI run virtualbox ubuntu 13.04 as a guest.\nI want the guest to mount the Windows directory with full non-root permissions.\nI do almost all my work from a bash shell, so this method is natural for me.</p>\n\n<p>When searching for methods to automatically mount virtualbox shared folders,\nreliable and correct methods are hard to distinguish from those that fail.\nFailures include getting and setting permissions, as well as other problems.</p>\n\n<p>Methods that fail include:</p>\n\n<ul>\n<li>modifying /etc/fstab</li>\n<li>modifying /etc/rc.local</li>\n</ul>\n\n<p>I am fairly certain that rc.local can be used,\nbut no methods I have tried worked.\nI welcome improvements on these guidelines.</p>\n\n<p>On virtualbox 4.2.14 running nautilus (bash terminal) on an ubuntu 13.04 guest,\nBelow is a working method to mount Common (sharename)\non /home/$USER/Desktop/Common (mountpoint) with full permissions.\n(Note the ‘\\’ command continuation character in the find command.)</p>\n\n<p>First time only: create your mountpoint, modify your .bashrc file, and run it.\nRespond with password when requested.\nThese are the four command-lines needed:</p>\n\n<pre><code>mkdir $HOME/Desktop/Common\nsudo echo “$USER ALL=(ALL) NOPASSWD:ALL” &gt;&gt; /etc/sudoers\nfind $HOME/Desktop/Common -maxdepth 0 -type d -empty -exec sudo \\\nmount -t vboxsf -o \\\nuid=`id -u $USER`,gid=`id -g $USER` Common $HOME/Desktop/Common \\;\nsource ~/.bashrc # Needed if you want to mount Common in this bash.\n</code></pre>\n\n<p>All other times: simply launch a bash shell.</p>\n\n<p>The find command mounts the shared directory if the mountpoint directory is empty.\nIf the mountpoint directory is not empty, it does not run the mount command.</p>\n\n<p>I hope this is error-free and sufficiently general.\nPlease let me know of corrections and improvements.</p>\n'}]
['https://Stackoverflow.com/questions/46252', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/572/']