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.
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 :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With