First, I create a clear linux vm with virt-install
virt-install \
--name CLEAR \
--ram 65536 \
--disk path=/guest_images/Linux_main/CLEAR.img,bus=virtio,size=450 \
--vcpus 8 \
--os-type linux \
--os-variant generic \
--network bridge=virbr0 \
--graphics vnc \
--console pty,target_type=serial \
--cdrom /media/big-tank-8TB/OSISOS/clear-25720-installer.iso
The installer starts up and I choose the only available device "vda", which I assume must be the CLEAR.img file, so I choose to create a parition there and install (also, not sure why no partitions show, this img is on a zvol that I had previously formatted to ext4)
The installer apparently completes successfully.
But after rebooting, I am stuck in Seabios "booting from the hard disk"
I tried changing the drive interface from virtio to ide, but it did not help. Not sure what to try next.
I also tried these instructions from the Clear Linux website with which I was able to start up, but ran into problems connecting via vnc, and more relevant to my question, when I tried to virt-install start the provided .img file, I got the same seabios "booting from hard disk" forever that I got after installing via the .iso. I suspect the problem might be that I need to provide a UEFI file like in the Clear Linux instructions, but I am not sure how to do this when using virsh and and existing VM.
The problem is indeed that you need to provide the UEFI firmware.
You will need to add the
--boot uefi
option.Reference: https://fedoraproject.org/wiki/Using_UEFI_with_QEMU#virt-install
You may also need to update the OVMF firmware on your system. Clear Linux provides an up to date one at https://download.clearlinux.org/image/. They also provide the
_CODE
and_VARS
fd's might need to be updated in the nvram section of your/etc/libvirt/qemu.conf
This also might be helpful: https://github.com/virt-manager/virt-manager/commit/d2fffa509efe891eef3f2f70e5688c1d6e3a2d87
You might be fine just passing that flag. Otherwise I'd try the
nvram
section. Personally I use theirstart_qemu.sh
script. But I wish you luck.