6
votes

I am running Windows 7 64-bit Ultimate under VirtualBox (latest version, 4.1.4) on my MacBook Air. I have created a shared folder on the Mac under my user folder. I have granted read/write privileges to this folder to my account. (I also configured it with read/write access to everyone, and that did not make a difference.)

In Windows 7 under VirtualBox, I have added that folder as a shared folder.

From within my Windows 7 VM, I can see this folder, create new folders and files in it, and read folders and files, using Windows Explorer.

The problem is with Delphi XE2. If I attempt to open or save a project to this shared folder, from the Save dialog box the share (which I have currently mapped to a network drive) appears with an red X icon indicating that there is something wrong with it. If I click on this folder, Delphi displays a dialog box with the title "Restoring Network Connection" and a message "An error occurred while reconnecting E: to \VBOXSVR\Demos VirtualBox Shared Folders: The request is not supported. This connection has not been restored."

That I cannot save projects in that shared folder inhibits my ability to easily create iOS apps and generate the necessary Xcode folders using Delphi's dpr2xcode.exe utility. What I have to do instead is to create the project folder locally, run dpr2code.exe to generate the Xcode project, and then to use Windows Explorer to copy the contents of the local folder to the shared folder, where I can then load the generated project in Xcode, compile, and run it.

Does anyone know of any configuration or steps I can take to permit Delphi to see the shared folder as a valid folder?

For the record, and I have seen a similar problem with other versions of Delphi with respect to Folders from a Delphi installation in VMWare Workstation (8.0) running under a Windows 7 host. In those cases, Delphi simply does not display the shared folder.

1
I don't know how to do it this way around, but I have shared a folder in my source directory on my PC, and accessed that from the Mac. It worked fine. Maybe the Mac is better at this sort of thing?mj2008
Cary... I discovered something else which could certainly help explain your problem! When I load XE2 for the first time on a clean Windows 7 installation, Windows Firewall asks what networks I'd like to enable XE2 access to! By default it only selected PUBLIC networks, and unticked PRIVATE! Check your Windows Firewall settings, ensure XE2 has full access to the network (local and Internet)LaKraven
Wow. That looked promising, but enabling private didn't do it.Cary Jensen
It is starting to look like there might be an issue with the combination of OSX Snow Leopard and VirtualBox. Is anybody out there using OSX Snow leopart and VirtualBox and NOT having this problem?Cary Jensen

1 Answers

10
votes

Switch your VM to "Bridged" networking as opposed to NAT.

In VBox, select your VM, go to Settings > Network > Adapter 1 > change "Attached to" to "Bridged Adapter"

I'm guessing you've already enabled SAMBA sharing on the OSX host (System Preferences > Sharing > File Sharing (switch it on) > Options > tick "Share files and folders using SMB (Windows)")

The reason you want Bridged networking is so that your VM is assigned its own IP address, rather than sharing the IP of your OSX host (which is what NAT does).

Give it a shot, let me know if it helps :)