Kvm bridget Configuration

Source: Internet
Author: User

In the past, using qemu-kvm to run virtual machines is basically a nat method. virtual machines can access external networks and basically meet their own requirements, but they cannot access the virtual machines. Now, because we need to deploy the environment on the Virtual Machine for Virtual Network Management of openstack, we need the correct access between virtual machines and the ip address for external access.

Environment Configuration

Hardware: cpu dual-core, four threads, 8 GB memory

OS: ArchLinux 64

Note:: The NetworkManager service may make the bridge unable to run normally. Disable the NetworkManager service, systemctl disable NetworkManager, and systemctl stop NetworkManager before configuration.

Manually configure the bridge

  1. Install bridge-utils: pacman install bridge-utils
  2. First, change the ip address of the eth0 NIC: ifconfig eth0 0.0.0.0 (some system NICs may be named differently, such as em0 in pci operation)
  3. Nic binding: brctl addbr br0; brctl addif eth0; ifconfig br0 10.68.7.x up;
  4. /Etc/qemu-ifup: Add tap0 to the bridge
  5. /Etc/qemu-ifdown: delete tap0 from the bridge
  6. In some cases, you need to modify your route: route add default gw 10.68.7.x
  7. Modify the resolv. conf file (other systems may be resolv)
  8. Start qemu-system-x86_64 -- enable-kvm-net nic-net tap, ifname = tap0-vnc: 1-m 2048-smp 2-hda fedora. img
Configure the bridge through the configuration file
  1. Install bridge-utils: pacman install bridge-utils
  2. Modify the NIC configuration file/etc/network/bridge (Other Nic managers may be under/etc/sysconfig/network-scripts)
  3. /Etc/qemu-ifup: Add tap0 to the bridge
  4. /Etc/qemu-ifdown: delete tap0 from the bridge
  5. Start qemu-system-x86_64 -- enable-kvm-net nic-net tap, ifname = tap0-vnc: 1-m 2048-smp 2-hda fedora. img
The route After configuring ifconfig

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.