Configure the KVM server to enable the VM to communicate with other hosts on the LAN

Source: Internet
Author: User

Configure the KVM server to enable the VM to communicate with other hosts on the LAN

Initial Exploration of KVM Virtualization

Environment
Operating System: CentOS 6.7 64-bit graphical interface

Configuration
KVM virtualization requires support from Intel VT or AMD-V technology. You can use the following command to determine whether the local CPU supports the above two Virtualization Technologies:

Egrep '(vmx | svm)'/proc/cpuinfo
If the CPU supports virtualization technology, you should enable the virtualization function of the CPU in the BIOS before deploying virtualization.
Install related virtualization components:

Yum-y groupinstall "Virtualization" "Virtualization Client" "Virtualization Platform" "Virtualization Tools"
Start and enable the libmongod service to automatically start with startup:

Service libmongod start
Chkconfig libmongod on

Start the graphic management interface:

Virt-manager

Configuration
Vi/etc/sysconfig/network-scripts/ifcfg-br0
DEVICE = "br0"
TYPE = "Bridge"
ONBOOT = "yes"
NM_CONTROLLED = "no"
BOOTPROTO = "static"
IPADDR = "192.168.1.2" # modify this option based on your actual situation.
NETMASK = "255.255.255.0" # modify this option based on your actual situation.
GATEWAY = "192.168.1.1" # modify this option based on your actual situation.

Vi/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE = "eth0"
TYPE = "Ethernet"
HWADDR = "10: BF: 48: 4C: 4A: 62" # modify this option based on your actual situation.
NM_CONTROLLED = "no"
ONBOOT = "yes"
BRIDGE = "br0"

# Enable route forwarding.
Sed-I '/^ net \. ipv4 \. ip_forward/s/=. */= 1/'/etc/sysctl. conf
Echo 1>/proc/sys/net/ipv4/ip_forward

# Restart the system after modification.
Init 6
When creating a VM, select br0 as the network type:

If you have already created a virtual machine, you can modify it as shown in:

After setting, you can configure the Virtual Machine Nic to the same IP address as the physical machine.

-------------------------------------- Split line --------------------------------------

How to add a hard disk for a Linux Virtual Machine in KVM

Getting started with Linux: KVM for Virtual Machine experience

RHEL6 KVM virtualization creates a bridge NIC-Bridge

RedHat Linux KVM Virtual Machine bridging

Installation/bridging settings of KVM in CentOS 5.6/virtual machine creation and operation

The/bin/qemu-KVM problem cannot be found when the kvm virtual machine is installed with libvirt In Ubuntu.

Install and configure the KVM Virtual Machine in RedHat6.5

Nested virtualization nested for KVM Virtualization

-------------------------------------- Split line --------------------------------------

This article permanently updates the link address:

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.