Web lists-archives.com

Re: Restore backup to KVM




	Hi.

On Fri, Sep 22, 2017 at 06:42:17AM +0200, solitone wrote:
> It's time to test my backups. Apart from user files, I also back up system
> files, except for the following directories that are excluded: /dev,
> /lost+found, /media, /mnt, /proc, /run, /sys, /tmp.
> 
> I would try and restore them to a virtual machine (KVM). Would it be
> possible?

Execute this on your source system.

grep MODULES /etc/initramfs-tools/initramfs.conf

If it says MODULES=most then you're in luck as it means your initrd
contains all kernel modules for all kinds of hardware.
And restoring from backup into QEMU-KVM means you only need to
reconfigure the bootloader.

If it says anything else you'll need to rebuild initrd along with the
bootloader configuration.


> Is there a way to configure KVM so that it resembles my bare
> metal, and the test is significant?

That's highly unlikely. On x86-64 there are two QEMU device models
worthy of speaking, and that's Intel i440FX and Intel Q35 motherboards.
Chances are you have different hardware.

So, it *will* have different NIC, Video adapter *and* most importantly,
IDE/SATA/SCSI controller.

Using Debian and MODULES=most you have a luxury of not to think about
it.


> I would install a basic debian system in KVM, and then overwrite it
> with my backed up files. Is this approach correct?

No. Some (but not all) configuration files would differ. Some (but not
all) packages would differ.

Reco