Re: migrating files for centos virtualization, virtual disk no longer boots.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 10/27/07, Jerry Geis <geisj@xxxxxxxxxxxxxxx> wrote:
> All,
>
> I am playing with virtualization on centos 5.
> I took my old redhat 7 disks and created a 10GIG virtual disk, I
> installed redhat 7.
> Now I am trying to get the EXACT image copied off of my actual redhat 7 disk
> so that I know it is the same (including all patches, updates and OTHER
> things I did to it that I
> have forgotten about).
>
> I booted the redhat 7 image just fine at this point. I also copied it
> for backup so I dont have to install again.
>
> So on my centos 5 box I mounted the image with a loop command.
> mount -t ext3 -o loop,offset=32256 redhat7.img /mnt/image
> This works fine.
>
> Then I logged into the redhat 7 system and executed the command
> tar --exclude ./proc --exclude ./mnt --exclude ./sys --exclude ./dev
> -cvf - . | ssh root@xxxxxxxxxxx "( cd /mnt/image ; tar xvpf -)"

You should use -v only in the second tar, if not every file is logged
twice, just a trick.

>
> Where 192.168.1.8 is my centos 5 box and /mnt/image the mounted image.
>
> The copy seems to go fine. But after I do this when I try to virtualize
> the redhat7 image it stops at:
> GRUB

If I had to do the same thing myself, trying to make it simple and
maximize my chances of success. I would have first installed a minimal
RH7 on the disk image, then made a backup of /boot and
/boot/grub/grub.conf.
Also on my original rh7 I would have installed a xen kernel using :
rpm -ivh kernel-xen?????.rpm. (the same as the one running on my xen
system)
Then copied all the files, like you did (using tar and ssh).

Then restoring /boot/grub/grub.conf and kernel related /boot/initrd?????

Et voila :-)

Anyway the hardest part is to have grub correctly installed and a well
configured initrd pre-boot image.

Regards.

>
> When I copy the second image back on top of the first image it then
> boots again. So glad I made that copy
> of the image file.
>
> What is happening with the tar command that is messing up grub and
> keeping it from booting?
>
> Thanks,
>
> Jerry
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
>


-- 
Alain Spineux
aspineux gmail com
May the sources be with you
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux