网桥的操作:

brctl help

       example:

内部虚拟桥添加:

cd /etc/libvirt/qemu/networks/

 

vim mybr.xml

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

  mybr

  a33b5291-4f1a-45bc-9eba-8b3463706652

 

 

 

   

     

   

 

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

 

cd /etc/libvirt/qemu/networks/autostart

ln -s ../mybr.xml .

/etc/init.d/libvirtd restart

 

========随宿主机启动

/etc/init.d/xendomains

cd /etc/xen/auto

ln -s ../vm1 .

 

当宿主关机的时候,虚拟save.

virsh vcpuinfo vm1

virsh vcpupin vm1

=========

dd if=/dev/zero of=vm1-disk2.img bs=1M seek=2000000 count=1

disk = [ "tap:aio:/var/ftp/xen/vm1.img,xvda,w","tap:aio:/var/ftp/xen/rhel5_c-disk2.img,xvdb,w" ]

========

/etc/libvirt/qemu/networks/virbr1.xml

======

  virbr1

  d5e9ddc5-0041-434b-824d-5e2134a44af2

 

 

 

   

     

   

 

======

 

cd /etc/libvirt/qemu/networks/autostart

ln -s ../virbr1.xml .

 

/etc/init.d/libvirtd restart

 

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

brctl show

brctl addbr xenbr1

brctl addif xenbr1 vif2.0

 

brctl delif xenbr1 vif2.0

brctl delbr xenbr1