LinuxQuestions.org
Visit Jeremy's Blog.
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 07-21-2008, 07:31 PM   #1
JamesHall
Member
 
Registered: Feb 2006
Location: Oxford, UK
Distribution: openSUSE 13.1
Posts: 76

Rep: Reputation: 15
Trying to convert VMWare image to raw using Qemu: error - "image open"


Hi all,

I'm trying to convert a VMWare virtual machine image (WinXP Home) to VirtualBox format. I found this article which explains how to do it:

http://blog.linuxconfig.org/convert-...virtualboxvdi/

... but I've hit a problem.

When I try and run the command "qemu-img convert -f vmdk Windows\ XP\ Home\ Edition.vmdk -O raw WinXPHome.bin", I get the following error message:

(VMDK) image open: flags=0x2 filename=Windows XP Home Edition.vmdk
qemu-img: Could not open 'Windows XP Home Edition.vmdk'

Does anyone know what this means, and what I can do about it?

The other thing is that when I set up the original virtual machine in VMWare, I used the option to create the hard disk as a number of smaller files, which are on my machine as Windows XP Home Edition-f001.vmdk through Windows XP Home Edition-f001.vmdk through Windows XP Home Edition-f005.vmdk inclusive. Assuming I can get the qemu-img convert command to work, the obvious thing to do would seem to be to convert all of these .vmdk images to .vdi format, but will this actually work?

Any advice or assistance would be greatly appreciated.
 
Old 07-22-2008, 05:59 AM   #2
Hamidaddin
LQ Newbie
 
Registered: Jul 2008
Posts: 2

Rep: Reputation: 0
I don't know how to resolve the first issue I tried using "double quotes" around the file name and it worked for me. I am sure you are running the command in the right directory so that shouldn't be the problem...

For the second problem, you can use cat to combine the raw files into one file.

Check this link out. It explains how to do this in two simple commands:
(blog dot xwings dot net post number 47. I can't put the URL since it is my first post )

Anyway these are the commands:
Code:
    $ cd /path/to/vmware/guestos
    $ for i in `ls *[0-9].vmdk`; do qemu-img convert -f vmdk $i -O raw¬  {i/vmdk/raw} ; done
    $ cat *.raw >> guestos.img
If you go to the link you will have more alternatives to the second command since it did not work for some people.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Creaqting kickstart DVD - "Image checksum error, sorry" jnojr Red Hat 0 05-05-2008 12:50 PM
mkisofs breaks on multisession; "Read error on old image" Slackware 11.0 slackware-elf Slackware 1 06-07-2007 02:28 PM
Use Qemu to boot VMWare 'image' ? lefty.crupps Linux - Software 2 05-24-2007 04:02 PM
Is a "raw cd image" the same as an iso? hendoc Linux - Newbie 2 01-28-2007 11:14 AM
How to boot "raw iso cd image?" jerrybasham Linux - General 9 08-24-2006 05:20 PM


All times are GMT -5. The time now is 10:58 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration