Skip to content

qemu fails building EC2 AMI: CPU model ‘host’ requires KVM #85394

@anmonteiro

Description

@anmonteiro

Describe the bug
When trying to generate an EC2 AMI, qemu fails with:

qemu-system-x86_64: CPU model ‘host’ requires KVM

This has been reported by someone else in the NixOS Discourse too: https://discourse.nixos.org/t/new-constraint-between-release-19-09-and-20-03-in-package-qemu/6297

I've tried reverting 2bd296a and it succeeds for me, noting that's the commit that introduced the problem.

To Reproduce
Steps to reproduce the behavior:

  1. Launch an EC2 instance
  2. Run the following:
$ export NIXOS=/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/
$ nix-build -A amazonImage.x86_64-linux $NIXOS/release.nix

Expected behavior
Qemu would succeed in creating a disk image

Notify maintainers
cc @volth who's the author of the referenced commit. I'm not sure what the right fix is here, so would appreciate some guidance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions