VMWare Workstation虚拟机访问外网
平时在使用虚拟机的时候都没有使用外网的需求,这次配置ceph的时候,快速安装ceph需要使用外网,突然发觉上不了网,经过网络上的学习,整理一下内容。
用的NAT模式,以前我一直以为
这个是与主机进行网络交换的,想访问外网需要将网关设置成这里显示的。其实并不是,这个仅仅是主机与虚拟机进行数据交换,而虚拟机中需要访问外网走的网关是在vmware中设置,如下图:


这个页面是在”编辑“中。
点击更改设置后,出现:


在点击NAT设置:



在虚拟机中的操作系统的网关就需要与这个一致。
我的操作系统是CentOS7中的网络配置如下:


需要说明的是虚拟机中DNS也同网关好了。经过是实测这样是行的通的。


