First, the preface
Probably a handful of people using the Mac OS in the virtual machine environment to do iOS development, I do not advocate this approach, but in conditions that do not allow, the choice of virtual machines is also no way to do, on how to install the virtual machine Mac OS tutorial, Google detailed tutorials on a considerable number, here is not to repeat.
Because of the need to design the socket aspect of development, so about the virtual machine Mac OS IP settings are necessary.
My development using Open source code library: Asyncsocket, about the use can refer to: http://blog.csdn.net/bjx327660180/article/details/8105289
Second, how to configure
My virtual machine version for VM8.0, the other version I did not test, may be slightly different.
1. First, the virtual machine supports three network modes:
(1) Nat mode (VMNET8): This is the default configuration, that is, the virtual machine for the route, the host and Mac OS as two machines, allocated into the form of 192.168.x.x, host external IP unchanged, if only the host and Mac OS to Speaking, these two machines are a form of intranet IP
(2) Host-only (VMNET1): This is used and host the same IP, understand, do not explain
(3) Bridge (VMNET0): Bridging mode, this is the need for us, to the virtual machine Mac OS assigned A and host the same IP address, and the host LAN other machines have the same principal status
2. Virtual machine->edit->virtual network editor->vmnet0 (bridged)->bridged to:, as shown in the following figure:
Select your network card in bridge to, select your Host network card, do not select the virtual machine, or you can not assign the address.
3, after the allocation to the virtual machine->mac Os->setting->netwrok adapter->networkconnection->custom-> Select VMnet0 (that is, the bridge mode that you just set), as follows:
3, the above set up, to the Mac OS System Preferences set-> network, the configuration of the Ethernet will be changed to manual configuration, and then set your LAN IP can be.
4, should now be able to use independent IP and the LAN other machines to communicate.
Http://www.blog520.com/?p=12