[Rear-users] Testing REAR in an XEN Environtment with SUSE Enterprise Linux 11 SP1

Schlomo Schapiro schlomo at schapiro.org
Mon Aug 22 16:21:23 CEST 2011


Hi,

there are many things that can go wrong. Personally I had success with
XEN VM recovery with a slightly different approach:

1. I used OUTPUT=PXE to get the kernel/initrd without a boot loader

2. I wrote a little XEN VM start script that would start the recovery VM
with the kernel/initrd that had been created in step 1

3. Of course the original and recovery VM have to have a similar setup
(mostly HVM or PV).

Maybe this will help:

My script to start the recovery looks like this:

#!/bin/bash
# start devxvm in rescue mode
xm create -f devxvm001
kernel=/backup/devxvm001/boot/rescue/devxvm001.arc.int.kernel
ramdisk=/backup/devxvm001/boot/rescue/devxvm001.arc.int.initrd.cgz
bootloader= extra="rw selinux=0" root=/dev/ram $@

(and devxvm001 is the VM to recover)

My /etc/rear/local.conf (using rsync as EXTERNAL command, could be also
done with the BACKUP=RSYNC support)

# get the boot files in /boot/rescue
OUTPUT=PXE
PXE_TFTP_PATH=/boot/rescue
PXE_CONFIG_PATH=$PXE_TFTP_PATH
PXE_CREATE_LINKS=IP

# use rsync for simple backup
BACKUP=EXTERNAL
EXTERNAL_BACKUP="rsync -aAXSHx --delete --numeric-ids / /boot
devxen001:/backup/devxvm001/"
EXTERNAL_RESTORE="rsync -aAXSH --numeric-ids
devxen001:/backup/devxvm001/ /mnt/local/"
EXTERNAL_CHECK="ssh devxen001 date '+CHECK EXTERNAL devxen001 AT %F %T'
1>&2"
EXTERNAL_IGNORE_ERRORS=( 23 24 )

devxen001 is my XEN host and backup server, devxvm001 is the XEN PV VM
to backup and recover.

HTH,
Schlomo

PS: And this was on RHEL5 with Paravirtualization, I don't have any
experience with SLES and XEN VMs with regard to ReaR.

On 22.08.2011 14:42, Welte Gerhard wrote:
> Hallo,
> 
>  
> 
> we are testing REAR with XEN on SLES11 SP1. We have two XEN domU (volta
> and ampere) on the dom0 (srvxen02):
> 
>  
> 
> -          Relax & Recover Version 1.11.0 / 2011-05-24 10:39:25 +0200
> (rpm-Installation)
> 
> -          On volta we try an mkbackup:
> 
> Relax & Recover Version 1.11.0 / 2011-05-24 10:39:25 +0200
> 
> The preparation phase  OK
> 
> Physical devices that will be recovered: /dev/xvda
> 
> Saving disk partitions.
> 
> Saving LVM layout.
> 
> Saving Filesystem layout.
> 
> Saving Swap information.
> 
> Saving Encrypted volumes.
> 
> Creating root FS layout  OK
> 
> Copy files and directories  OK
> 
> Copy program files & libraries  OK
> 
> Copy kernel modules  OK
> 
> Checking udev  OK
> 
> Using kernel /boot/vmlinuz-2.6.32.24-0.2-xen
> 
> Create initramfs  OK
> 
> Making ISO image  OK
> 
> Wrote ISO Image /tmp/rear-volta.iso (30M)
> 
> Copying resulting files to nfs location  OK
> 
> Creating tar archive '/tmp/rear.LF3PIShkSjpC6ZR/netfs/volta/backup.tar.gz'
> 
> Archived 817 MiB [avg 3404 KiB/sec]  -^CFinished in 383 seconds.
> 
> You should also rm -Rf /tmp/rear.LF3PIShkSjpC6ZR
> 
>  
> 
> -          volta:/etc/rear # more local.conf
> 
> OUTPUT=ISO
> 
> BACKUP=NETFS
> 
> NETFS_URL=nfs://srvxen02.badenova.intern/installxen
> 
>  
> 
> -          The second domU (ampere) is defined to start from the
> previously created iso from the backup:
> 
>  
> 
> srvxen02:/etc/xen/vm # more ampere
> 
> name="ampere"
> 
> description="ampere"
> 
> uuid="d8825f38-a8ca-3f65-899f-6d0e577af67f"
> 
> memory=512
> 
> maxmem=512
> 
> vcpus=4
> 
> on_poweroff="destroy"
> 
> on_reboot="restart"
> 
> on_crash="destroy"
> 
> localtime=0
> 
> keymap="de"
> 
> builder="hvm"
> 
> device_model="/usr/lib/xen/bin/qemu-dm"
> 
> kernel="/usr/lib/xen/boot/hvmloader"
> 
> boot="d"
> 
> disk=[ 'phy:/dev/mapper/ampere_rootvg,xvda,w',
> 'file:/installxen/volta/rear-volta.iso,xvdb:cdrom,r', ]
> 
> vif=[ 'mac=00:16:3e:60:d9:86,bridge=br17', ]
> 
> vfb=['type=vnc,vncunused=1']
> 
> apci=0
> 
> acpi=1
> 
> pae=1
> 
> usb=1
> 
> usbdevice="tablet"
> 
> serial="pty"
> 
>  
> 
> Now we are trying to boot ampere. The boot menu is coming up:
> 
>  
> 
> Relax & Recover v1.11.0
> 
>  
> 
> Recover volta
> 
>  
> 
> Other actions…
> 
> .
> 
>  
> 
> If we try to boot from the Option Recover volta the following Error appears:
> 
>  
> 
> *Invalid or corrupt kernel image.*
> 
> *Boot:*
> 
> * *
> 
> What’s wrong in paradies?
> 
>  
> 
> Thanx in advance
> 
>  
> 
> Vegisto
> 
> 
> 
> ------------------------------------------------------------------------------
> uberSVN's rich system and user administration capabilities and model 
> configuration take the hassle out of deploying and managing Subversion and 
> the tools developers use with it. Learn more about uberSVN and get a free 
> download at:  http://p.sf.net/sfu/wandisco-dev2dev
> 
> 
> 
> _______________________________________________
> Rear-users mailing list
> Rear-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rear-users




More information about the rear-users mailing list