0

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) enter image description here

The installer apparently completes successfully.

enter image description here

But after rebooting, I am stuck in Seabios "booting from the hard disk"

enter image description here

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.

  • Um, why do you call CLEAR.img a file, and then call it a zvol in the next sentence? What is it really? – Michael Hampton Oct 20 '18 at 13:16
  • CLEAR.img is a file, located on a zvol. I used this same approach to create other VMs, so whatever is going on here is specific to Clear Linux. – Thoughtcraft Oct 20 '18 at 13:26
  • 1
    OK, now I get it. That's perhaps one more level of indirection than I'd prefer; I just use the zvol directly as the VM's disk. – Michael Hampton Oct 20 '18 at 14:26
  • Wait, how do you do that? I thought the way to do it was to make the zvol, and then create the KVM img on that zvol? Is there a way to put a virtual machine onto the disk without creating a .img file? – Thoughtcraft Oct 20 '18 at 23:59
  • 1
    Sure, use /dev/zvol/tank/clear or whatever as the raw disk image. – Michael Hampton Oct 21 '18 at 0:12
2

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

    #nvram = [
    #   "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd",
    #   "/usr/share/OVMF/OVMF_CODE.secboot.fd:/usr/share/OVMF/OVMF_VARS.fd",
    #   "/usr/share/AAVMF/AAVMF_CODE.fd:/usr/share/AAVMF/AAVMF_VARS.fd",
    #   "/usr/share/AAVMF/AAVMF32_CODE.fd:/usr/share/AAVMF/AAVMF32_VARS.fd"
    #]

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 their start_qemu.sh script. But I wish you luck.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.