虚拟机网卡配置
655 virsh list --all //查看虚拟机
656 clone-vm7 //创建虚拟机
1
2
3
4
657 virsh list --all
659 virsh start rh7_node01 //开启虚拟机
660 virsh start rh7_node02 //开启虚拟机
661 virsh start rh7_node03 //开启虚拟机
662 virsh start rh7_node04 //开启虚拟机
665 virsh list --all
671 virsh console rh7_node03 //链接并进入域
进入proxy
7 vim /etc/sysconfig/network-scripts/ifcfg-eth0 //修改配置文件
8 nmcli connection modify eth0 ipv4.method auto connection.autoconnect yes //刷新配置文件
9 nmcli connection up eth0 //启用链接
10 ifconfig | less
11 ls
12 grubby --update-kernel=ALL --args="console=ttyS0"
13 poweroff
14 cd /etc/sysconfig/network-scripts/ //进入网卡配置文件
15 ls //查看
17 hostnamectl set-hostname proxy //更改主机名
18 nmcli connection modify eth0 ipv4.method manual ipv4.addresses "192.168.4.5/24" connection.autoconnect yes //配置网卡
19 nmcli connection up eth0 //启用网卡
20 ifconfig //查看
23 nmcli connection show //查看所有网络设备
24 nmcli connection add type ethernet con-name eth1 ifname eth1 connection.autoconnect yes //添加设备eth1
25 nmcli connection show //查看
26 nmcli connection modify eth1 ipv4.method manual ipv4.addresses "192.168.2.5/24" connection.autoconnect yes //设置eth1 IP地址
27 nmcli connection up eth1 //启用eth1
30 ifconfig eth1 //查看
进入client
7 vim /etc/sysconfig/network-scripts/ifcfg-eth0 //修改网卡配置文件
8 nmcli connection modify eth0 ipv4.method auto connection.autoconnect yes //刷新配置文件
9 nmcli connection up eth0 //启用链接
12 grubby --update-kernel=ALL --args="console=ttyS0"
13 poweroff
进入web1
14 nmcli connection show //查看列表
15 nmcli connection delete eth0 //删除eth0
16 nmcli connection show
17 nmcli connection add type ethernet con-name eth1 ifname eth1 //创建新的链接eth1
18 nmcli connection show
19 nmcli connection modify eth1 ipv4.method manual ipv4.addresses "192.168.2.100/24" connection.autoconnect yes //为eth1设置网卡
20 nmcli connection up eth1 //启用
21 ifconfig eth1 //查看
22 hostnamectl set-hostname web1 //更改主机名
发表评论