Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Re-use the NixOS VM test infrastructure to test Ubuntu, Debian, and Fedora machines.

License

NotificationsYou must be signed in to change notification settings

numtide/nix-vm-test


Instant VMs to test your project

Fedora logoDebian logoUbuntu logoRocky Linux logo

Get StartedReference


README

Testing your project on different Linux distributions is essential, but time-consuming.

nix-vm-test allows you to quickly spin up a virtual machine running any of the following Linux distributions under Qemu:

  • Ubuntu
  • Debian
  • Fedora
  • Rocky

And run your tests using a single CLI command.

Overview

This project builds on theNixOS VM test infrastructure to allow you to test your software instantly on Ubuntu, Debian, Fedora, and Rocky virtual machines.

It runs on any Linux machine with Nix installed.

Your tests can either be used:

  • interactively, for development purposes.
  • noninteractively. This is perfect for CI, and you can use it as an integration test matrix on a wide variety of Linux distributions.

You configurenix-vm-test using Nix package manager, either in a flake or in a.nix configuration. This includes defining the parameters of the virtual machine you need for the test, and writing a Python script to define your tests. Once you've built the project, you can create the virtual machine and run your tests with a single CLI command.


Prerequisites

  • A Linux machine

  • Nix Package Manager

  • Hardware KVM acceleration. The project will run without it, but it will be too slow for practical purposes.


How to use nix-vm-test

TheGet Started guide walks you through setting up and running a simple test scenario.

For more detailed information, see theReference guide.


Status of the Project

Beta-grade

The API will be backward compatible. The project is already used in some production setups in the wild.

However, expect to experience some paper cuts along the way. Check out thebug tracker to see the currently unfixed known bugs and their workaround.

API Peek

lettest=nix-vm-test.lib.ubuntu."23_04"{diskSize="+2M"sharedDirs={numtideShare={source="/home/numtide/share";target="/mnt";};};testScript=''      vm.wait_for_unit("multi-user.target")      vm.succeed("apt-get update")    '';};intest.sandboxed}

This project is supported byNumtide.Untitledpng

We are a team of independent freelancers that love open source.  We help ourcustomers make their project lifecycles more efficient by:

  • Providing and supporting useful tools such as this one
  • Building and deploying infrastructure, and offering dedicated DevOps support
  • Building their in-house Nix skills, and integrating Nix with their workflows
  • Developing additional features and tools
  • Carrying out custom research and development.

Contact us if you have a project in mind, or ifyou need help with any of our supported tools, including this one. We'd love tohear from you.

About

Re-use the NixOS VM test infrastructure to test Ubuntu, Debian, and Fedora machines.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors13


[8]ページ先頭

©2009-2025 Movatter.jp