特殊:Badtitle/NS100:UEC/BundlingImages
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/UEC/BundlingImages }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/af | • {{#if: UbuntuHelp:UEC/BundlingImages|Afrikaans| [[::UEC/BundlingImages/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/ar | • {{#if: UbuntuHelp:UEC/BundlingImages|العربية| [[::UEC/BundlingImages/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/az | • {{#if: UbuntuHelp:UEC/BundlingImages|azərbaycanca| [[::UEC/BundlingImages/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/bcc | • {{#if: UbuntuHelp:UEC/BundlingImages|جهلسری بلوچی| [[::UEC/BundlingImages/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/bg | • {{#if: UbuntuHelp:UEC/BundlingImages|български| [[::UEC/BundlingImages/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/br | • {{#if: UbuntuHelp:UEC/BundlingImages|brezhoneg| [[::UEC/BundlingImages/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/ca | • {{#if: UbuntuHelp:UEC/BundlingImages|català| [[::UEC/BundlingImages/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/cs | • {{#if: UbuntuHelp:UEC/BundlingImages|čeština| [[::UEC/BundlingImages/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/de | • {{#if: UbuntuHelp:UEC/BundlingImages|Deutsch| [[::UEC/BundlingImages/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/el | • {{#if: UbuntuHelp:UEC/BundlingImages|Ελληνικά| [[::UEC/BundlingImages/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/es | • {{#if: UbuntuHelp:UEC/BundlingImages|español| [[::UEC/BundlingImages/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/fa | • {{#if: UbuntuHelp:UEC/BundlingImages|فارسی| [[::UEC/BundlingImages/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/fi | • {{#if: UbuntuHelp:UEC/BundlingImages|suomi| [[::UEC/BundlingImages/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/fr | • {{#if: UbuntuHelp:UEC/BundlingImages|français| [[::UEC/BundlingImages/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/gu | • {{#if: UbuntuHelp:UEC/BundlingImages|ગુજરાતી| [[::UEC/BundlingImages/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/he | • {{#if: UbuntuHelp:UEC/BundlingImages|עברית| [[::UEC/BundlingImages/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/hu | • {{#if: UbuntuHelp:UEC/BundlingImages|magyar| [[::UEC/BundlingImages/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/id | • {{#if: UbuntuHelp:UEC/BundlingImages|Bahasa Indonesia| [[::UEC/BundlingImages/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/it | • {{#if: UbuntuHelp:UEC/BundlingImages|italiano| [[::UEC/BundlingImages/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/ja | • {{#if: UbuntuHelp:UEC/BundlingImages|日本語| [[::UEC/BundlingImages/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/ko | • {{#if: UbuntuHelp:UEC/BundlingImages|한국어| [[::UEC/BundlingImages/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/ksh | • {{#if: UbuntuHelp:UEC/BundlingImages|Ripoarisch| [[::UEC/BundlingImages/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/mr | • {{#if: UbuntuHelp:UEC/BundlingImages|मराठी| [[::UEC/BundlingImages/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/ms | • {{#if: UbuntuHelp:UEC/BundlingImages|Bahasa Melayu| [[::UEC/BundlingImages/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/nl | • {{#if: UbuntuHelp:UEC/BundlingImages|Nederlands| [[::UEC/BundlingImages/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/no | • {{#if: UbuntuHelp:UEC/BundlingImages|norsk| [[::UEC/BundlingImages/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/oc | • {{#if: UbuntuHelp:UEC/BundlingImages|occitan| [[::UEC/BundlingImages/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/pl | • {{#if: UbuntuHelp:UEC/BundlingImages|polski| [[::UEC/BundlingImages/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/pt | • {{#if: UbuntuHelp:UEC/BundlingImages|português| [[::UEC/BundlingImages/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/ro | • {{#if: UbuntuHelp:UEC/BundlingImages|română| [[::UEC/BundlingImages/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/ru | • {{#if: UbuntuHelp:UEC/BundlingImages|русский| [[::UEC/BundlingImages/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/si | • {{#if: UbuntuHelp:UEC/BundlingImages|සිංහල| [[::UEC/BundlingImages/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/sq | • {{#if: UbuntuHelp:UEC/BundlingImages|shqip| [[::UEC/BundlingImages/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/sr | • {{#if: UbuntuHelp:UEC/BundlingImages|српски / srpski| [[::UEC/BundlingImages/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/sv | • {{#if: UbuntuHelp:UEC/BundlingImages|svenska| [[::UEC/BundlingImages/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/th | • {{#if: UbuntuHelp:UEC/BundlingImages|ไทย| [[::UEC/BundlingImages/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/tr | • {{#if: UbuntuHelp:UEC/BundlingImages|Türkçe| [[::UEC/BundlingImages/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/vi | • {{#if: UbuntuHelp:UEC/BundlingImages|Tiếng Việt| [[::UEC/BundlingImages/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/yue | • {{#if: UbuntuHelp:UEC/BundlingImages|粵語| [[::UEC/BundlingImages/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/zh | • {{#if: UbuntuHelp:UEC/BundlingImages|中文| [[::UEC/BundlingImages/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/zh-hans | • {{#if: UbuntuHelp:UEC/BundlingImages|中文(简体)| [[::UEC/BundlingImages/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:UEC/BundlingImages | UbuntuHelp:UEC/BundlingImages | {{#if: | :}}UEC/BundlingImages}}/zh-hant | • {{#if: UbuntuHelp:UEC/BundlingImages|中文(繁體)| [[::UEC/BundlingImages/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:UEC/BundlingImages|:UEC/BundlingImages|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :UEC/BundlingImages/zh | | {{#ifexist: UEC/BundlingImages/zh | | {{#ifeq: {{#titleparts:UEC/BundlingImages|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:UEC/BundlingImages|1|-1|}} | zh | | }}
Using UEC consists of creating and registering images with the Cloud Controller. There is more than one way to obtain a virtual image:
- Download an image from the network, bundle and upload it
- Create a custom image using VMBuilder
- Use the Image store to download and install and image
Here we will describe the process of downloading one of the Official Ubuntu UEC Images that we publish and maintain on a regular basis.
Note: the shell variables that are set in the below code snippets are very useful for scripts or to reuse them when typing commands. |
- Download the UEC image for the architecture you want. You can do it from your browser or from the command line:
TIMESTAMP=$(date +%Y%m%d%H%M%S) RELEASE=karmic ARCH=amd64 # Or this might be i386 [ $ARCH = "amd64" ] && IARCH=x86_64 || IARCH=i386 UEC_IMG=$RELEASE-uec-$ARCH URL=http://uec-images.ubuntu.com/$RELEASE/current/ [ ! -e $UEC_IMG.tar.gz ] && wget $URL/$UEC_IMG.tar.gz # This may take a bit, depending on your connectivity
- Next, you will need to bundle, upload and register a kernel, ramdisk and finally your image:
- Unpack the UEC image tarball
[ ! -e $UEC_IMG.img ] && tar -S -xzf $UEC_IMG.tar.gz
- Bundle the kernel
BUCKET_KERNEL="k-$TIMESTAMP" UEC_KERNEL=$UEC_IMG-vmlinuz-virtual euca-bundle-image -i $UEC_KERNEL -r $IARCH --kernel true euca-upload-bundle -b $BUCKET_KERNEL -m /tmp/$UEC_KERNEL.manifest.xml EKI=$(euca-register $BUCKET_KERNEL/$UEC_KERNEL.manifest.xml | grep "^IMAGE" | awk '{print $2}') && echo $EKI
- Bundle the initrd
BUCKET_INITRD="r-$TIMESTAMP" UEC_INITRD=$UEC_IMG-initrd-virtual euca-bundle-image -i $UEC_INITRD -r $IARCH --ramdisk true euca-upload-bundle -b $BUCKET_INITRD -m /tmp/$UEC_INITRD.manifest.xml ERI=$(euca-register $BUCKET_INITRD/$UEC_INITRD.manifest.xml | grep "^IMAGE" | awk '{print $2}') && echo $ERI
- Bundle the image itself (this can take some time)
BUCKET_IMAGE="i-$TIMESTAMP" UEC_IMG=$RELEASE-uec-$ARCH euca-bundle-image -i $UEC_IMG.img -r $IARCH --kernel $EKI --ramdisk $ERI # This will take a long time (~10m) euca-upload-bundle -b $BUCKET_IMAGE -m /tmp/$UEC_IMG.img.manifest.xml EMI=$(euca-register $BUCKET_IMAGE/$UEC_IMG.img.manifest.xml | grep "^IMAGE" | awk '{print $2}') && echo $EMI
Alternate: The uec-tools branch has a script named 'register-uec-tarball' that combines the steps above. # invoke as ./register-uec-tarball <tarball> <bucket> [<arch>] ./register-uec-tarball ubuntu-9.10-uec-amd64.tar.gz ubuntu-9.10-uec-release-amd64
- Now, your kernel, ramdisk and image will have been uploaded into Eucalyptus and should be ready to run. To confirm, run the following command:
euca-describe-images
You should see a registered kernel, ramdisk and image and they should be marked as 'available'.