@
lu18887 我用的VMware Fusion 使用NAT方式, 宿主机可以访问没问题的。
启动虚拟机后宿主机上能看到这几个接口
vmnet1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:50:56:c0:00:01
inet 192.168.232.1 netmask 0xffffff00 broadcast 192.168.232.255
vmnet8: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:50:56:c0:00:08
inet 172.16.109.1 netmask 0xffffff00 broadcast 172.16.109.255
虚拟机的IP地址是 172.16.109.141
Darren-rMBP:~ darren$ ssh root@172.16.109.141
Linux debian 3.14-2-amd64 #1 SMP Debian 3.14.15-2 (2014-08-09) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Aug 31 09:28:18 2014 from 172.16.109.1
debian:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0c:29:cb:53:90
inet addr:172.16.109.141 Bcast:172.16.109.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fecb:5390/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:143 errors:0 dropped:0 overruns:0 frame:0
TX packets:110 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18014 (17.5 KiB) TX bytes:20240 (19.7 KiB)