Python boto无法从实例创建映像

Python boto无法从实例创建映像,python,amazon-ec2,boto,Python,Amazon Ec2,Boto,Python boto无法创建运行实例的快照(具有相同提供程序的Python novaclient和相同实例可以很好地完成此工作) 输出结果如下:奇怪的是消息“instanceId的值无效'i-00001e17'” 系统:Ubuntu 13.04,Python版本:2.7.4,boto版本:2.19.0 如果有任何想法,我将不胜感激。请确保EBS驱动器在控制台中的名称为/dev/vda。你在用OpenStack还是什么?它看起来不像EC2。错误消息说,实例在根(/dev/vd

Python boto无法创建运行实例的快照(具有相同提供程序的Python novaclient和相同实例可以很好地完成此工作)

输出结果如下:奇怪的是消息“instanceId的值无效'i-00001e17'”

系统:Ubuntu 13.04,Python版本:2.7.4,boto版本:2.19.0


如果有任何想法,我将不胜感激。

请确保EBS驱动器在控制台中的名称为/dev/vda。你在用OpenStack还是什么?它看起来不像EC2。

错误消息说,
实例在根(/dev/vda)上没有附加卷。
。这听起来好像不是EBS支持的实例。谢谢你的提示,我会调查的。然而,你知道为什么OpenStack原生客户端会做这项工作吗(我试过了,它会做的)?对不起,我不知道。是否可以在两者中打开调试日志并比较实际发出的请求?好主意,谢谢。是的,它是OpenStack,但它有EC2兼容的访问权限。OpenStack支持EC2 API,但它不是100%兼容的,请记住
>>> cc = EC2Connection(...)    # Normally working connection
>>>
>>> vm = cc.get_all_instances()[4].instances[0] # Get one of the running instances
send: 'POST /services/Cloud/ HTTP/1.1\r\nAccept-Encoding: ...'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/xml
header: Content-Length: 4753
header: Date: Thu, 16 Jan 2014 18:51:06 GMT
>>>
>>> vm.id  # Print the id
u'i-00001e17'
>>>
>>> cc.create_image(vm.id, "newSnapshot")  # THE PROBLEM: fails to create image
send: 'POST /services/Cloud/ HTTP/1.1\r\nAccept-Encoding:...'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Content-Type: text/xml
header: Content-Length: 303
header: Date: Thu, 16 Jan 2014 18:51:29 GMT
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/boto/ec2/connection.py", line 422, in create_image
    img = self.get_object('CreateImage', params, Image, verb='POST')
  File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 1139, in get_object
    raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0"?>
<Response><Errors><Error><Code>InvalidParameterValue</Code><Message>Invalid value &apos;i-00001e17&apos; for instanceId. Instance does not have a volume attached at root (/dev/vda)</Message></Error></Errors><RequestID>req-0fd661c5-8ab1-4520-9c95-31f22b8354f1</RequestID></Response>
>>>