As a follow on from my previous post, after much faffing about – not helped by the fact my knowledge of networking is about as deep as my knowledge of Mandarin, which is to say, non-existent – I’ve finally got remote debugging from a Vista VM to a OS X host working. The problem, I think, was the fact my iMac isn’t connected to a physical network, but whatever, the solution was pretty easy once I stumbled upon it:
- From the main VirtualBox window, choose VirtualBox|Preferences from the menu bar.
- Click on Networks, then the little ‘Add host-only network’ button (it’s the one with a green network card and plus sign icon).
- I just accepted the defaults, which gave the host an IP address of 192.168.56.1
- With the VM running, choose Devices|Network adaptors from the menu bar.
- Change Adapter to a ‘Host-only adapter’ by selecting that option under ‘Attached to’. This does have the side effect of removing internet access on the VM for me, however it is easy enough to change the adapter type back to NAT when internet access is required.
- In Delphi, make sure the ‘host name’ in your remote profile for OS X is set to the host IP address mentioned earlier, and things should work fine, though remember to start PAServer on the host before testing the connection. To keep things simple file sharing-wise I share my entire OS X home directory; this setting (set up when using the default ‘NAT’ mode) was not affected by the change of adapter type.
Overall, I have to say I’ve been very impressed with VirtualBox, and more generally, I can definitely recommend this sort of setup for just ordinary personal use – if you want to run Windows applications on OS X, even pretty simple ones, Wine just doesn’t cut it, as well as being a pain to install and an annoyance once it is installed (I know it’s free and all that, but why oh why does Linux-y open source stuff have to spew things all over the hard drive?).