guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libvirt with modified QEMU and OVMF


From: Lars Böckel
Subject: Re: libvirt with modified QEMU and OVMF
Date: Sat, 8 Sep 2018 23:56:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

Thanks for sharing your idea about it. I cannot pull right now but i think ...nvram = " ovmf "/F... would not work since you would have to call the complete path of the package. Though something like "nvram = /run/current-system/profile/share/firmware/ovmf_x64.bin" COULD work. I don't know how it would react to the massive wall of symlinks. That is probably the reason why NixOS calls it with ${pkgs.OVMF}. The produced file in NixOS (/var/lib/libvirt/qemu.conf) points to /nix/store/.... For usability something you can just put in libvirt-service-type with #t would be good for usability. As well as the user variable. Configurations like these are probably more common than changing tls-ports and would simplify the migration of people running different systems since they could more easily configure VMs with UEFI support.

When my internet is running again i will pull and try this config. But since its saturday that might take some time... You can easily check for UEFI support in libvirt with either virt-install --boot uefi or in virt-manager when you create a vm and edit it beforehand you have a dropdown menu for BIOS/UEFI. If someone could test it out and report back that would be great!


i would like to push the issue with OVMF in libvirt again:

I would like to have OVMF(UEFI) capability with QEMU. In NixOS you can
achieve this with

   virtualisation.libvirtd.enable = true;
   virtualisation.libvirtd.qemuOvmf = true;
    virtualisation.libvirtd.qemuVerbatimConfig = ''
      nvram = [ "${pkgs.OVMF}/FV/OVMF.fd:${pkgs.OVMF}/FV/OVMF_VARS.fd" ]
      user = "1000"
    '';

the "user" part is not necessary but is required for system VMs in
combination with qemu's pulseaudio driver. qemuVerbatimConfig is the
config that is at /etc/libvirt/qemu.conf in traditional GNU/Linux
distributions.
I don’t know about OVMF but IIUC, what you need here is to create
/etc/libvirt/qemu.conf.  To do that, you can something along these
lines:

   (simple-service 'qemu-conf etc-service-type
                   `(("libvirt/qemu.conf"
                      ,(mixed-text-file "qemu.conf"
                                         "nvarm = "
                                         ovmf "/FV/OVMF.fd:…'))))

Would that work?

(Actually the “libvirt/” bit is only possible since commit
5dec93bb8ba89605bce2f9a5ee9c4dbadeee3b58, a few minutes ago…)

We could provide a proper abstraction on top of that if needed, but I’m
not familiar with libvirt.  If you have ideas on how to improve this,
that’d be great!

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]