72 | | * 有四種作法 (必須讓 domu 開機時可以透過 PXE 網路開機): |
73 | | 1. [http://www.grid.ie/pypxeboot/ pypxeboot] |
74 | | * [△] 需 patch udhcp (但目前官方只支援 32bit 版本的 patch,需自行 patch 到 64bit 版本) |
75 | | 2. [http://wiki.xensource.com/xenwiki/PyGrub PyGrub] |
76 | | * [X] 不可行 (原開發者文件中指出 -> 不支援網路開機) |
77 | | 3. [http://wiki.xensource.com/xenwiki/PvGrub PvGrub] |
78 | | * [O] 目前測試成功,但是有些地方需要人工操作,無法完全自動化 (持續測試中) |
79 | | * if you see "grubdom>", this maybe grub can't find its config file. Check your harddisk partition number to make sure that is correct or check the position of grub config file. |
80 | | 4. 直接使用 DRBL 的 initrd-pxe 的特性 |
| 72 | * 要讓 DRBL Client 上的 VM 也作為 DRBL Client (有兩種方式) |
| 73 | 1. 讓 domU 開機時可以透過 '''PXE 網路開機''' (有三種作法) |
| 74 | 1. [http://www.grid.ie/pypxeboot/ pypxeboot] |
| 75 | * [△] 需 patch udhcp (但目前官方只支援 32bit 版本的 patch,需自行 patch 到 64bit 版本) |
| 76 | 2. [http://wiki.xensource.com/xenwiki/PyGrub PyGrub] |
| 77 | * [X] 不可行 (原開發者文件中指出 -> 不支援網路開機) |
| 78 | 3. [http://wiki.xensource.com/xenwiki/PvGrub PvGrub] |
| 79 | * [O] 目前測試成功,但是有些地方需要人工操作,無法完全自動化 (持續測試中) |
| 80 | * if you see "grubdom>", this maybe grub can't find its config file. Check your harddisk partition number to make sure that is correct or check the position of grub config file. |
| 81 | 2. domU '''不使用網路開機''',直接使用 DRBL initrd-pxe 的特性 |
82 | | * 因 DRBL 的特性是在 initrd 階段才去掛在 NFS 作為檔案系統,所以可利用此特性達成 |
83 | | [[Image(PV DRBL CLient.png)]] |
| 83 | * 因 DRBL 的特性是在 initrd 階段才去掛載 NFS 作為檔案系統 |
| 84 | * DRBL Client 已經有了自己的檔案系統,可以讓 domU 不需再透過網路去要 Kernel 和 initrd-pxe (可將 Kernel 和 initrd-pxe 複製到 /home/domains) |
| 85 | * 只需再 domU 設定檔內指定Kernel 和 initrd-pxe即可 |
| 86 | [[Image(PV DRBL CLient.png,width=450)]] |
| 87 | * 可參考此設定檔 |
| 88 | {{{ |
| 89 | #!sh |
| 90 | kernel = '/home/domains/vmlinuz-2.6.22.9' |
| 91 | ramdisk = '/home/domains/initrd-pxe.2.6.22.9.img' |
| 92 | memory = '512' |
| 93 | name = 'vm01' |
| 94 | |
| 95 | # root = '/dev/sda1' |
| 96 | # disk = ['phy:/dev/sda1,sda,w'] |
| 97 | # (不需使用 disk,讓 domU 為 diskless) |
| 98 | |
| 99 | dhcp = 'dhcp' |
| 100 | vif = [ 'mac=00:16:3E:BE:53:2C'] |
| 101 | |
| 102 | on_poweroff = 'destroy' |
| 103 | on_reboot = 'restart' |
| 104 | on_crash = 'restart' |
| 105 | |
| 106 | vfb = [ 'type=vnc,vnclisten=0.0.0.0,vncunused=1' ] |
| 107 | # (可透過 vncviewer 登入) |
| 108 | }}} |