2

This question is kind of the opposite of Coding in Visual Studio in Linux VM?. I considered posting it on Stack Overflow, but since it isn't strictly a programming problem I thought it'd be a better fit on SuperUser.

I have a VirtualBox VM which runs Windows 7, Visual Studio 2012 and a few other odds and ends on top of my main Linux system. This works nicely, but primarily to facilitate useful backups, I would like to place the local source code tree outside of the VM. (The VM does get backed up, but only in the "all or nothing full disk image" manner rather than the much more useful individual files that the host system is backed up as.)

I tried simply creating a shared directory like ~/src on the host and map that into the VM. The mapping itself worked fine and I was able to perform a Get Latest Version from source control to populate it, but it appears that the host side doesn't like something about how Visual Studio creates some of its working files, and I got a large number of errors because of this (including build errors from CSC and friends about invalid file formats). I imagine that the "hidden" attribute on some files may have something to do with this, since ext3 at least directly doesn't support such fancy properties on files, but there may be other factors involved as well.

So the question becomes: how can I make it possible for Windows inside a VirtualBox VM to store files as separate files on the host, in a way that works with how Visual Studio 2012 creates its working files?

I'm aware of the possibility of regularly copying the files out of the VM from within the VM, but would rather not go down that route if there is another option.

1
  • Did you ever figure this out? We'd like to keep our git repo on the linux host, and develop with VS/Resharper in the Windows Guest.
    – DTI-Matt
    Mar 10, 2015 at 15:42

2 Answers 2

0

I'm just going to throw this out there as a possible solution, because your problem sounds analogous to one I encountered, although the actual hardware and software details differ, at least superficially, a great deal.

In my case I had a commercial NAS running Linux on my Windows network. Shares on the NAS appear and mostly workfine from the Windows machine on the network, however the SMB server running on the NAS doesn't support all of the NTFS filesystem attributes which is sometimes a problem because some of the software I use depends on them.

The workaround I'm using was, surprisingly, base on TrueCrypt, even though its purpose is not really to encrypt files The reason is that TrueCrypt lets you create large TC volume files within which it emulates an encrypted version of a native Windows NTFS filesystem. The volume file itself doesn't need to support any unusually file attributes, but supports all of them perfectly on all the files it holds.

To access files stored on the NAS, I just first mount the TrueCrypt volume file on a network share on one of the Windows machines each of the TrueCrypt software installed on them which creates a virtual drive whose contents all the normal acting NTFS files it contains including all their attributes.

TrueCrypt is so fast that using it is virtually undetectable performance-wise. However, you might be able to use something else if you wish as long as it provides the same ability to enumlate the NTSF filesystem using the contents of another file. Perhaps you could just use the same Windows 7 or a separate VirtualBox VDI (Virtual Disk Image) volume file for this purpose.

1
  • A TrueCrypt volume or a separate VirtualBox VDI volume file The downside with that is that it doesn't solve the problem that I would really like to solve, which is having the individual files on disk on the host side. It is of course technically a possibility, but it doesn't really solve the problem.
    – user
    Jul 21, 2013 at 14:30
0

Have you taken a look at Vagrant? Shared files live on the host, and are still accessible when the VM is shut down. Most vagrant boxes run in headless mode, but you can switch them to boot the GUI. That being said, I've never used a windows vagrant box :)

1
  • When I looked at the Vagrant web site, once I managed to get through all the fluff in the documentation it seems to be mostly about maintaining a number of similar VMs. Can you edit your answer to clarify how that would help me?
    – user
    Jul 21, 2013 at 17:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .