Ask Your Question

Why can't I create instance in CentOS host from image created in ubuntu? [closed]

asked 2014-10-07 09:00:10 -0500

mickt gravatar image

updated 2014-10-07 12:27:17 -0500

mpetason gravatar image

It seems that I cannot use images that I created on my Ubuntu set-up in my CentOS set-up. I can create the image in OpenStack but it fails to create an instance. Anyone know what the best option is, e.g. can I convert it?

Error: image uses a qcow2 feature which is not supported by this qemu version

I see the following error in scheduler.log:

2014-10-07 14:11:16.351 5627 ERROR nova.scheduler.filter_scheduler [req-fce92b3f-7c51-402d-a471-4346d09c193a bf865458a5e44b869e7822ded2f3aaed 126d62bbd3984b0988b0d1a6f3d5cb98] [instance: 02441a7a-72b0-470a-bdae-e64a77eb312a] Error from last host: qa-openstack02 (node qa-openstack02): [u'Traceback (most recent call last):\n', u'  File "/usr/lib/python2.6/site-packages/nova/compute/", line 1329, in _build_instance\n    set_access_ip=set_access_ip)\n', u'  File "/usr/lib/python2.6/site-packages/nova/compute/", line 393, in decorated_function\n    return function(self, context, *args, **kwargs)\n', u'  File "/usr/lib/python2.6/site-packages/nova/compute/", line 1741, in _spawn\n    LOG.exception(_(\'Instance failed to spawn\'), instance=instance)\n', u'  File "/usr/lib/python2.6/site-packages/nova/openstack/common/", line 68, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', u'  File "/usr/lib/python2.6/site-packages/nova/compute/", line 1738, in _spawn\n    block_device_info)\n', u'  File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/", line 2279, in spawn\n    admin_pass=admin_password)\n', u'  File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/", line 2648, in _create_image\n    project_id=instance[\'project_id\'])\n', u'  File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/", line 192, in cache\n    *args, **kwargs)\n', u'  File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/", line 383, in create_image\n    prepare_template(target=base, max_size=size, *args, **kwargs)\n', u'  File "/usr/lib/python2.6/site-packages/nova/openstack/common/", line 249, in inner\n    return f(*args, **kwargs)\n', u'  File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/", line 182, in fetch_func_sync\n    fetch_func(target=target, *args, **kwargs)\n', u'  File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/", line 653, in fetch_image\n    max_size=max_size)\n', u'  File "/usr/lib/python2.6/site-packages/nova/virt/", line 81, in fetch_to_raw\n    data = qemu_img_info(path_tmp)\n', u'  File "/usr/lib/python2.6/site-packages/nova/virt/", line 54, in qemu_img_info\n    \'qemu-img\', \'info\', path)\n', u'  File "/usr/lib/python2.6/site-packages/nova/", line 165, in execute\n    return processutils.execute(*cmd, **kwargs)\n', u'  File "/usr/lib/python2.6/site-packages/nova/openstack/common/", line 193, in execute\n    cmd=\' \'.join(cmd))\n', u'ProcessExecutionError: Unexpected error while running command.\nCommand: env LC_ALL=C LANG=C qemu-img info /var/lib/nova/instances/_base/0866c58df4a6f20f22ab764b7acb1c394b3e202b.part\nExit code: 1\nStdout: \'\'\nStderr: "\'image\' uses a qcow2 feature which is not supported by this qemu version: QCOW version 3\\nCould not open \'/var/lib/nova/instances/_base/0866c58df4a6f20f22ab764b7acb1c394b3e202b.part\': Operation not supported\\n"\n']

I ... (more)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by mickt
close date 2014-10-13 05:01:56.434496

1 answer

Sort by ยป oldest newest most voted

answered 2014-10-07 12:30:31 -0500

mpetason gravatar image

How are you creating the volume - mick-testVm.qcow2? You should be using something like this:

qemu-img create -f qcow2 /tmp/centos-6.4.qcow2 10G

You specify the size when you create it. You aren't specifying the size in the install script. It may have to do with how you are creating the volume.

edit flag offensive delete link more


I require customised instances so I kickstart VMs using virt-install as shown above and then create images from them. I have created and used images in my Ubuntu set-up.

I may just have to create VMs on the CentOS host and create images from them but it seems like unnecessary extra effort.

mickt gravatar imagemickt ( 2014-10-08 03:41:27 -0500 )edit

I created new VMs on my CentOS server and created images from them. works fine.

mickt gravatar imagemickt ( 2014-10-13 05:01:24 -0500 )edit

You should be able to use whichever linux host you want. You can create any image on an Ubuntu system or a CentOS system. Did you run the commands in a different ordering? Maybe the virt-manager or virsh versions were newer on Ubuntu and were trying to use v3 options.

mpetason gravatar imagempetason ( 2014-10-13 09:41:25 -0500 )edit

Command was the same on both. I suspect version but can't confirm as I no longer have the Ubuntu server. It seems like the obvious reason. Shame though.

mickt gravatar imagemickt ( 2014-10-13 09:45:19 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-10-07 09:00:10 -0500

Seen: 1,091 times

Last updated: Oct 07 '14