User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 
Topic: Physical to Virtual (P2V) Recovery Article Bookmarks
Keywords: p2v, physical, virtual, recovery
Operating Systems: Linux® based
YouTube Video RHEL7.x P2V Recovery

Being able to recover my crashed server to a virtual environment was amazing!

Customer of LONE-TAR

This article will go over all the requirements and steps needed to successfully recover a physical Linux server to a virtual environment. Remember this feature is only available on the latest version of LONE-TAR and AIR-BAG v4.4.x series. Please review all requirements before proceeding to the P2V recovery procedures.

IMPORTANT UPDATE (08/12/2017):
LONE-TAR is pleased to announce the first to market P2V recovery for RHEL 7.x and CentOS 7.x. Our new AIR-BAG 3.2.0.0 will now look for and load any missing modules to talk to the new VM without you having to load anything manually, including having to manually run mkinitrd. AIR-BAG does everything for you with our latest release! Click here to jump to instructions below.

Requirements:

  1. Latest LONE-TAR v4.4.2.0 or greater
  2. Latest AIR-BAG v3.2.0.0 or greater
  3. CD Burner (optional)
  4. Virtual Machine Software
  5. Network based backup for recovery (not required but recommended)

 

Adding modules required for virtual environment into AIR-BAG before making the AIR-BAG Recovery Boot Disc.

This step allows you to include missing modules for the Virtual Server before AIR-BAG is created. This allows AIR-BAG to load these modules automatically during bootup instead of having to manually load the modules after bootup.

Start from the command line and execute LONE-TAR as user 'root'
  • # ltmenu
    Select option 6 (Utilities Menu)
    Select option 8 (System Crash AIR-BAG Menu)
    Select option 3 (Configuration Menu)
    Select option 7 (Module Options Menu)
    Select option 1 (Include Modules)
    Select option A (Add)

    AIR-BAG will ask to enter module name to include >>
    Enter the module name without the .ko extension

    If you enter a module that does not exist, AIR-BAG will say it does not exist.

    Here are known modules needed when recovering to VMware:
    scsi_transport_spi
    mptbase
    mptspi
    mptscsih
    e1000

 

Create the AIR-BAG Disaster Recovery Disc.

Start from the command line and execute LONE-TAR as user 'root'
  • # ltmenu
    Select option 6 (Utilities Menu)
    Select option 8 (System Crash AIR-BAG Menu)
    Select option 1 (Create AIR-BAG Bootable CD-ROM)

    If you do not have a CD burner on your Linux server, you can make an ISO boot image instead.

    Select option 2 (Image Administrator)
    Select option 1 (Bootable CD image only)

    Directory where image is stored: /usr/air-bag/images/saved_img.dir
    Filename of ISO image: abboot.iso
    Average filesize: 40MB- 75MB

 

Run mkinitrd

This has now been automated through AIR-BAG. Users no longer need to perform this step manually to recover P2V.

NOTE: Running mkinitrd will vary between OS. Please make sure you follow exact instructions for the OS you are running.

Before you can know what filesystems to mount, you will need to find that information from the following AIR-BAG files.
For LVM device names look at the file: /usr/air-bag/config/lvm_mount
For Partition based device names look at the file: /usr/air-bag/config/mnttable

Instructions for RHEL 6.x & 7.x & CentOS 6.x & 7.x  (This option has been automated with AIR-BAG 3.2.0.0)
  1. Enter the AIR-BAG Shell Prompt
    (Select option 3 from AIR-BAG Main Menu [Shell Prompt] )
  2. Run the following commands in order

    Please replace devices in 'red' to match your settings

    LVM names can be found ==> /usr/air-bag/config/lvm_mount
    Partition names can be found ==> /usr/air-bag/config/mnttable

    [AIR-BAG] > mount  /dev/mapper/centos-root  /mnt
    [AIR-BAG] > mount  /dev/sda1  /mnt/boot
    [AIR-BAG] > mount  /dev/mapper/centos-home  /mnt/home
    [AIR-BAG] > chroot  /mnt
    [AIR-BAG] > cd  /boot
    [AIR-BAG] > mkinitrd  -v  -f  initramfs-$(uname -r).img  $(uname -r)
    [AIR-BAG] > exit
    [AIR-BAG] > exit

    Remove AIR-BAG boot media; reboot machine
Instructions for RHEL 5.x & CentOS 5.x   (This option has been automated with AIR-BAG 3.2.0.0)
  1. Enter the AIR-BAG Shell Prompt
    (Select option 3 from AIR-BAG Main Menu [Shell Prompt] )
  2. Run the following commands in order

    Please replace devices in 'red' to match your settings

    LVM names can be found ==> /usr/air-bag/config/lvm_mount
    Partition names can be found ==> /usr/air-bag/config/mnttable

    [AIR-BAG] > mount  /dev/mapper/LogVol00-root  /mnt
    [AIR-BAG] > mount  /dev/sda1  /mnt/boot
    [AIR-BAG] > mount  /dev/mapper/LogVol00-home  /mnt/home
    [AIR-BAG] > chroot  /mnt
    [AIR-BAG] > cd  /boot
    [AIR-BAG] > mkinitrd  -v  -f  initrd-$(uname -r).img  $(uname -r)
    [AIR-BAG] > exit
    [AIR-BAG] > exit

    Remove AIR-BAG boot media; reboot machine

 

Reboot off the newly recovered Virtual server and remove the AIR-BAG boot disc