You are not logged in.

#1 2023-11-17 10:48:05

lomaharshana
Member
Registered: 2020-11-06
Posts: 26

Problem with KVM/QEMU While Virtualizing Arch From Another Partition

I have two arch installations: one is on /dev/nvme0n1p2 with its EFI on /dev/nvme0n1p1 (different partition on same physical disk).
Another arch installation is on another physical drive /dev/sda2 (this holds both the root and home directories) and EFI on /dev/sda1 (another partition on same /dev/sda device).
Both have KDE plasma as the default desktop manager.

I can do hardware boot into any of these two without any problems.

Now I want to start the /dev/sda2 archlinux as VM from the other environment using KVM/QEMU.

I have done the following:
- Enabled virtualization from BIOS:
    lscpu | grep Virtualization shows VT-x
- Installed the following packages
    qemu virt-manager ovmf bridge-utils vde2
- started the modules (using modprobe) kvm, kvm_intel, virtio, virtio_net, virtio_blk, virtio_pci
- On guest (/dev/sda2): Updated the packages and initramd (mkinitcpio -P)

Now when I try running the following command:

sudo qemu-system-x86_64 \
  -enable-kvm \
  -m 8G \
  -cpu host \
  -smp 6 \
  -drive file=/dev/sda2,format=raw,if=virtio \
  -drive file=/dev/sda1,format=raw \
  -drive if=pflash,format=raw,readonly,file=/usr/share/ovmf/x64/OVMF_CODE.fd \
  -drive if=pflash,format=raw,file=/usr/share/edk2/x64/OVMF_VARS.fd \
  -net nic \
  -net user

I get the following error:

BdsDxe: failed to load Boot0001 "UEFI QEMU HARDDISK QMOG001 “ from PciRoot (0x0) /Pci (0x1,0x1) /Ata (Pri
mary,Master,0x0) : Not Found
BdsDxe: failed to load Boot0002 "UEFI Misc Device” from PciRoot (0x0) /Pci(0x4,0x0) : Not Found

>>Start PKE over ITPu4.

followed by the following screen:

UEFT Interactive Shell v2.2
EDK II
UEFT v2.70 (EDK II, 6x00010000)
Mapping table
FS0: Alias(s) :Fa::BLKO:
PciRoot (0x0) /Pci (0x1,0x1) /Aita (0x0)
BLKL: Alias(s) :
PciRoot (0x0) /Pci (0x1,0x1) /Aita (0x0)
BLK2: Alias(s) :
PciRoot (0x0) /Pci (04, 0x0
Press ESC in 1 seconds to skip startup.nsh or any other key to contine.
Shell>

Could you please help resolve the problem.

Last edited by lomaharshana (2023-11-17 10:52:14)

Offline

#2 2023-11-17 17:10:06

xerxes_
Member
Registered: 2018-04-29
Posts: 765

Re: Problem with KVM/QEMU While Virtualizing Arch From Another Partition

See:
https://wiki.archlinux.org/title/QEMU
https://simgunz.org/posts/2021-12-12-bo … linux-kvm/
https://wiki.archlinux.org/title/Libvirt
but maybe you could try systemd-nspawn:
https://wiki.archlinux.org/title/Systemd-nspawn
also you can try 'systemctl switch-root [ROOT [INIT]]' (details in man page).

Last edited by xerxes_ (2023-11-17 20:34:14)

Offline

Board footer

Powered by FluxBB