Skip to content

Commit

Permalink
Merge pull request #181 from yfyf/misc-qemu-usage-nitpicks
Browse files Browse the repository at this point in the history
Misc QEMU usage nitpicks
  • Loading branch information
knuton authored Sep 24, 2024
2 parents b9f37e1 + dcb073c commit 103d7ae
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ or individual tests with

Tests added to `test/integration` are executed via a GitHub Action when pushing or creating pull requests.

*Note*: if running non-NixOS Linux, ensure you have KVM setup and `/dev/kvm` is
*world read-writable* (if not, do `chmod o+rw /dev/kvm`), otherwise qemu invoked
by `nixbld` users will not able to utilize KVM acceleration and everything will
run 10x slower. If you see `failed to initialize KVM` in the console logs, it
means there's a problem. See [this (outdated) Github issue](https://github.com/NixOS/nixpkgs/issues/124371#issue-900719073)
for more details.

## Deployment

Update bundles are hosted on Amazon S3. The script `bin/deploy-update` will handle signing and uploading of bundle.
Expand Down
2 changes: 1 addition & 1 deletion testing/integration/rauc-statusfile-recovery.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
let
pkgs = import ../../pkgs { };
in
pkgs.nixosTest {
pkgs.testers.runNixOSTest {
name = "rauc statusfile recovery";

nodes = {
Expand Down
2 changes: 1 addition & 1 deletion testing/integration/remote-maintenance.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
let
pkgs = import ../../pkgs { };
in
pkgs.nixosTest {
pkgs.testers.runNixOSTest {
name = "remote maintenance";

nodes = {
Expand Down
6 changes: 3 additions & 3 deletions testing/run-in-vm/run-in-vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
QEMU_SYSTEM_X86_64 = "@qemu@/bin/qemu-system-x86_64"
QEMU_IMG = "@qemu@/bin/qemu-img"

DEFAULT_QEMU_OPTS = ['--enable-kvm', '-m', '2048']
DEFAULT_QEMU_OPTS = ['-enable-kvm', '-m', '2048']

# set DISK to None if not substituted
if not os.path.isfile(DISK):
Expand Down Expand Up @@ -83,8 +83,8 @@ def disk_overlay(disk):
# Create a disk overlay
subprocess.run(
[
QEMU_IMG, 'create', '-f', 'qcow2', '-o'
'backing_file={}'.format(disk), temp + "/disk-overlay.qcow2"
QEMU_IMG, 'create', '-f', 'qcow2', '-b', disk, '-F', 'raw',
temp + "/disk-overlay.qcow2"
],
check=True)

Expand Down

0 comments on commit 103d7ae

Please sign in to comment.