Bridge multiple network interfaces to guest OS

สร้างไฟล์ /etc/xen/scripts/network-xen-custom โดยใช้คำสั่ง

#vi /etc/xen/scripts/network-xen-custom

ทำการ copy script ด้านล่างนี้ไปใส่ไว้ในไฟลฺ์ /etc/xen/scripts/network-xen-custom

#!/bin/sh
# network-xen-custom
# Exit if anything goes wrong
set -e
# First arg is operation.
OP=$1
shift
script=/etc/xen/scripts/network-bridge
case ${OP} in
        start)
                $script start vifnum=0 bridge=xenbr0 netdev=eth0
                $script start vifnum=1 bridge=xenbr1 netdev=eth1
                ;;
        stop)
                $script stop vifnum=0 bridge=xenbr0 netdev=eth0
                $script stop vifnum=1 bridge=xenbr1 netdev=eth1
                ;;
        status)
                $script status vifnum=0 bridge=xenbr0 netdev=eth0
                $script status vifnum=1 bridge=xenbr1 netdev=eth1
                ;;
        *)
                echo "Unknown command:${OP}"
                echo 'Valid commands are: start, stop, status'
                exit 1
esac

จากนั้นทำการแก้ไขค่า permission ของไฟล์โดยใช้คำสั่ง

#chmod 755 /etc/xen/scripts/network-xen-custom

ขั้นตอนรองสุดท้าย แก้ไขไฟล์ /etc/xen/xend-config.sxp โดยเอา comment  # ออกไปในบรรทัดที่มีข้อความ (network-script network-bridge)

(network-script network-xen-custom)

สุดท้ายทำการ restart เครื่องโดยใช้คำสั่ง

#reboot

คำค้นยอดนิยม: bridge network ubuntu, วิธี multiple network

Related posts:

  1. Make bridge multiple network interfaces on Xen host to guests os. ขั้นแรกให้สร้าง script file ขึ้นมาโดยใช้คำสั่ง #vi /etc/xen/scripts/network-xen-custom จากนั้น copy...
  2. Other Virtual network interfaces go down when bring down virtual network interfaces เคยเกิดปัญหาไหม ถ้าเราทำการสร้าง Virtual network interfaces ขึ้นมาหลายๆ interface และพบว่าเมื่อเรา...
  3. Network Card Bonding On Red Hat Linux and CentOS Channel Bonding เป็นวิธีการนำเอา network interface card หลายๆใบมารวมกันเพื่อให้สามารถ ขยาย...
  4. Install fully virtualized Windows 2003 as a guest O/S on Xen. ในการติดตั้ง windows ลงบน xen ของ Linux จะมีการติดตั้งที่ยุ่งยากกว่า virtualization...
  5. Make a clone of a virtual guest operating system in RHEL 5 xen ใน Red Hat 5 ไม่ได้ใส่ฟีเจอร์ที่จะสามารถทำการโคลนตัว guest os...

You can leave a response, or trackback from your own site.

Leave a Reply