How to fix partition table after virt-resize rearranges it (KVM)?

Solution 1:

Found the answer here: https://askubuntu.com/questions/795504/grub-boot-error-on-cloned-virtual-machine

Just to clarify the steps, I had to:

  1. run virt-rescue quest1-shrinked.qcow
  2. and then run the following commands:
mkdir /mnt
mount /dev/sda3 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
grub-install /dev/sda

After that, the system boots normally.