我正在尝试使用ec2-bundle-vol创建ami来运行从http://thecloudmarket.com/image/ami-f485a6a6--racemi-centos-6-i386-hvm-20141112085400克隆的实例
时遇到问题从控制台ssh连接到我的实例
>export EC2_PRIVATE_KEY=~/.ec2/pk-aws.pem
>export EC2_CERT=~/.ec2/cert-aws.pem
>export JAVA_HOME=/opt/jdk1.7.0_72
>export JRE_HOME=/opt/jdk1.7.0_72/jre
>export PATH=$PATH:/opt/jdk1.7.0_72/bin:/opt/jdk1.7.0_72/jre/bin
>export EC2_AMITOOL_HOME=/usr/local/ec2/apitools
>export EC2_HOME=/usr/local/ec2/apitools
>export PATH=$EC2_AMITOOL_HOME/bin:$PATH
>source ~/.bashrc
>ec2-bundle-vol -k $EC2_PRIVATE_KEY -c $EC2_CERT -u 440170694567 -r i386
output:
Setting partition type to bundle "/" with...
/usr/lib/ruby/site_ruby/ec2/platform/linux/image.rb:253:in `set_partition_type': Non-standard volume device "/dev/xvda2" (FatalErr
or)
from /usr/lib/ruby/site_ruby/ec2/platform/linux/image.rb:71:in `initialize'
from /usr/lib/ruby/site_ruby/ec2/amitools/bundlevol.rb:172:in `new'
from /usr/lib/ruby/site_ruby/ec2/amitools/bundlevol.rb:172:in `bundle_vol'
from /usr/lib/ruby/site_ruby/ec2/amitools/bundlevol.rb:231:in `main'
from /usr/lib/ruby/site_ruby/ec2/amitools/tool_base.rb:201:in `run'
from /usr/lib/ruby/site_ruby/ec2/amitools/bundlevol.rb:239
更多关于volumne与df和lsblk的信息
>lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 2G 0 disk
|-xvda1 202:1 0 102M 0 part /boot
`-xvda2 202:2 0 1.9G 0 part /
>df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda2 1.9G 1.9G 0 100% /
none 503M 0 503M 0% /dev/shm
/dev/xvda1 99M 27M 68M 29% /boot
任何想法可能出错?
感谢。
答案 0 :(得分:0)
我有类似的问题。问题是我用来放置捆绑图像的文件系统是ext3,而不是ext4。运行:
df -T
并确保类型为ext4:
/ dev / xvdo ext4 51475068 7379772 41473856 16%/ amiimage
我必须创建一个类型为ext4的卷才能使命令生效。