This guide describes how to validate a converted Photon OS qcow2 image using KVM + libvirt on Fedora, booting directly into graphical (GUI) mode with legacy BIOS (SeaBIOS).
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/photon.qcow2
Assumptions:
Important - Virtio Support:
Photon OS is a cloud-native distribution that ships with virtio drivers pre-installed in the initramfs. After conversion with hyper2kvm:
"mtime+size unchanged" is normal and expectedThis XML configuration is intentionally conservative and works reliably for Photon and other minimal Linux guests:
machine='pc')cat >/tmp/photon-test.xml <<'EOF'
<domain type='kvm'>
<name>photon-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/photon.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
If a domain with the same name already exists, remove it first:
sudo virsh destroy photon-gui 2>/dev/null || true
sudo virsh undefine photon-gui 2>/dev/null || true
Define and start the VM:
sudo virsh define /tmp/photon-test.xml
sudo virsh start photon-gui
virt-viewer photon-gui
sudo virsh vncdisplay photon-gui
Connect to the displayed address, for example:
127.0.0.1:5901
A successful boot typically shows:
Important:
Photon OS is commonly console-only.
A login prompt is a successful boot.
Try an alternative video model:
<model type='qxl' vram='65536'/>
or:
<model type='virtio'/>
This is very rare with modern Photon OS. Photon ships with virtio drivers and should boot with virtio disk.
If you encounter this issue (unlikely with Photon OS 3.0+), try SATA as a fallback:
<target dev='sda' bus='sata'/>
Recommended approach:
Photon OS does not install a graphical stack by default.
Inside the guest:
systemctl get-default
If it reports multi-user.target, this is expected behavior.
During hyper2kvm conversion, you may see:
⚠️ initramfs rebuild failed: mtime+size unchanged
This is normal and expected for Photon OS. It means:
Verification: After conversion, the VM should:
Status: Verified boot for Photon OS (BIOS, KVM/libvirt)
After migrating this platform: