如何将snapshot快照注册成AMI镜像

如果你有包含可启动的系统文件系统,并且做成了快照,可是使用ec2-register将其注册成AMI快照

#ec2-register -n “CentOS5.7x86_64with_AwsMonitor” -d “CentOS5.7x86_64with_AwsMonitor” -a x86_64 -K pk-xx.pem -C cert-xx.pem –root-device-name=/dev/sda1 -b /dev/sda=snap-e18570c8:25:ture –kernel  aki-41eec435 –region eu-west-1

 注:
a) ec2-register命令在Amazon AMI 中才有(/opt/aws/下),你也可以自己安装;
b) -n <name>, -d <description>, -a < architecture>(架构);
c) -K(大写K)指定pk-xx.pem,-C(大写C)指定cert-xx.pem;
d) –root-device-name=/dev/sda1  指定根设备名称,一般指定/sda1为所需的根分区;
e) -b /dev/sda=snap-e18570c8:25:ture 指定来源sanpshot编号,和分区大小;
f) –kernel  aki-41eec435  指定内核编号:更多详见附录;
g) –region eu-west-1 指定所在区域
更多AKI详见如下链接
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html#AmazonKernelImageIDs

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章