RHEL5 Xen Virtual network management and virtual machine installation

Source: Internet
Author: User
Tags range xen hypervisor vmware server

Xen virtualization uses "semi-virtualization" (para-virtualization), all hardware is only scheduled through the Xen hypervisor, compared to VMware Server and workstations to virtual complete hardware device performance is much better! But has always been used when there is a problem: "Virtual network"! Today, I found the latest BATE package for the Virt-manager (RHEL5 GUI tool for managing virtual machines) on RHN. Ha ha.... The virtual network has become simpler from today!

1, download the following package from the Rhn.redhat.com

dnsmasq-2.39-2.el5.i386.rpm

libvirt-0.2.4-4.el5.i386.rpm

libvirt-python-0.2.3-4.el5.i386.rpm

python-virtinst-0.103.0-2.el5.noarch.rpm

virt-manager-0.4.0-2.el5.i386.rpm

#rpm-UVH *.rpm

2. Restart Service

#/etc/init.d/libvirtd restart

#/etc/init.d/xend restart

3. Activate virtual network

First we can see the following files:

/usr/share/libvirt/networks/default.xml

This is the network settings file content for

<network>
  <name>default</name>
  <bridge name="virbr0" />
  <forward/>
  <ip address="192.168.122.1" netmask="255.255.255.0">  //虚拟网卡的IP
   <dhcp>
    <range start="192.168.122.2" end="192.168.122.254" />  //DHCP要分配的地址
   </dhcp>
  </ip>
</network>

Using Virsh to manage virtual networks

#virsh

Virsh # Net-create/usr/share/libvirt/networks/default.xml

Virsh # Net-start Default

Virsh # Quit

#ifconfig

At this point you should see a new NIC Virbr0

4, the establishment of a new virtual network segment

#cp /usr/share/libvirt/networks/default.xml /usr/share/libvirt/networks/mynet.xml
#vim /usr/share/libvirt/networks/mynet.xml
<network>
  <name>mynet</name>
  <bridge name="virbr1" />
  <forward/>
  <ip address="172.16.122.1" netmask="255.255.255.0">  //虚拟网卡的IP
   <dhcp>
    <range start="172.16.122.2" end="172.16.122.254" />  //DHCP要分配的地址
   </dhcp>
  </ip>
</network>

Using Virsh to manage virtual networks

#virsh

Virsh # Net-create/usr/share/libvirt/networks/mynet.xml

Virsh # Net-start MyNet

Virsh # Quit

#ifconfig

At this point you should see a new NIC Virbr1

=================================================

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.