Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

duggram

macrumors 6502
Original poster
Apr 17, 2008
391
11
Can I write applications on my Mac that will communicate with applications on a Linux or Win7 VM running on the same Mac?

For example I would like to have my applications on the Mac hit a database or Web server in a different OS in a VM running on the same computer. If this is possible can you also recommend any resources on getting this done?

At the present time I have a new MBP and a ’08. On the new MBP I already have Win7 running in Fusion VM. When I access the shared folders on my Mac side from within Win7, Explorer says I’m doing so over a network connection. This gives me the idea that there is some way to get this done without having to use the ’08. Being able to develop on a single computer would make it easy to work on trips (I travel each week) because I wouldn’t have to lug two computers around.

BTW
 
You should be able to access VMs from the host OS and vice versa via a network connection. As such, the interaction between these machines should be the same as if they were separate physical machines.

Your question does lack some details. You should be able to run a DB or webserver just as well on OS X as you can on Linux or Windows. If you have a specific need for IIS on windows I guess that would be an exception, but otherwise it seems like your OS X host OS should be able to do what you need without VMs.

-Lee
 
Yes and it is a property of VMs which make them incredibly useful for software development and testing.

I used to run the following configuration to demo/test a large enterprise system:

Mac Pro:
- VM 1: Windows 2008, Oracle DB
- VM 2: Windows 2008 or Linux: J2EE Application Server
- VM 3: Windows XP: Windows IE Client
- Safari: Mac Client (i.e, not VM).
- Oracle DB connector (to query the database)

Of course, that Mac Pro had 8 physical and 16 virtual cores and 16GB of RAM (or was it more)? That was a fun machine.
 
You can have the mac talk to the vm's, and the vm's can talk to each other. It's like having your own little portable testbed.

If you have the vm's using NAT to connect to the host then it's also possible to assign ip addresses based on mac address of your vm's. Then no matter what network you're on you'll be able to find the vm's at the same ip address each time. Or even by hostname if you want to add entries to /etc/hosts.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.