0

I am developing a statistical application on a Windows machine. I have never worked for any length of time under any other OS. I would like to test my programs under some flavor of Linux for the convenience of potential users. If I install, say, Ubuntu, under VirtualBox on my Windows machine, can programs operating under Windows and programs under Ubuntu access the same files, if it is not at the same time? Some of my test files are 30 GB or more, and I'd rather not duplicate them. If so, do I need to do anything special to allow this?

Suppose that I also have a database server (PostgreSQL) operating under its own user account on this same machine. Can an OBDC driver or some other interface connected to my program running under Linux on the VM issue queries to the DB running under Windows? Again, is there anything special I need to know to make this work?

1
  • 3
    Try to use shared folder in VirtualBox.
    – Biswapriyo
    Jul 3, 2017 at 1:05

1 Answer 1

1

Yes. Use the shared folder feature of Virtual Box. Select your VM > Settings > Shared Folders Click the folder with the green plus icon, click the down arrow next to Folder Path, select Other, and browse to the folder that contains the data files you want to share.

Also, make sure you have installed the VirtualBox Guest Additions that come with your version of VirtualBox (not the ones from your distro's package manager, which are almost certainly out of date). While the VM is running go to Insert Guest Additions CD Image. This will mount the guest additions ISO that comes with your version of VirtualBox to the VMs optical storage drive (assuming one is configured).

There is some buggy behavior with the Linux VB Guest Services implementation. Do not set Folder Name to be the same as the actual folder name in Windows or the name of the mount point you plan to use in Linux.

Also, auto-mounting does not work reliably. Try it, but you will likely need to manually configure a mount point in your /etc/fstab (or other applicable utilities). For the mount type use vboxsf and for the "device" use what you set the Folder Name to in the Shared Folder settings in virtual box. Finally, note that the way Linux handles files and the way Windows handles files is dramatically different. You may need to set uid=771 in the mount options to be able to write to the shared folder from the Linux guest.

You must log in to answer this question.

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