[[EucalyptusImageManagement_v1.6]]

Managing Eucalyptus Images (1.6)
*Managing Eucalyptus Images (1.6) [#q1d66db4]
*Eucalyptusのイメージ管理 [#h161eb7e]
First, be sure to source your 'eucarc' file before running the commands below. Note that all users may upload and register images (depending on access granted to them by the Eucalyptus administrator), but only the admin user may ever upload/register kernels or ramdisks.~
まず初めに、それぞれコマンドを実行する前に、'eucarc' ファイル(訳注:Web管理画面の'Download Credentials'ボタンを押してダウンロードできる、zipファイルを展開するとあります)をシェルに取り込んでください。

First, be sure to source your 'eucarc' file before running the commands below. Note that all users may upload and register images (depending on access granted to them by the Eucalyptus administrator), but only the admin user may ever upload/register kernels or ramdisks.
(訳注:'eucarc'ファイルを取り込むには以下のようにコマンドを実行します)
 mkdir $HOME/.euca
 unzip euca2-admin-x509.zip -d $HOME/.euca
 . $HOME/.euca/eucarc

Second, the instructions below rely on the euca2ools command-line tools distributed by the Eucalyptus Team. Please, install them if you haven't done so already.
'eucarc'ファイルを取り込むと、各種環境変数がセットされます。全てのユーザがイメージのアップロードや登録をすることができますが(Eucalyptus 管理者が、アクセスすることを承認する必要があります)、kernelイメージ(EKI) や ramdiskイメージ(ERI) をアップロード・登録できるのはEucalyptus管理者だけです。

1. Adding Images
To enable a VM image as an executable entity, a user/admin must add a root disk image, a kernel/ramdisk pair (ramdisk may be optional) to Walrus and register the uploaded data with Eucalyptus. Each is added to Walrus and registered with Eucalyptus separately, using three EC2 commands. The following example uses the test image that we provide. Unpack it to any directory:
Second, the instructions below rely on the euca2ools command-line tools distributed by the Eucalyptus Team. Please, install them if you haven't done so already.~
次にEucalyptus チームが配布している [[euca2ools>Euca2oolsGuide]] というコマンドライン・ツールを用います。インストールがまだであれば、インストールしてから以下の記述に進んでください。

Add the kernel to Walrus, and register it with Eucalyptus (WARNING: your bucket names must not end with a slash!):
**1. Adding Images [#s7161aad]
**1. イメージの追加 [#t1ed3bda]
To enable a VM image as an executable entity, a user/admin must add a root disk image, a kernel/ramdisk pair (ramdisk may be optional) to Walrus and register the uploaded data with Eucalyptus. Each is added to Walrus and registered with Eucalyptus separately, using three EC2 commands. The following example uses the test image that we provide. Unpack it to any directory:~
仮想マシンイメージをEucalyptus環境で実行可能なものとするには、ユーザもしくは管理者が以下の作業を行う必要があります。
-root ディスク・イメージと、kernel 及び ramdisk のセット(ramdisk は任意)を Walrus に追加し
-アップロードした各イメージをEucalyptus に登録

euca-bundle-image -i <kernel file> --kernel true
euca-upload-bundle -b <kernel bucket> -m /tmp/<kernel file>.manifest.xml
euca-register <kernel-bucket>/<kernel file>.manifest.xml
それぞれのイメージ(rootdiskイメージ、kernelイメージ、ramdiskイメージ)について、上記の作業を行う必要があります。作業には3つのEC2コマンドを使用します。以下の例では、私たちが提供しているテストイメージを使用します。どこか適当なディレクトリにファイルを展開してください。(訳注:テストイメージは [[Image Creator's Guideページ(英語)>http://open.eucalyptus.com/wiki/EucalyptusUserImageCreatorGuide_v1.6]] からダウンロードすることができます)

Next, add the root filesystem image to Walrus:
Add the kernel to Walrus, and register it with Eucalyptus (WARNING: your bucket names must not end with a slash!):~
kernelイメージ を Walrus に追加し、Eucalyptus へ登録します(警告:バケット名の末尾がスラッシュではいけません)。

euca-bundle-image -i <vm image file> 
euca-upload-bundle -b <image bucket> -m /tmp/<vm image file>.manifest.xml
euca-register <image bucket>/<vm image file>.manifest.xml
Our test kernel does not require a ramdisk to boot. If the administrator would like to upload/register a kernel/ramdisk pair, the procedure is similar to the above:
 euca-bundle-image -i <kernel file> --kernel true
 euca-upload-bundle -b <kernel bucket> -m /tmp/<kernel file>.manifest.xml
 euca-register <kernel-bucket>/<kernel file>.manifest.xml

euca-bundle-image -i <initrd file> --ramdisk true
euca-upload-bundle -b <initrd bucket> -m /tmp/<initrd file>.manifest.xml
euca-register <initrd bucket>/<initrd file>.manifest.xml
2. Associating kernels and ramdisks with instances
There are three ways that one can associate a kernel (and ramdisk) with a VM instance.
Next, add the root filesystem image to Walrus:~
次に、root ファイルシステムのイメージを Walrus に追加します。

A user may associate a specific kernel/ramdisk identifier with an image at the 'euca-bundle-image' step
euca-bundle-image -i <vm image file> --kernel <eki-XXXXXXXX> --ramdisk <eri-XXXXXXXX>
A user may choose a specific kernel/ramdisk at instance run time as an option to 'euca-run-instances'
euca-run-instances --kernel <eki-XXXXXXXX> --ramdisk <eri-XXXXXXXX> <emi-XXXXXXXX>
 euca-bundle-image -i <vm image file> 
 euca-upload-bundle -b <image bucket> -m /tmp/<vm image file>.manifest.xml
 euca-register <image bucket>/<vm image file>.manifest.xml

The administrator can set 'default' registered kernel/ramdisk identifiers that will be used if a kernel/ramdisk is unspecified by either of the above options. This is accomplished by logging in to the administrative interface (https://your.cloud.server:8443), clicking on the 'Configuration' tab and adding an <eki-xxxxxxxx> and optionally an <eri-xxxxxxxx> as the defaults kernel/ramdisk to be used.
3. Deleting Images
In order to delete an image, you must first de-register the image:
Our test kernel does not require a ramdisk to boot. If the administrator would like to upload/register a kernel/ramdisk pair, the procedure is similar to the above:~
なお、ここで使用するテストカーネルは、起動時に ramdisk を必要としません。管理者が kernel と ramdisk のセットをアップロード・登録したい場合の手順は、上記と似たようなものです。以下はramdiskイメージをアップロードし、登録する手順です。

euca-deregister <emi-XXXXXXXX>
 euca-bundle-image -i <initrd file> --ramdisk true
 euca-upload-bundle -b <initrd bucket> -m /tmp/<initrd file>.manifest.xml
 euca-register <initrd bucket>/<initrd file>.manifest.xml

Then, you can remove the files stored in your bucket. Assuming you have sourced your 'eucarc' to set up EC2 client tools:
**2. Associating kernels and ramdisks with instances [#c9255e00]
**2. kernel と ramdisk をインスタンスに結びつける [#s2960c94]
There are three ways that one can associate a kernel (and ramdisk) with a VM instance.~
kernel (と ramdisk)を仮想マシン・インスタンスに結びつけるためには、3つの方法があります。

euca-delete-bundle -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY --url $S3_URL -b <bucket> -p <file prefix>
If you would like to remove the image and the bucket, add the '--clear' option:
-A user may associate a specific kernel/ramdisk identifier with an image at the 'euca-bundle-image' step~
ユーザは、'euca-bundle-image' コマンドで、特定の kernel と ramdisk を結びつけることができます。
 euca-bundle-image -i <vm image file> --kernel <eki-XXXXXXXX> --ramdisk <eri-XXXXXXXX>
-A user may choose a specific kernel/ramdisk at instance run time as an option to 'euca-run-instances'~
ユーザは、'euca-run-instances' コマンドのオプションとして、インスタンス実行時に、特定の kernel と ramidisk を選ぶことができます。
 euca-run-instances --kernel <eki-XXXXXXXX> --ramdisk <eri-XXXXXXXX> <emi-XXXXXXXX>
-The administrator can set 'default' registered kernel/ramdisk identifiers that will be used if a kernel/ramdisk is unspecified by either of the above options. This is accomplished by logging in to the administrative interface (https://your.cloud.server:8443), clicking on the 'Configuration' tab and adding an <eki-xxxxxxxx> and optionally an <eri-xxxxxxxx> as the defaults kernel/ramdisk to be used.~
管理者であれば、kernel や ramdisk が上記のオプション中で、どちらも明示されていない場合、デフォルトで使用される kernel や ramdisk を指定できます。設定を行うには、管理者インターフェース(https://your.cloud.server:8443)にアクセスし、'Configuration' タブをクリックして、デフォルトとして使用したい kernel や ramidisk を <eki-xxxxxxxx> や <eri-xxxxxxxx> (こちらはオプションです)指定することができます。

euca-delete-bundle -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY --url $S3_URL -b <bucket> -p <file prefix> --clear
**3. Deleting Images [#c9ade5be]
**3. イメージの削除 [#b776717b]
In order to delete an image, you must first de-register the image:~
イメージを削除したい場合、まずイメージの登録を取り消す必要があります。

Examples
Following is an example using the Ubuntu pre-packaged image (Count: 1395) that we provide using the included KVM compatible kernel/ramdisk (a Xen compatible kernel/ramdisk is also included). See this page to get more pre-packaged images.
 euca-deregister <emi-XXXXXXXX>

tar zxvf euca-ubuntu-9.04-x86_64.tar.gz
Then, you can remove the files stored in your bucket. Assuming you have sourced your 'eucarc' to set up EC2 client tools:~
その後、バケットに保存されているファイルを削除することができます。EC2 クライアントツールでセットアップするために 'eucarc' ファイルを読み込んでいる場合は、次のようにしてください。

euca-bundle-image -i euca-ubuntu-9.04-x86_64/kvm-kernel/vmlinuz-2.6.28-11-generic --kernel true
euca-upload-bundle -b ubuntu-kernel-bucket -m /tmp/vmlinuz-2.6.28-11-generic.manifest.xml
euca-register ubuntu-kernel-bucket/vmlinuz-2.6.28-11-generic.manifest.xml
(set the printed eki to $EKI)
 euca-delete-bundle -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY --url $S3_URL -b <bucket> -p <file prefix>

euca-bundle-image -i euca-ubuntu-9.04-x86_64/kvm-kernel/initrd.img-2.6.28-11-generic --ramdisk true
euca-upload-bundle -b ubuntu-ramdisk-bucket -m /tmp/initrd.img-2.6.28-11-generic.manifest.xml
euca-register ubuntu-ramdisk-bucket/initrd.img-2.6.28-11-generic.manifest.xml
(set the printed eri to $ERI)
If you would like to remove the image and the bucket, add the '--clear' option:~
イメージとバケットも削除したい場合は、オプションに '--clear' をつけてください。

euca-bundle-image -i euca-ubuntu-9.04-x86_64/ubuntu.9-04.x86-64.img --kernel $EKI --ramdisk $ERI
euca-upload-bundle -b ubuntu-image-bucket -m /tmp/ubuntu.9-04.x86-64.img.manifest.xml
euca-register ubuntu-image-bucket/ubuntu.9-04.x86-64.img.manifest.xml
 euca-delete-bundle -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY --url $S3_URL -b <bucket> -p <file prefix> --clear

Now, the newly uploaded image(s) should be ready to start using (see User's Guide for more information on using Eucalyptus).
**Examples [#t8fad35b]
**例 [#q9f89d17]
Following is an example using the Ubuntu pre-packaged image (Count: 1395) that we provide using the included KVM compatible kernel/ramdisk (a Xen compatible kernel/ramdisk is also included). See this page to get more pre-packaged images.~
以下の例は[[Ubuntuのパッケージ済みイメージ>http://open.eucalyptus.com/sites/all/modules/pubdlcnt/pubdlcnt.php?file=http://www.eucalyptussoftware.com/downloads/eucalyptus-images/euca-ubuntu-9.04-x86_64.tar.gz&nid=1177]]を使用した例です。このパッケージにはKVMに対応したカーネル、ramdisk、rootディスクイメージが含まれています(Xenに対応したものも同梱されています)。[[このページ>http://open.eucalyptus.com/wiki/EucalyptusUserImageCreatorGuide_v1.6]]から他のパッケージ済みイメージをダウンロードすることができます。

« ManagementUPEucalyptus Management (1.6) »
 tar zxvf euca-ubuntu-9.04-x86_64.tar.gz
 
 euca-bundle-image -i euca-ubuntu-9.04-x86_64/kvm-kernel/vmlinuz-2.6.28-11-generic --kernel true
 euca-upload-bundle -b ubuntu-kernel-bucket -m /tmp/vmlinuz-2.6.28-11-generic.manifest.xml
 euca-register ubuntu-kernel-bucket/vmlinuz-2.6.28-11-generic.manifest.xml
 (set the printed eki to $EKI)
 (表示される eki を環境変数 $EKI にセットします)
 
 euca-bundle-image -i euca-ubuntu-9.04-x86_64/kvm-kernel/initrd.img-2.6.28-11-generic --ramdisk true
 euca-upload-bundle -b ubuntu-ramdisk-bucket -m /tmp/initrd.img-2.6.28-11-generic.manifest.xml
 euca-register ubuntu-ramdisk-bucket/initrd.img-2.6.28-11-generic.manifest.xml
 (set the printed eri to $ERI)
 (表示される eri を環境変数 $ERI にセットしま)
 
 euca-bundle-image -i euca-ubuntu-9.04-x86_64/ubuntu.9-04.x86-64.img --kernel $EKI --ramdisk $ERI
 euca-upload-bundle -b ubuntu-image-bucket -m /tmp/ubuntu.9-04.x86-64.img.manifest.xml
 euca-register ubuntu-image-bucket/ubuntu.9-04.x86-64.img.manifest.xml
 

Printer-friendly version Login or register to post comm
Now, the newly uploaded image(s) should be ready to start using (see User's Guide for more information on using Eucalyptus).~
これで、新しくアップロードされたイメージを使うための準備が整いました(Eucalyptus での使い方については、[[ユーザーズ・ガイド>EucalyptusUserGuide]]を御覧ください)。

戻る:[[Eucalyptusのネットワーク設定 (1.6)>EucalyptusNetworking_v1.6]]

進む:[[Eucalyptus管理(1.6)>EucalyptusManagement_v1.6]]


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS