[openstack-dev] [Openstack-operators] Migrating KVM VM to Openstack

Shyam Goud shyam.todeti at oneconvergence.com
Thu Feb 7 10:12:04 UTC 2013


Padriag, Thanks for the info

But i see this issue while converting as you suggested.

root at oscontroller-desktop:/home/os-controller# qemu-img convert -f qcow2 
-O qcow2 disk newdisk
/qemu-img: Could not open 'disk': No such file or directory//
//qemu-img: Could not open 'disk'/

root at oscontroller-desktop:/home/os-controller# ls -lrt disk
-rw-r--r-- 1 root root 10546577408 Feb  5 21:48 disk
root at oscontroller-desktop:/home/os-controller#

-Shyam.

On Thursday 07 February 2013 02:55 PM, Pádraig Brady wrote:
> On 02/07/2013 06:48 AM, Shyam Goud wrote:
>> Hello,
>>
>> I have a VM Instacne (ServerA) running on KVM hypervisor, I want to 
>> Launch the same VM in Openstack by adding its disk image to glance.
>>
>> Followed these steps:
>>
>> 1. Copied (ServerA) VM disk image to my openstack server. Image type 
>> shows as qcow2.
>>
>> /root at oscontroller-desktop:/home/os-controller# qemu-img info disk//
>> //image: disk//
>> //file format: //*qcow2*//
>> //virtual size: 10G (10737418240 bytes)//
>> //disk size: 9.8G//
>> //cluster_size: 2097152//
>> //backing file: 
>> /var/lib/nova/instances/_base/902ba3cda1883801594b6e1b452790cc53948fda//
>> /
>> 2. And added disk image to glance,
>>
>> /root at oscontroller-desktop:/home/os-controller# glance image-list
>> +--------------------------------------+-------------------------+-------------+------------------+-------------+--------+ 
>>
>> | ID                                   | Name | Disk Format | 
>> Container Format | Size        | Status |
>> +--------------------------------------+-------------------------+-------------+------------------+-------------+--------+ 
>>
>> | 1214e050-5445-49af-a35f-0f01071ae83f | ubuntu-precise-21012013 | 
>> qcow2       | bare             | 250019840   | active |
>> | 2f9dfb90-6a1f-4226-8cac-d85d4f6b2258 | jenkins-disk-img | 
>> qcow2       | bare             | 10546577408 | active |/
>>
>> 3. But While Launching the VM in Openstack, State goes to Error.
>>
>>  From nova-compute logs, i see the image is unacceptable Error. Do i 
>> need convert the KVM VM image to different type ? Plz let me know is 
>> there any other ways of doing it.
>>
>> ++++++++++++++++++++
>> /2013-02-06 21:29:50 TRACE nova.compute.manager [instance: 
>> 8ac2b752-cc56-4ee6-9247-5a19f5308c3c]     reason=_("fmt=%(fmt)s 
>> backed by: %(backing_file)s") % locals())
>> 2013-02-06 21:29:50 TRACE nova.compute.manager [instance: 
>> 8ac2b752-cc56-4ee6-9247-5a19f5308c3c] *ImageUnacceptable: Image 
>> 2f9dfb90-6a1f-4226-8cac-d85d4f6b2258 is unacceptable: fmt=qcow2 
>> backed by: 
>> /var/lib/nova/instances/_base/902ba3cda1883801594b6e1b452790cc53948fda*
>> 2013-02-06 21:29:50 TRACE nova.compute.manager [instance: 
>> 8ac2b752-cc56-4ee6-9247-5a19f5308c3c]
>> 2013-02-06 21:29:50 DEBUG nova.utils 
>> [req-9c89ddb8-d71a-4d6f-b195-5deea24c7c92 
>> 584093aecc7c433985029b31e4d480f9 5e2050ba95674ddfaa9e286d0e481830] 
>> Got semaphore "compute_resources" for method 
>> "abort_resource_claim"... from (pid=13756) inner 
>> /usr/lib/python2.7/dist-packages/nova/utils.py:713/
>> ++++++++++++++++++++
>
> The reason is that the image isn't complete and needs a backing file.
> We disallow these explicitly for security reasons (consider a backing
> file reference to the host disk).
>
> So to create a compatible image I suggest, before importing to glance,
> use qemu-img convert to merge the backing file like:
>
> qemu-img convert -f qcow2 -O qcow2 disk newdisk
>
> thanks,
> Pádraig.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130207/fcbf7df3/attachment.html>


More information about the OpenStack-dev mailing list