You tried to install grub to /dev/dm-0, which is an LVM logical volume. It must be installed to a hard disk, such as /dev/sda.
You tried to install grub to /dev/dm-0, which is an LVM logical volume. It must be installed to a hard disk, such as /dev/sda.