Configure the bridging network in the kvm virtual machine of CentOS6
Source: Internet
Author: User
In the CentOS6 system kvm virtual machine, we first disable and uninstall the NetworkManager tool to enable the built-in network service chkconfigNetworkManageroffchkconfignetworkonserviceNetworkManagerstopyumeraseNetworkManager and then install the hypervisor through the software, install virt-m CentOS 6 system kvm virtual machine to configure bridging network
First, disable and uninstall the NetworkManager tool to enable the built-in network service.
Chkconfig NetworkManager off
Chkconfig network on
Service NetworkManager stop
Yum erase NetworkManager
Next, install software packages such as virt-manager and qemu-kvm through the software installation management program.
Rpm-qa | grep qemu
Start libmongod,
Service libmongod start
After the installation is complete, we start to configure network parameters.
First, disable the default network configuration virbr0 that comes with kvm.
Virsh net-list # view the default kvm network configuration
Delete default network configurations of kvm
Virsh net-destroy default
Virsh net-undefine default
Service libmongod restart
View network configuration ifconfig
Next we will configure the bridge network
Go to the/etc/sysconfig/network-scripts directory
Cd/etc/sysconfig/network-scripts
Edit ifcfg-eth0 vim ifcfg-eth0
DEVICE = eth0
ONBOOT = yes
BRIDGE = br0
Save and exit
Edit ifcft-br0 vim ifcfg-br0
DEVICE = br0
ONBOOT = yes
TYPE = Bridge
BOOTPROTO = static
IPADDR = 192.168.1.22
NETMASK = 255.255.255.0
GATEWAY = 192.168.1.1
DELAY = 0
Save and exit
After the network service is restarted, the service network restart takes effect.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.