是否有可能从OpenStack的图像创建AMI? [英] Is it possible to create an ami from an openstack image?
问题描述
我要创建从一个正在运行的实例在OpenStack的图片
I'm creating an image from a running instance in OpenStack
nova image-create <server-name>
和我只是想知道,可这个图片被上传到EC2?或者我需要从它创建AMI?
and i'm just wondering,can this image be uploaded to ec2? Or do i need to create an ami from it?
有人能指导我如何去吗?
Can someone guide me on how to go about this?
推荐答案
一目了然,OpenStack的影像服务能够存储数字图像类型的:
glance, the openstack image service is capable of storing a number of image types:
Raw
Machine (kernel/ramdisk outside of image, a.k.a. AMI)
VHD (Hyper-V)
VDI (VirtualBox)
qcow2 (Qemu/KVM)
VMDK (VMWare)
OVF (VMWare, others)
参考: http://www.openstack.org/projects/image-service/
所以基本上。您可以上传的AMI直接OpenStack的。
So basically. You can upload AMIs to openstack directly.
例如:
KERNEL_ID=`glance image-create --name="tty-linux-kernel" --disk-format=aki --container-format=aki < ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz | awk '/ id / { print $4 }'`
INITRD_ID=`glance image-create --name="tty-linux-ramdisk" --disk-format=ari --container-format=ari < ttylinux-uec-amd64-12.1_2.6.35-22_1-loader | awk '/ id / { print $4 }'`
glance image-create --name="tty-linux" --disk-format=ami --container-format=ami --property kernel_id=${KERNEL_ID} --property ramdisk_id=${INITRD_ID} < ttylinux-uec-amd64-12.1_2.6.35-22_1.img
当执行图像创建针对运行实例
When performing an image-create against a running instance
图片只能从运行中的实例,如果计算配置为使用qcow2>图像,这是默认设置创建的。您可以通过添加以下行nova.conf明确允许使用qcow2图像>的:
Images can only be created from running instances if Compute is configured to use qcow2 > images, which is the default setting. You can explicitly enable the use of qcow2 images > by adding the following line to nova.conf:
不过,假设您被配置为这样,是的,它会在AMI格式输出。
But assuming you are configured as such, yes it will output in AMI format.
编号:
<一个href="http://docs.openstack.org/trunk/openstack-compute/admin/content/creating-images-from-running-instances.html" rel="nofollow">http://docs.openstack.org/trunk/openstack-compute/admin/content/creating-images-from-running-instances.html
这篇关于是否有可能从OpenStack的图像创建AMI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!