方法1(非常靠谱)
https://technet.microsoft.com/zh-tw/library/dn720401.aspx
方法2(可能会遇到vmware nat service莫名其妙停止)
此方法在Kimsufi KS-3下测试通过.
vmware player是个非常好的东西,我们将借助它的NAT和端口映射功能为小鸡分IP上网和映射端口。
先安装vmware player,安装过程提示什么的话随便选不选都无所谓,系统将多出两个虚拟网卡:
VMware Network Adapter VMnet1 这个是host only
VMware Network Adapter VMnet8 这个是NAT网络
VMnet8是俺们要用到的。
hyper-v安装不多说了,打开 Hyper-V 管理器—–虚拟交换机管理器—–外部,创建虚拟交换机—名称随便(VMNAT我叫这个)—–外部网络选择”VMware Virtual Ethernet Adapter for VMnet8″—确定。
小鸡网卡选择刚才VMNAT.
对,你没看错,只要这么简单的操作,小鸡就能dhcp分到IP并且上网了。
其他的配置(比如IP段范围,端口映射)只需找到C:\ProgramData\VMware\vmnetnat.conf
端口映射根据这里的提示做即可:
[incomingtcp] # Use these with care - anyone can enter into your virtual machine through these... # FTP (both active and passive FTP is always enabled) # ftp localhost 8887 #8887 = 192.168.27.128:21 # WEB (make sure that if you are using named webhosting, names point to # your host, not to guest... And if you are forwarding port other # than 80 make sure that your server copes with mismatched port # number in Host: header) # lynx http://localhost:8888 #8888 = 192.168.27.128:80 # SSH # ssh -p 8889 root@localhost #8889 = 192.168.27.128:22 [incomingudp] # UDP port forwarding example #6000 = 192.168.27.128:6001
有木有非常的屌~~~~~~~~~~~~~
如果按照此文配置发现小鸡网络慢。请参考
windows server 2012 hyper-v NAT环境下虚拟机网速过慢的解决办法
a