From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Jerry Geis <geisj-HlEKYY4NwfurDvn5mFPilA@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: physical migration of older machines
Date: Wed, 21 Nov 2007 17:49:11 +0200 [thread overview]
Message-ID: <47445377.4050505@qumranet.com> (raw)
In-Reply-To: <474430AF.9080807-HlEKYY4NwfurDvn5mFPilA@public.gmane.org>
Jerry Geis wrote:
> I have the old disk and I created a 10GIG image and installed the 7.3, 9
> and centos 4.
> Now I want to make sure the new image matches the physical image.
> I mounted the image as:
>
> mount -t ext3 -o loop,offset=32256 Image.redhat7.3.img /mnt/image
>
> then I executed
>
> tar --exclude ./boot --exclude --exclude ./proc --exclude ./dev -cvf - . | ssh root-Q0ErXNX1RuZ17XPQcNv0jw@public.gmane.org "( cd /mnt/image ; tar xvpf -)"
>
> on the physical machine to copy to my host.
>
> This seemed to work but on booting the file system is corrupt. I did umount /mnt/image before booting the VM.
>
>
>
> I have not tried Ghost as the physical disk on these machines is minimum of 100GIG and I dont want VM images
> of this size. 10GIG is all I really need.
>
>
What's happening probably is that the boot loader configuration is no
longer valid.
If you have some temporary free space, the following untested hack may help:
- boot from a livecd on the image, and dd the entire disk to a file:
dd if=/dev/hda bs=1M | ssh -C root@... 'cat > disk.img'
- start kvm with this image
qemu-system-x86_64 -hda disk.img ...
- create a file full of zeros which occupies all free space (inside the VM)
dd bs=1M if=/dev/zero of=/zeros; sync
- shut down the VM
- create a sparse image (that does not include the zeros), using *one*
of the following:
cp --sparse=always disk.img disk-new.img
or
qemu-img convert disk.img -O qcow2 disk-new.img
In the first case, the file will still appear large, but will
actually occupy less space. In the second case, the file size will
reflect the amount of disk space it occupies.
- boot the new image, and delete the zeros file:
rm /zeros; sync
- remove the temporary 100GB image:
rm disk.img
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
prev parent reply other threads:[~2007-11-21 15:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-21 13:20 physical migration of older machines Jerry Geis
[not found] ` <474430AF.9080807-HlEKYY4NwfurDvn5mFPilA@public.gmane.org>
2007-11-21 15:11 ` Dong, Eddie
2007-11-21 15:49 ` Avi Kivity [this message]
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=47445377.4050505@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=geisj-HlEKYY4NwfurDvn5mFPilA@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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