wiki:Xen_DRBL

Version 11 (modified by rock, 15 years ago) (diff)

--

Xen 和 DRBL 整合上得問題

1. DRBL for DRBL Xen Client 的環境設定

  • Xen image 和 grub menu 設定
    $ cp /boot/*xen* /tftpboot/nbi_img
    $ mv /tftpboot/node_root/boot /tftpboot/node_root/boot.old && mkdir /tftpboot/node_root/boot
    $ cp /boot/* /tftpboot/node_root/boot/ 
    
    $ vim /tftboot/nbi_img/pxelinux.cfg/default
    label drbl
      MENU DEFAULT
      # MENU HIDE
      MENU LABEL Ubuntu 8.10 (DRBL, Xen & Lustre)
      # MENU PASSWD
      kernel mboot.c32
      append xen.gz --- vmlinuz-pxe netloop.nloopbacks=0 --- initrd-pxe.img devfs=nomount drblthincli=off selinux=0 edd=on
      TEXT HELP
      * DRBL version: 1.9.3-24. (C) 2003-2008, NCHC, Taiwan
      * Disclaimer: DRBL comes with ABSOLUTE NO WARRANTY
      ENDTEXT
    
  • Setup domU IP from DHCP (192.168.1.50 ~ 192.168.1.250)
    $ vim /etc/dhcp3/dhcpd.conf
    subnet 192.168.1.0 netmask 255.255.255.0 {
        option subnet-mask  255.255.255.0;
        option routers 192.168.1.254;
        next-server 192.168.1.254;
        range 192.168.1.50 192.168.1.250;
    //skip//
    
    $ iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE
    


2. 問題

2.1 未解決

  1. Client 啟動 xend 時,無法 bridge eth0 (Xend 的服務正常,只是沒有 bridge 裝置)
    $ xend restart
    ifdown: interface eth0 not configured
    SIOCSIFNAME: Device or resource busy
    
    • 推測: DRBL 的邏輯是 須先啟動網路裝置 (在 initrd 階段啟動) 來 mount NFS 作為 rootfs,
      但 Xend 啟動時,會先 ifdown eth0,在做一些 brctl 的相關動作後載啟動 eth0
    • 作法一(x):增加 eth0 內容到 /etc/network/interface 也無法成功 bridge
    • 作法二(x):自行手動先 ifup eth0 起來,導致系統整個停住 (因網路皆停止、rootfs 無法 mount,終端機也無法控制)
    • 作法三(x):改用別名
      $ xend restart
      Error: either "local" is duplicate, or "eth0" is a garbage.
      
    • 作法四(?):修改 /etc/xen/script/network-bridge
    • 作法五(?):官方建議若是使用 NFS roots 可改用 netwrok-route,只是缺點無法抓到 DHCP IP

2.1 已解決

  1. Client 開機時,若有三個 eth,會依序使用 eth0 eth1 eth2 透過 udhcpc 來跟 DRBL Server 要 IP,是否有方法來指定 eth0 要即可?
    • Client開機時, udhcpc 會根據 XEN 的 netloop 的數量抓到多餘的 veth 和 vif 裝置,解決方法可在 kernel command 加上 netloop.nloopbacks=0 或將其編譯成 module

回報給老大,老大已更新 linuxrc-or-init (/usr/lib/mkpxeinitrd-net/initrd-skel) 在新的 unstable DRBL 版本,預設只會使用 eth0 來抓 IP

Attachments (4)

Download all attachments as: .zip