Q:

Cannot boot new VM, when copied from one XEN-host to another

n my Debian 10 (buster) XEN Host, I copied a Xen-VM that is using Debian jessie from an LVM-snapshot into a new xen guest and tried to start it. This is what I did:
Copy xen VM to test a dist-upgrade of a mailserver
First Attempt
I created a new mashine with xen-create-image and overwrote all files via rsync.
Now I saw this error:
libxl: error: libxl_bootloader.c:649:bootloader_finished: Domain 35:bootloader failed - consult logfile /var/log/xen/bootloader.35.log

$ cat /var/log/xen/bootloader.35.log
Traceback (most recent call last):
  File "/usr/lib/xen-4.11/bin/pygrub", line 882, in <module>
    raise RuntimeError, "Unable to find partition containing kernel"
RuntimeError: Unable to find partition containing kernel

Did I have to recreate the right boot loader?
Or did I have to exclude some files from the rsync of the snapshot to the new image?

UPDATE:
I also tried this: 
chroot into the mounted new system:
mount /dev/vg0/vm01.mail-test-disk /media/vm01.mail-test-disk/
mount -t proc none /media/vm01.mail-test-disk/proc
mount --rbind /dev /media/vm01.mail-test-disk/dev
mount -t sysfs sysfs /media/vm01.mail-test-disk/sys
chroot /media/vm01.mail-test-disk/ /bin/bash

in the chroot shell:
apt install grub-pc

--> when asked, choose /dev/dm-33 (622770 MB; vg0-vm01.mail--test--disk) and continue althoug it seems to fail
update-grub

new error:
$ umount -l /media/vm01.mail-test-disk
$ xen create /etc/xen/vm01.mail-test.cfg

Parsing config from /etc/xen/vm01.mail-test.cfg
libxl: error: libxl_aoutils.c:478:libxl__openptys: openpty failed: No such file or directory
libxl: error: libxl_utils.c:1128:libxl__recvmsg_fds: recvmsg got EOF (ptys)
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: openpty child [20919] exited with error status 255
libxl: error: libxl_create.c:1267:domcreate_rebuild_done: Domain 37:cannot (re-)build domain: -3
libxl: error: libxl_domain.c:1034:libxl__destroy_domid: Domain 37:Non-existant domain
libxl: error: libxl_domain.c:993:domain_destroy_callback: Domain 37:Unable to destroy guest
libxl: error: libxl_domain.c:920:domain_destroy_cb: Domain 37:Destruction of domain failed

I also tried grub-xeninstead of grub-pc, but the same error.
I get the same Parsing config... error now all the time, also when creating any other image with 
 xen create /etc/xen/...cfg

I started over, this time with excluding important folders with
rsync -aAX --del --info=progress2 /media/vm01.mail-disk-snapshot/ /media/vm01.mail-test-disk/ --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/boot/*,/var/tmp/*,/var/cache/*,/usr/tmp/*}

which leaves me without errormessage, but the VM is not accessible:
$xen create /etc/xen/vm01.mail-test.cfg

Parsing config from /etc/xen/vm01.mail-test.cfg

$xl console vm01.mail-test

xenconsole: Could not read tty from store: Success

xentop shows 99% CPU usage of the newly created VM 
solution vor this part:
I found out, that I destroyed my running Dom0 Xen-host system, by mounting the /dev folder with
mount --rbind /dev /media/vm01.mail-test-disk/dev

for chroot to edit the new VM (See here). A reboot fixed /dev and using --bind instead prevents the error again.

UPDATE2:
I tried again and formatted the volume before I started the rsync, so the excluded folders are empty instead of containing the content of the bootstrap Debian system:
mkfs.ext4 /dev/vg0/vm01.mail-test-disk
rsync -aAX --del --info=progress2 /media/vm01.mail-disk-snapshot/ /media/vm01.mail-test-disk/ --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/boot/*,/var/tmp/*,/var/cache/*,/usr/tmp/*}

Now the VM starts booting and I can enter the xen-console but now I get this error:

[....] Activating swap...[    6.228541] Adding 8388604k swap on /dev/xvda1.  Priority:-2 extents:1 across:8388604k SSFS
done.                                                     
[    6.282959] EXT4-fs (xvda2): re-mounted. Opts: (null)
[....] Checking root file system...fsck from util-linux 2.25.2
/dev/xvda2 has unsupported feature(s): metadata_csum           
e2fsck: Get a newer version of e2fsck!                               
fsck exited with status code 8                      
failed (code 8).                                    
[....] An automatic file system check (fsck) of the root filesystem failed. A manual fsck must be performed, then the system restarted. The fsck should be performed in maintenance mode with the root filesystem mounted in read-on
[FAILde. ... failed!                                                                                                
[warn] The root filesystem is currently mounted in read-only mode. A maintenance shell will now be started. After performing system maintenance, press CONTROL-D to terminate the maintenance shell and restart the system. ... (war
ning).                                                 

A:

I found the solution here

features that the ext4 filesystem created on the jessie host doesn’t
  have, which the stretch server does.

metadata_csum
64bit

So this fixed my last problem:
e2fsck -f /dev/vg0/vm01.mail-test-disk
tune2fs -O ^metadata_csum /dev/vg0/vm01.mail-test-disk
# yes
tune2fs -O ^64bit /dev/vg0/vm01.mail-test-disk
resize2fs -s /dev/vg0/vm01.mail-test-disk

