QEMU: Difference between revisions

From NixOS Wiki
imported>Mkg20001
m (Fix formatting)
imported>Abowen
(Add Quick EMU information)
Line 2: Line 2:


== Install ==
== Install ==
<syntaxhighlight lang=nix>
<syntaxhighlight lang=nix>
   environment = {
   environment = {
Line 7: Line 8:
   };
   };
</syntaxhighlight>
</syntaxhighlight>
=== Quick EMU ===
Quickly create and run highly optimised desktop virtual machines for Linux, macOS and Windows; with just two commands.
https://github.com/quickemu-project/quickemu
```
quickget windows 11
quickemu --vm windows-11.conf
```


== Booting UEFI ==
== Booting UEFI ==

Revision as of 10:17, 15 February 2024

A generic and open source machine emulator and virtualizer

Install

  environment = {
    systemPackages = [ pkgs.qemu ];
  };

Quick EMU

Quickly create and run highly optimised desktop virtual machines for Linux, macOS and Windows; with just two commands.

https://github.com/quickemu-project/quickemu

``` quickget windows 11 quickemu --vm windows-11.conf ```

Booting UEFI

To boot UEFI systems using QEMU, the UEFI firmware replacing the BIOS implementation needs to be provided while starting QEMU.

The following installs a script, that always starts QEMU with OVMF firmware implementing UEFI support.

 environment = {
   (pkgs.writeShellScriptBin "qemu-system-x86_64-uefi" ''
     qemu-system-x86_64 \
       -bios ${pkgs.OVMF.fd}/FV/OVMF.fd \
       "$@"
   '')
 };