Difference between revisions of "Migrate CentOS 5.4 to Ovirt"

From Michael's Information Zone
Jump to navigation Jump to search
(Created page with "==Purpose== A very old install of CentOS 5.4 needed to be migrated to an Ovirt Hypervisor. This was a special install of Hylafax, a productions server that could not be taken...")
 
Line 31: Line 31:
 
====rsync root partition====
 
====rsync root partition====
 
Back in the line fedora shell
 
Back in the line fedora shell
*umount
+
*umount the last partition used for the boot partition on /mnt
 +
*mount the other partition created (mount /dev/sda2 /mnt)
 +
*

Revision as of 17:42, 16 June 2018

Purpose

A very old install of CentOS 5.4 needed to be migrated to an Ovirt Hypervisor. This was a special install of Hylafax, a productions server that could not be taken offline, and was critical to business operations.

Several attempts were made to replicate the server and it's 500GB of data. Including running a disk dump over ssh to the destination VM and another physical server.

Steps

My final idea was to rsync the system to the new VM disk, install grub, then go from there.

Rsync

First I created a VM in Ovirt with a disk large enough to hold the data, plus extra as the existing server was running out of space.
After that was completed I

  • booted off a live fedora ISO
  • ran fdisk
    • created first partition with enough space for the boot partition.
    • created second partition with rest of space.
  • started sshd
  • created a password for liveuser
  • On the old server, ran ssh-copy-id liveuser@newvm to ensure key based ssh was setup.

rsync boot partition

While still in the live fedora shell

  • mounted /dev/sda1 on /mnt
  • chown liveuser /mnt

Then on the old server ran the following dry run to check for errors.

rsync -avn /boot/* liveuser@newvm:/mnt/ &> rsync.log

Then the live transfer

rsync -avz /boot/* liveuser@newvm:/mnt/ &> rsync.log

rsync root partition

Back in the line fedora shell

  • umount the last partition used for the boot partition on /mnt
  • mount the other partition created (mount /dev/sda2 /mnt)