| | 152 | * Xen 提供三種網路連接方式: |
| | 153 | 1. Bridge Networking (於此案例,我們使用 Bridge,簡單來說就是讓 VM 和 Host 都再同一個網域,讓 VM 可接收 dhcp server 發的 IP) |
| | 154 | {{{ |
| | 155 | #!sh |
| | 156 | (network-script network-bridge) |
| | 157 | (vif-script vif-bridge) |
| | 158 | }}} |
| | 159 | 2. Two-way Routed Network |
| | 160 | {{{ |
| | 161 | #!sh |
| | 162 | (network-script network-route) |
| | 163 | (vif-script vif-route) |
| | 164 | }}} |
| | 165 | 3. Routed Networking with NAT |
| | 166 | {{{ |
| | 167 | #!sh |
| | 168 | (network-script network-nat) |
| | 169 | (vif-script vif-nat) |
| | 170 | }}} |
| | 171 | ---- |
| | 172 | = 【Step 5: 安裝 xen image 製作工具】 = |
| | 173 | * 使用 '''wget''' 於[http://www.xen-tools.org/software/xen-tools/releases.html 此網頁]下載新版 xen-tools,xen-tools 可協助建置 VM 的 Image |
| | 174 | {{{ |
| | 175 | $ cd |
| | 176 | $ wget http://www.xen-tools.org/software/xen-tools/xen-tools-4.1.tar.gz |
| | 177 | $ tar zxvf xen-tools-4.1.tar.gz |
| | 178 | $ sudo aptitude install debootstrap perl-modules libconfig-inifiles-perl libtext-template-perl |
| | 179 | # sudo make install |
| | 180 | }}} |
| | 181 | * 修改 xen-tools 的設定檔 (設定檔位置 /etc/xen-tools) |
| | 182 | {{{ |
| | 183 | $ cd /etc/xen-tools |
| | 184 | $ sudo vim /etc/xen-tools/xen-tools.conf |
| | 185 | $ sudo gedit /etc/xen-tools/xen-tools.conf |
| | 186 | }}} |
| | 187 | {{{ |
| | 188 | #!sh |
| | 189 | 45 dir = /home |
| | 190 | 169 dhcp = 1 |
| | 191 | 214 mirror = http://free.nchc.org.tw/debian |
| | 192 | }}} |