close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_fs.so: cannot map zero-fill pages: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Oct 8, 2009, 4:27:36 AM (16 years ago)
- Author:
-
rider
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v2
|
v3
|
|
| 5 | 5 | }}} |
| 6 | 6 | ---- |
| 7 | | = 【Step 1: 連線到遠端主機】 = |
| 8 | | * 以下兩種連線方式擇一使用. |
| 9 | | {{{ |
| 10 | | $ ssh 140.xxx.xxx.xxx |
| 11 | | $ vncviewer 140.xxx.xxx.xxx |
| 12 | | }}} |
| 13 | | ---- |
| 14 | | = 【Step 2: 產生一台虛擬機器】 = |
| | 7 | |
| | 8 | = 【Step 1: 首先產生一台虛擬機器】 = |
| 15 | 9 | * 設定你想要怎樣規格的虛擬機器. |
| 16 | 10 | {{{ |
| … |
… |
|
| 39 | 33 | }}} |
| 40 | 34 | {{{ |
| 41 | | $ sudo xen-create-image --hostname nvidia --ip xxx.xxx.xxx.xxx |
| 42 | | }}} |
| 43 | | ---- |
| 44 | | = 【Step 3: 查看你的顯卡資訊】 = |
| | 35 | $ sudo xen-create-image --hostname node1 --ip xxx.xxx.xxx.xxx |
| | 36 | }}} |
| | 37 | ---- |
| | 38 | = 【Step 2: 查看你的顯卡資訊】 = |
| 45 | 39 | {{{ |
| 46 | 40 | $ lspci -vv |
| … |
… |
|
| 64 | 58 | }}} |
| 65 | 59 | ---- |
| 66 | | = 【Step 4: PCI Frontend Configuration 設定你的 DomU 】 = |
| 67 | | {{{ |
| 68 | | $ sudo vim /etc/xen/nvidia.cfg [[BR]] |
| | 60 | = 【Step 3: PCI Frontend Configuration 設定你的 DomU 】 = |
| | 61 | {{{ |
| | 62 | $ sudo vim /etc/xen/node1.cfg |
| 69 | 63 | }}} |
| 70 | 64 | {{{ |
| … |
… |
|
| 84 | 78 | 'file:/home/domains/nvidia/swap.img,sda1,w', |
| 85 | 79 | ] |
| 86 | | name = 'nvidia' |
| | 80 | name = 'node1' |
| 87 | 81 | |
| 88 | 82 | # |
| 89 | 83 | # Networking |
| 90 | 84 | # |
| 91 | | vif = [ 'ip=140.xxx.xxx.xxx,mac=00:16:3E:AA:70:5C' ] |
| | 85 | vif = [ 'ip=xxx.xxx.xxx.xxx,mac=00:16:3E:AA:70:5C' ] |
| 92 | 86 | |
| 93 | 87 | # |
| … |
… |
|
| 99 | 93 | }}} |
| 100 | 94 | ---- |
| 101 | | = 【Step 5: PCI Backend Configuration 設定你的 Dom0 】 = |
| | 95 | = 【Step 4: PCI Backend Configuration 設定你的 Dom0 】 = |
| | 96 | * 切換身份為 Super user. |
| 102 | 97 | {{{ |
| 103 | 98 | $ sudo su - |
| 104 | 99 | }}} |
| 105 | | * Hide the device from dom0 so pciback can take control. |
| | 100 | * 隱藏 dom0 的PCI 匯流排的位址, 並交由 pciback 模組來控制該匯流排存取權. |
| 106 | 101 | {{{ |
| 107 | 102 | $ echo -n "0000:01:00.0" > /sys/bus/pci/drivers/nvidia/unbind |
| 108 | 103 | }}} |
| 109 | 104 | |
| 110 | | * Give the dev_ids to pciback, and give it a new slot then bind. |
| | 105 | * 將 dev_ids 轉到 pciback 成為新的 binding slot. |
| 111 | 106 | {{{ |
| 112 | 107 | $ echo -n "0000:01:00.0" > /sys/bus/pci/drivers/pciback/new_slot |
| … |
… |
|
| 121 | 116 | }}} |
| 122 | 117 | |
| 123 | | * Caution: Make sure that the device is not controlled by any driver: there should be no driver symlink for nvidia. |
| | 118 | * 警告: 請確認您的顯示卡資源沒有被其 Kernel module 所佔有及控制: 您顯示卡的 symlink 不應該存在著. |
| 124 | 119 | {{{ |
| 125 | 120 | #!sh |
| … |
… |
|
| 128 | 123 | }}} |
| 129 | 124 | ---- |
| 130 | | = 【Step 6: 硬體直接存取設定】 = |
| | 125 | = 【Step 5: 硬體直接存取設定】 = |
| 131 | 126 | |
| 132 | 127 | ==== Permissive Flag ==== |
| … |
… |
|
| 144 | 139 | ==== User-space Quirks ==== |
| 145 | 140 | {{{ |
| 146 | | $ sudo vim /etc/xen/xend-pci-quirks.sxp [[BR]] |
| | 141 | $ sudo vim /etc/xen/xend-pci-quirks.sxp |
| 147 | 142 | }}} |
| 148 | 143 | {{{ |
| … |
… |
|
| 157 | 152 | }}} |
| 158 | 153 | ---- |
| 159 | | = 【Step 7: 啟動並登入你的虛擬機器 DomU 】 = |
| | 154 | = 【Step 6: 啟動並登入你的虛擬機器 DomU 】 = |
| 160 | 155 | * 說明: 用 root 免密碼先登入,然後建立自己的帳號. 改用自己的帳號登入(亦可用 root 登入 , 不新建帳號 ) |
| 161 | 156 | * @ Dom0 |
| 162 | 157 | {{{ |
| 163 | | $ sudo xm create -c nvidia.cfg |
| | 158 | $ sudo xm create -c node1.cfg |
| 164 | 159 | }}} |
| 165 | 160 | |
| … |
… |
|
| 174 | 169 | }}} |
| 175 | 170 | ---- |
| 176 | | = 【Step 8: 設定你的 DomU 基本環境】 = |
| 177 | | * 設定 locales (系統語系) |
| | 171 | = 【Step 7: 設定你的 DomU 基本環境】 = |
| | 172 | * 設定 locales (系統語系),避免亂碼現象發生. |
| 178 | 173 | {{{ |
| 179 | 174 | $ sudo vim /etc/profile |
| … |
… |
|
| 190 | 185 | $ sudo dpkg-reconfigure locales |
| 191 | 186 | }}} |
| 192 | | * 更新 PCI ID Database |
| | 187 | * 更新 PCI ID Database.(當您發現系統無法偵測到你的顯示卡時) |
| 193 | 188 | {{{ |
| 194 | 189 | $ sudo apt-get update |