VMware 下的CentOS6.7 虚拟机与Windows7通信
来源:互联网 发布:淘宝怎么联系卖家售后 编辑:程序博客网 时间:2024/05/21 18:36
在有网络的情况下,VMware 虚拟机使用桥接模式(Bridged) 和NAT方式,会自动通信,但是在没有网络的情况下怎么办呢?对,是的,使用host-only模式,如何设置呢?
注:将Windows上的虚拟网卡改成跟Linux上的网卡在同一网段, 一定要将widonws上的WMnet1的IP设置和你的虚拟机在同一网段,但是IP不能相同.
第一步: 打开VMware Workstation 软件,选择Edit--->Virtual NetWork Editor ,设置Subnet IP和Subnet mask,如下图:
第二步:打开win7下的 控制面板 -->网络和 Internet -->网络连接,右键VMware Network Adapter VMnet1 ,设置host-only模式下与虚拟机通信的,该win7的静态ip地址.
当然,要让虚拟机和WIN7互相通信,还需关闭各自系统的防火墙,win7防火墙关闭就不介绍了 ;除此之外,设置的静态IP 要在同一网段 .
第三步: 虚拟机CentOS IP 、主机名 和防火墙配置.
1、首先我们的虚拟机使用host-only模式 ., 右键CenOS,选择settings,如下图:
2、修改虚拟机CentOS IP 地址
进入虚拟机,打开终端命令行,输入 命令修改ip
[root@itcast01 Desktop]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
3、修改主机名
root@itcast01 Desktop]# vim /etc/sysconfig/network
4、修改主机名和IP的映射关系
[root@itcast01 Desktop]# vim /etc/hosts
5、关闭防火墙
[root@itcast01 Desktop]# service iptables stop为了防止下次开机时,防火墙自动启动,执行如下命令
[root@itcast01 Desktop]# chkconfig iptables off
注: 查看防护墙状态 service iptables status
关闭 service iptables stop
查看防火墙开机启动状态 chkconfig iptables --list
关闭开机启动 chkconfig iptables off
5 、重启CenOS 虚拟机.
6、查看下windows 和cenos虚拟机是否能够通信.
1、windows cmd 下ping 虚拟机的IP.
windows访问虚拟机网路是通的.
2、虚拟机访问windows是否能通。
至此,windows和虚拟机的网络已经打通了.
centos从7开始默认用的是firewalld,这个是基于iptables的,虽然有iptables的核心,但是iptables的服务是没安装的。所以你只要停止firewalld服务即可:
sudo systemctl stop firewalld.service && sudo systemctl disable firewalld.service
如果你要改用iptables的话,需要安装iptables服务:
sudo yum install iptables-services
sudo systemctl enable iptables && sudo systemctl enable ip6tables
sudo systemctl start iptables && sudo systemctl start ip6tables
- VMware 下的CentOS6.7 虚拟机与Windows7通信
- [转]设置Windows7下VMware虚拟机上网
- 设置Windows7下VMware虚拟机上网
- VMware 虚拟机克隆 CentOS6.7
- xshell与虚拟机VMware中centos6.7系统突然连不上
- Windows 10 与VMware下Linux虚拟机网络通信
- 虚拟机VMware下安装CentOS6.4
- VMware虚拟机与主机的网络通信模式
- vmware虚拟机与主机的三种通信方式
- vmware虚拟机与主机的三种通信方式
- vmware虚拟机与主机的三种通信方式
- VMWare 虚拟机与主机的三种通信方式
- Ubuntu Linux与Vmware虚拟机通过串口通信的配置
- windows与虚拟机下的socket通信
- Linux下vmware虚拟机中永久激活Windows7
- Linux下vmware虚拟机中永久激活Windows7
- windows7下安装vmware虚拟机linux系统详细流程
- VmWare下扩展虚拟机内系统centos6.6的硬盘分区空间(图文讲解)
- Part4:算法(一)
- 杭电ACM——HDU-1108最小公倍数
- [C#]冒泡排序
- CSS&JavaScript笔记
- JAVA NIO例子
- VMware 下的CentOS6.7 虚拟机与Windows7通信
- 《linux学习》之用户管理
- 华为OTT交流材料
- AngularJS ng-model获取不到WdatePicker值的解决方案
- Selenium+PhantomJS自动续借图书馆书籍(下)
- 晨昏线
- opencv3接收rtsp网络视频流
- win10背景色改成豆沙绿 锁屏后失效修改方式
- IDE工具的逻辑结构