public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Emmanuel Noobadmin <centos.admin@gmail.com>
Cc: kvm <kvm@vger.kernel.org>
Subject: Re: Using qemu-img to directly convert physical disk to KVM image
Date: Tue, 09 Nov 2010 02:27:00 +0300	[thread overview]
Message-ID: <4CD88744.7030502@msgid.tls.msk.ru> (raw)
In-Reply-To: <AANLkTimxezG+eu70AJjNjRXC3AKNRZ9WAC5m5kV5x_D8@mail.gmail.com>

09.11.2010 01:48, Emmanuel Noobadmin wrote:
> I'm trying to convert a physical Windows XP machine into a KVM guest.
> All the guides so far mentions using dd to create a flat image file,
> then using qemu-img to convert that to qcow2. Since I've been making
> mistake here and there, retrying the process several times (initially
> converting each logical partition into an image), the question struck
> me: is there any reason why I cannot do something like this
> qemu-img convert -f /dev/sdc -O qcow2 /images/winxp.qcow instead of
> having to do it in two passes which literally take hours each.

This is exactly the way to do it - converting the physical disk directly
to a qcow (or whatever format) file using qemu-img.  I've no idea why
all the guide writers are so confused.

The only problem with your exact version is that you've extra -f
argument - it expects a parameter, the input image type, which is
raw, so either use -f raw, or remove -f.

/mjt

  reply	other threads:[~2010-11-08 23:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-08 22:48 Using qemu-img to directly convert physical disk to KVM image Emmanuel Noobadmin
2010-11-08 23:27 ` Michael Tokarev [this message]
2010-11-09  2:54   ` Emmanuel Noobadmin
2010-11-09  7:53     ` Michael Tokarev
2010-11-09 16:22       ` Emmanuel Noobadmin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CD88744.7030502@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=centos.admin@gmail.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox