LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-04-2015, 06:35 AM   #1
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Rep: Reputation: 0
qemu-img convert error --> from vmdk to qcow2


Hello all

i download the puppet vm(ovf) and i want to run it in my current KVM:

So first i convert the vmdk:

qemu-img convert -f vmdk /dd/learn_puppet_centos-6.5-disk1.vmdk -O qcow2 /dd/learn_puppet_centos-6.5-disk1.qcow2


but fails: qemu-img: error while reading

i read somewhere that maybe is an error of the qemu-img.
Mine is from package kvm-qemu-img.

So i remove the kvm-qemu-img package and install qemu-img one, but the same error remains.

so, how can i convert the image?

regards
 
Old 06-04-2015, 08:33 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
The latest version of qemu is 2.3.0. What version are you using?
 
Old 06-04-2015, 01:35 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
also centOS 6.5 is and HAS been unsupported for a year

6.5 is missing a YEARS worth of security fixes

please upgrade to a supported version ASAP
6.6
but 6.7 should be out soon when that happens 6.6 will go End of Life
 
Old 06-05-2015, 02:44 AM   #4
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
HI, i have a RHEL 5.5 and i download qemu-img from EPEL:

Version:
Installed Packages
Name : qemu-img
Arch : x86_64
Epoch : 2
Version : 0.10.5
Release : 1.el5.2
Size : 156 k
Repo : installed
Summary : QEMU command line tool for manipulating disk images
URL : http://www.qemu.org/


The VM is the one i download from puppet(is only for educational purposes) so no matter if is outdated.

Thanks both!
 
Old 06-05-2015, 12:33 PM   #5
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,493

Rep: Reputation: Disabled
Perhaps a corrupted download(?).
 
Old 06-05-2015, 07:36 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Qemu-img is a stand alone part of qemu. As far as I know it doesn't interact with any other program.

Error should have more to it. Like error reading some thing.

There was a very old version that may have had an issue.

You should not go across directories too. Use the command in the directory where the input file exists. Better still move qemu-img there. I'd suspect this is the trouble. As I recall it got me a few times.


Simple examples.

http://docs.openstack.org/image-guid...onverting.html

Last edited by jefro; 06-05-2015 at 07:37 PM.
 
Old 06-08-2015, 05:46 AM   #7
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
Ok jefro, i tried as you said but same error persists.
If i convert to raw(with the "error while reading" error), it only create the 10gb sparse image file, so...i think in other options:


* use another version new version of qemu-img(by the way, why EPEL provides me the 2.1.0 version instead the last one?)

* use virtualbox, that is no compatible with KVM at the same time, so i have to convert my other VM to Vbox format. This VM disk is not a file but a device (dev/sdb)


any help with the two options?

regards

---------- Post added 06-08-15 at 12:47 PM ----------

Quote:
Originally Posted by fatmac View Post
Perhaps a corrupted download(?).
i try to download again...good point.
 
Old 06-08-2015, 05:54 AM   #8
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by oso_togari View Post

i try to download again...good point.
md5 is correct.
 
Old 06-08-2015, 05:21 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Oh you, we didn't read that. You said you downloaded an OVF? That shouldn't be a vmdk should it?

http://edoceo.com/notabene/ova-to-vmdk-to-qcow2

http://wiki.hackzine.org/sysadmin/kvm-import-ova.html
 
Old 06-08-2015, 07:13 PM   #10
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
Hi jefro,

Puppet call it ovf(i think it must be an ova), and, when untar it is a vmdk and the xml desc. So i see no help in the links...or i lose something?

Thanks
 
Old 06-08-2015, 07:42 PM   #11
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
I posted links to web pages of help.

Yes, you need to untar the file to get at vmdk.


Converting OVA to QCOW2 for use with QEMU/KVM
By technese - Last updated: Sunday, September 7, 2014 - Save & Share - Leave a Comment

Extract the .ova file

$ tar -xvf file.ova

Convert the .vmdk to .qcow2

$ qemu-img convert -O qcow2 file.vmdk file.qcow2

Reference:

http://edoceo.com/notabene/ova-to-vmdk-to-qcow2
 
Old 06-09-2015, 03:19 AM   #12
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
Hello

Yes, this is what i did, and post in the first post.
The problem as you suggests is almost sure related with the qemu-img version. I saw several people complaining about this error and no solution, so maybe the best option is move to virtualbox.

regards
 
Old 06-09-2015, 07:36 PM   #13
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Pretty easy to get a different version of qemu-img.

Not sure I am totally sold on the problem being that version.


Get a different OVA and see if it works maybe. Guess you could even use windows version of qemu-img in wine to double check.


Where did you see that Version 2.x of qemu has issues?
 
Old 06-10-2015, 04:29 AM   #14
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
well

maybe i tried with the wrong ones: the one in kvm-qemu-img that i have at begining, the one installed from EPEL(2.1.0) and the 0.14 i download from rpmfind.com for RHEL5.

Now i know that i could download QEMU from the web page and install ONLY the qemu-img binary...but too late....I moving to centos7 and i will try VBox.

wish me luck

regards
 
Old 06-10-2015, 05:06 PM   #15
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
OK, thanks for the update. Sorry we didn't find a solution.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Size of vm created by qemu-img convert Nick_C Linux - Virtualization and Cloud 14 03-30-2012 05:29 AM
kvm-qemu-img: qcow2 disk image format changes to raw format in RHEL-KVM 5.6 rajivdp Linux - Virtualization and Cloud 2 09-19-2011 11:23 AM
[SOLVED] lousy qemu-img performance converting to qcow2 ... if you use a hard drive Skaperen Linux - Virtualization and Cloud 8 06-01-2011 03:42 AM
After qemu-img, qemu is not capable to detect the C drive (empty) frenchn00b Linux - General 3 10-18-2009 05:39 AM
W2K3 .vmdk image migration to XEN .img on RHEL 5 jessemirza Red Hat 3 08-27-2009 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration