Unhandled exception during 'nova image-create' caused by wrong destination format in qemu-img create
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Vish Ishaya | ||
Diablo |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Environment:
- Ubuntu Server 11.04
- OpenStack Diablo release (2011.3)
Steps to reproduce:
- create an image with qcow2 disk
- upload an image:
glance-upload --disk-format=aki --container-
glance-upload --disk-format=ari --container-
glance-upload --disk-format=ami --container-
- start instance of the uploaded image
- try to create a snaphot with 'nova image-create' command
Problem:
Error occured during nova-image create command, here is a fragment of nova-api.log:
2011-10-13 10:41:07,611 AUDIT nova.compute.
2011-10-13 10:41:25,504 DEBUG nova.utils [-] Running cmd (subprocess): qemu-img convert -f qcow2 -O ami -s c8b77874aacb400
2011-10-13 10:41:25,559 DEBUG nova.utils [-] Result was 1 from (pid=29030) execute /usr/lib/
2011-10-13 10:41:25,560 ERROR nova.exception [-] Uncaught exception
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: return f(*args, **kw)
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: utils.execute(
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: cmd=' '.join(cmd))
(nova.exception): TRACE: ProcessExecutio
(nova.exception): TRACE: Command: qemu-img convert -f qcow2 -O ami -s c8b77874aacb400
(nova.exception): TRACE: Exit code: 1
(nova.exception): TRACE: Stdout: ''
(nova.exception): TRACE: Stderr: "qemu-img: Unknown file format 'ami'\n"
(nova.exception): TRACE:
2011-10-13 10:41:25,566 ERROR nova.rpc [-] Exception during message handling
(nova.rpc): TRACE: Traceback (most recent call last):
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: rval = node_func(
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: return f(*args, **kw)
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: self.driver.
(nova.rpc): TRACE: File "/usr/lib/
(nova.rpc): TRACE: raise Error(str(e))
(nova.rpc): TRACE: Error: Unexpected error while running command.
(nova.rpc): TRACE: Command: qemu-img convert -f qcow2 -O ami -s c8b77874aacb400
(nova.rpc): TRACE: Exit code: 1
(nova.rpc): TRACE: Stdout: ''
(nova.rpc): TRACE: Stderr: "qemu-img: Unknown file format 'ami'\n"
(nova.rpc): TRACE:
2011-10-13 10:41:53,455 INFO nova.compute.
Original image description (glance show):
Public: Yes
Name: ttylinux-
Status: active
Size: 15663104
Disk format: ami
Container format: ami
Minimum Ram Required (MB): 0
Minimum Disk Required (GB): 0
Property 'kernel_id': 22
Property 'ramdisk_id': 23
Property 'type': machine
Workaroung:
Edit /usr/lib/
Change destination format in ''qemu_img_cmd' in function 'def snapshot'. I've made the following:
# Export the snapshot to a raw image
temp_dir = tempfile.mkdtemp()
out_path = os.path.
Changed in nova: | |
assignee: | nobody → Vish Ishaya (vishvananda) |
importance: | Undecided → Medium |
Changed in nova: | |
milestone: | none → essex-1 |
tags: | removed: diablo-backport |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | essex-1 → 2012.1 |
Proposed a fix for this. Really, glance should not force disk format of 'ami' images to be 'ami'. I think container format is enough, then you could have a qcow2 ami for example.