I honestly am not in the state where I can write a neat introduction for this specific action so I will just proceed to the steps I took for having this successfully done.
ovmf
by following the instructions specified on the archwiki
;archiso
on QEMU
.qemu-system-x86_64 -enable-kvm -m 2G \
-device intel-hda -device hda-duplex -device virtio-balloon \
-drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2-ovmf/x64/OVMF_CODE.fd \
-drive if=pflash,format=raw,file=/path-to-my_uefi_vars.fd \
-drive file=/path-to-linux.img,if=virtio \
-virtfs local,path=/path-to-shared-folder,mount_tag=hostshare,security_model=none,id=fsdev0 \
-cdrom /path-to-archlinux-x86_64.iso -boot d
UEFI
support as instructed in the archwiki; &Virtio
loaded to enable its block device as well as folder/file
sharing from Host OS to Guest OS.ESP
partition as well as a Linux LVM
partition with gdisk
. Both were formatted as FAT32
and EXT4
respectively;lsblk
to see the available block devices. Obviously the last line is the virtual disk available which was created before loading the VM.gdisk
(my favorite table partition app) of that particular block device intended for the VM, printed the list of partition which surely is empty and created a new partition for ESP which is required for UEFI bootloader.LVM
partition on /mnt, created a mount point for a shared folder and mounted it through the 'hostshare
' mount_tag
(I did this to copy all the base packages installed on Host OS into the Guest OS so that I no longer needed to wait for the packages to be downloaded) and continued with the general installation. Part of these steps may be seen in the images below:ls
command for the mounted shared partition which contain the packages already installed on my host OS."You could omit the installation of the firmware package when installing in a virtual machine or container."
lvm2
' needs to be added to 'HOOKS
' line in /etc/mkinitcpio.conf
file before running mkinitcpio:-grub
(grub2) as well as efibootmgr
and add 'lvm
' to a line where it says 'GRUB_PRELOAD_MODULES
' in /etc/default/grub
file. Next, I mounted the ESP
partition on /mnt/boot
and run the following commands:-grub-install --target=x86_64-efi --efi-directory=/mnt/boot --boot-directory=/mnt/boot --bootloader-id=GRUB
grub-mkconfig -o /mnt/boot/grub/grub.cfg