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 [EMAIL PROTECTED] "( 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 [EMAIL PROTECTED] '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/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel