close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": libnettle.so.4: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
May 14, 2009, 11:28:37 AM (17 years ago)
- Author:
-
rock
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v1
|
v2
|
|
| 6 | 6 | ---- |
| 7 | 7 | = 注意事項 = |
| 8 | | * 已 source 'eucaer' 檔案 |
| | 8 | * 為了讓 VM Image可執行,需上傳和註冊 root disk image, Kernel or Ramdisk 到 Walrus |
| | 9 | * 已 source 'eucarc' 檔案 |
| 9 | 10 | * user 可以註冊 Image,但只有管理者可以註冊 kernel/ramdisks |
| 10 | 11 | * 已安裝EC2 tools: ec2-api-tools-1.3-30349 和 ec2-ami-tools-1.3-26357 |
| | 12 | * 設定好路徑 JAVA_HOME,EC2_HOME,EC2_AMITOOL_HOME,PATH |
| 11 | 13 | * [http://open.eucalyptus.com/wiki/EucalyptusUserImageCreatorGuide_v1.5 可下載 Euc 提供的 Image] |
| 12 | 14 | ---- |
| 13 | 15 | = 4.1.1 新增 Image = |
| | 16 | * 增加 root FS,Kernel 和 Ramdisks |
| 14 | 17 | {{{ |
| 15 | | ### Euc 提供的 test image ### |
| 16 | | $ cd $EUCALYPTUS_SRC/eucalyptus-src-deps |
| | 18 | ### 1. 使用 Euc 提供的 test image ### |
| 17 | 19 | $ tar zxvf euca-ttylinux.tgz |
| 18 | 20 | |
| 19 | | ### 新增 Kernel 到 Walrus 並再 Euc 註冊此 Kernel ### |
| | 21 | ### 2. 新增 Kernel 到 Walrus 並再 Euc 註冊 ### |
| 20 | 22 | $ ec2-bundle-image -i ttylinux/vmlinuz-2.6.16.33-xen --kernel true |
| 21 | 23 | $ ec2-upload-bundle -b kernel-bucket -m /tmp/vmlinuz-2.6.16.33-xen.manifest.xml |
| 22 | 24 | $ ec2-register kernel-bucket/vmlinuz-2.6.16.33-xen.manifest.xml |
| 23 | 25 | |
| 24 | | ### 增加 root FS Image 給 Walrus ### |
| | 26 | ### 3. 增加 root FS Image 給 Walrus ### |
| 25 | 27 | $ ec2-bundle-image -i ttylinux/ttylinux.img |
| 26 | 28 | $ ec2-upload-bundle -b image-bucket -m /tmp/ttylinux.img.manifest.xml |
| 27 | 29 | $ ec2-register image-bucket/ttylinux.img.manifest.xml |
| 28 | 30 | |
| 29 | | ### 測試的 Image 可以不用 ramdisks,但若需要可以用以下指令新增 ### |
| | 31 | ### 4. 測試的 Image 可以不用 ramdisks,但若需要可以用以下指令新增 ### |
| 30 | 32 | $ ec2-bundle-image -i <path/to/my/>initrd.img --ramdisk true |
| 31 | 33 | $ ec2-upload-bundle -b <bucket_name> -m <path/to/my/>initrd.img.manifest.xml |
| 32 | 34 | $ ec2-register <bucket_name>/initrd.img.manifest.xml |
| 33 | 35 | }}} |
| | 36 | |
| 34 | 37 | * 分配 Kernel 和 Ramdisks 給 VMs (有三種方法) |
| 35 | | i. 在 'ec2-bundle-image' 步驟指定 |
| | 38 | * 在 'ec2-bundle-image' 步驟指定 |
| 36 | 39 | {{{ |
| 37 | 40 | $ ec2-bundle-image -i <path/to/my/>vmimage.img --kernel <eki-XXXXXXXX> --ramdisk <eri-XXXXXXXX> |
| 38 | 41 | }}} |
| 39 | | ii. 再執行時指定 'ec2-run-instances' |
| | 42 | * 再 'ec2-run-instances' 步驟指定 |
| 40 | 43 | {{{ |
| 41 | | ec2-run-instances <emi-XXXXXXXX> --kernel <eki-XXXXXXXX> --ramdisk <eri-XXXXXXXX> |
| | 44 | $ ec2-run-instances <emi-XXXXXXXX> --kernel <eki-XXXXXXXX> --ramdisk <eri-XXXXXXXX> |
| 42 | 45 | }}} |
| 43 | | iii. 在 https://your.cloud.server:8443 選擇 'Configuration' 標籤,新增 <eki-xxxxxxxx> 和 <eri-xxxxxxxx> 作為預設的 kernel 和 ramdisk |
| | 46 | * 在 https://your.cloud.server:8443 選擇 'Configuration' 標籤,新增 <eki-xxxxxxxx> 和 <eri-xxxxxxxx> 作為預設的 kernel 和 ramdisk |
| 44 | 47 | ---- |
| 45 | 48 | = 4.1.2 刪除 Image = |
| 46 | 49 | {{{ |
| 47 | | ### 先取消註冊 ### |
| 48 | | ec2-deregister <emi-XXXXXXXX> |
| | 50 | ### 1. 先取消註冊 ### |
| | 51 | $ ec2-deregister <emi-XXXXXXXX> |
| 49 | 52 | |
| 50 | | ### 移除存於 bucke 的檔案 ### |
| 51 | | ec2-delete-bundle -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY --url $S3_URL -b <bucket> -p <file prefix> |
| | 53 | ### 2. 移除存於 bucke 的檔案 ### |
| | 54 | $ ec2-delete-bundle -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY --url $S3_URL -b <bucket> -p <file prefix> |
| 52 | 55 | |
| 53 | | ### 移除檔案和 bucke (--clear)### |
| | 56 | ### 3. 移除 image 和 bucke (--clear) ### |
| 54 | 57 | ec2-delete-bundle -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY --url $S3_URL -b <bucket> -p <file prefix> --clear |
| 55 | 58 | }}} |
| | 59 | |
| | 60 | [[BR]] |