This guide describes how to validate a converted Ubuntu 24.04.3 qcow2 image using KVM + libvirt on Fedora, booting with legacy BIOS (SeaBIOS) and attempting to land in graphical mode when available.
This is intended as a post-conversion smoke test after migrating a VMware VMDK to qcow2 and applying offline fixes (fstab, GRUB, initramfs, disk identifiers, etc.).
Before migrating this platform, ensure:
Install required virtualization tools:
sudo dnf install -y \
libvirt \
qemu-kvm \
qemu-img \
virt-viewer \
libguestfs-tools
Enable libvirt and ensure the default network is active:
sudo systemctl enable --now libvirtd
sudo virsh net-start default 2>/dev/null || true
/home/ssahani/by-path/out/ubuntu-24.04.3.qcow2
Assumptions:
This XML is conservative and generally works across Ubuntu images:
machine='pc')cat >/tmp/ubuntu-24043-test.xml <<'EOF'
<domain type='kvm'>
<name>ubuntu-24043-gui</name>
<memory unit='MiB'>4096</memory>
<vcpu>2</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
</features>
<cpu mode='host-passthrough'/>
<devices>
<!-- Disk -->
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/home/ssahani/by-path/out/ubuntu-24.04.3.qcow2'/>
<target dev='vda' bus='virtio'/>
</disk>
<!-- Network -->
<interface type='network'>
<source network='default'/>
<model type='virtio'/>
</interface>
<!-- Graphics -->
<graphics type='vnc' autoport='yes' listen='127.0.0.1'/>
<!-- Video -->
<video>
<model type='vga'/>
</video>
<input type='tablet' bus='usb'/>
</devices>
</domain>
EOF
Remove any existing domain with the same name:
sudo virsh destroy ubuntu-24043-gui 2>/dev/null || true
sudo virsh undefine ubuntu-24043-gui 2>/dev/null || true
Define and start:
sudo virsh define /tmp/ubuntu-24043-test.xml
sudo virsh start ubuntu-24043-gui
virt-viewer ubuntu-24043-gui
sudo virsh vncdisplay ubuntu-24043-gui
Connect to the displayed address, e.g.:
127.0.0.1:5901
A successful boot typically shows:
Either:
Pass condition: any stable login prompt (GUI or console).
grub> promptTypical reasons:
/boot or broken /etc/fstabQuick check from GRUB:
ls
ls (hd0,msdos1)/
ls (hd0,gpt1)/
(initramfs) shellLikely causes:
/dev/sda → vda)virtio_blk, virtio_pci, virtio_scsi)/etc/fstabInside initramfs:
ls /dev/vd*
ls /dev/disk/by-uuid
cat /proc/cmdline
Offline fix (inside guest, once booted) usually is:
sudo update-initramfs -u
sudo update-grub
Try an alternate video model:
<model type='qxl' vram='65536'/>
or:
<model type='virtio'/>
Some converted installs expect SATA first.
Switch the disk bus for the first boot:
<target dev='sda' bus='sata'/>
After it boots and initramfs is confirmed sane, revert to virtio.
Ubuntu Server defaults to:
systemctl get-default
Expected:
multi-user.target
This is not a failure.
If you want to verify GUI bits exist:
dpkg -l | egrep 'ubuntu-desktop|gdm3|gnome-shell'
default libvirt network is the normal smoke-test baseline.Status: Smoke test template for Ubuntu 24.04.3 (BIOS, KVM/libvirt)