Return to Level1Techs.com

How to copy UEFI Virtual Machine Images?

I have a UEFI Debian base image on /dev/vg0/base. It has a partition table (created by the guest during the install) and a root ext4 and an EFI partition.

If I lvcreate a new logical volume and then dd if=/dev/vg0/base of=/dev/vg0/new to create a copy, I can’t boot a VM with the copied disk image. It just gets stuck at the UEFI shell.

Is there a better way to copy UEIF images so I can have a base machine template? Or should we only use BIOS based images inside VMs?

This is for KVM/QEMU machines.

So the copied image has the partition table, exactly the same as the original?

Did you configure the boot entry in the UEFI of the new VM?

I can’t figure out how to edit boot entries for TianoCore. I’m trying right now just to “put the CD back in the drive” on an existing virtual machine, and even with only the CD drive checked, it still insists on booting from the hard drive.