Commit Graph

363 Commits

Author SHA1 Message Date
Linus Heckemann
9d50a5b0d8
Merge pull request #264147 from lheckemann/foreign-distros
vmTools: misc debian tool improvements
2024-04-10 13:31:39 +02:00
Nikolay Korotkiy
7ec994050c
vmTools: update debian versions 2023-11-24 20:59:42 +04:00
Linus Heckemann
5a4f40797c vmTools.debClosureGenerator: remove apparently obsolete bugfix 2023-10-29 11:26:11 +01:00
Linus Heckemann
e6a4a3feea vmTools/deb tools: pass through args
This is useful for adding preVM/postVM steps.
2023-10-29 11:24:54 +01:00
Linus Heckemann
01d078d970 vmTools.runInLinuxImage: allow setting root filesystem 2023-10-28 12:48:26 +02:00
Brian McGee
9aa91ec7b5 build-support/vm: fix makeImageTestScript
`qemu-img create` now requires an additional `-F <second_image_format>` flag.

https://github.com/qemu/qemu/blob/master/docs/about/removed-features.rst#qemu-img-backing-file-without-format-removed-in-61
2023-08-24 09:09:43 +01:00
Felix Bühler
0a2745684e
Merge pull request #239624 from Stunkymonkey/use-optionalString-then
treewide: use optionalString instead of 'then ""'
2023-07-22 13:02:47 +02:00
Felix Buehler
f3719756b5 treewide: use optionalString instead of 'then ""' 2023-06-24 20:19:19 +02:00
Alyssa Ross
64bfa05b36
vmTools: download debs from snapshot URLs
The deb files we want are no longer available in the Debian mirrors,
so we need to download them from the snapshots we download the package
lists from.

This makes it possible to build the os-prober NixOS test again.
2023-06-11 19:13:31 +00:00
superherointj
0eae5c0532
Merge pull request #205156 from yu-re-ka/musl-runinlinuxvm
runInLinuxVM: fix on musl
2023-02-16 12:24:34 -03:00
Nikolay Korotkiy
8cf41cf4ef
Merge pull request #215713 from sikmir/vmtools
vmTools: update debian versions
2023-02-14 23:33:34 +04:00
Felix Buehler
cdb39a86e0 treewide: use optionalString 2023-02-13 21:52:34 +01:00
Nikolay Korotkiy
4ed059d041
vmTools: update debian versions 2023-02-10 21:39:15 +03:00
Artturin
fe1c7a1945 treewide: remove usages of header and stopNest
they're obsolete
2023-01-16 00:08:12 +02:00
Alexander Bich
aaa4244387 vmTools: add ubuntu 22.04 2022-12-26 10:58:52 +00:00
Sandro
9c624f5879
Merge pull request #203117 from sikmir/vmtools
vmTools: update current maintained debian versions
2022-12-20 15:51:50 +01:00
figsoda
ec8cb34358 treewide: fix typos 2022-12-17 19:39:44 -05:00
Yureka
03b2a82ca9 runInLinuxVM: fix on musl 2022-12-08 18:36:59 +01:00
Nikolay Korotkiy
dd1c4ff5fc
vmTools: update current maintained debian versions 2022-11-26 23:53:24 +03:00
Artturin
c1fffdfffb treewide: change some glibc to stdenv.cc.libc 2022-05-27 05:57:43 +03:00
Artturin
0c4d65b21e treewide: stdenv.glibc -> glibc 2022-05-25 15:51:20 +03:00
Alyssa Ross
55b883448e
vmTools.buildRPM: properly derive source name
This fixes e.g. building the rpm of patchelf as in
pkgs/build-support/vm/test.nix.  The glob won't work if there are
multiple spec files but I don't think rpmbuild would work in that case
either.
2021-12-28 13:10:13 +00:00
Alyssa Ross
e0455e1e29
vmTools: fix phases
These gave missing attribute errors.  They should have been written as
strings in ae9337179b.

Fixes: ae9337179b ("vm: deprecate phases")
Fixes: 52b10ee872 ("vmTools refactor: don't use huge `with pkgs;`")
2021-12-28 13:10:11 +00:00
Alyssa Ross
0acf53bdb1
runInLinuxVM: set 9p msize to 128K
This fixes the following warning from QEMU, by using the value that
will be the default in newer kernels[1].

> 9p: degraded performance: a reasonable high msize should be chosen
> on client/guest side (chosen msize is <= 8192). See
> https://wiki.qemu.org/Documentation/9psetup#msize for details.

For a runInLinuxVM derivation I have that does a large amount of
IO[2], this change results in a fairly small but repeatable speed
increase.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9c4d94dc9a64426d2fa0255097a3a84f6ff2eebe
[2]: https://spectrum-os.org/git/spectrum/tree/installer/default.nix?id=06dd70500a9e475d23e3296dddf409d84abf9b9c#n52
2021-12-17 07:52:11 +00:00
Alyssa Ross
9c4c0f89a5
vmTools.runInLinuxVM: create fd symlinks in /dev
These are usually set up by systemd, but there's no systemd in the
VM.  /dev/fd is required for <(...) syntax in bash, and I'm sure lots
of things depend on the stdin/stdout/stderr links as well.
2021-12-08 00:32:29 +00:00
Artturi
c4851c0d71
Revert msize related commits (#147180) 2021-11-24 02:33:53 +02:00
Ryan Burns
2175b157ac treewide: refactor isi686 && isx86_64 -> isx86 2021-11-20 17:50:41 -08:00
Artturin
d1c3a49fdd vmTools: set msize to 16KiB temporarily
hopefully this will reduce the ram usage enough
2021-11-21 01:13:54 +02:00
Artturin
e2ab6321ed vmTools: set msize to 128KiB
500KiB was causing issues https://github.com/NixOS/nixpkgs/pull/142577
2021-11-20 20:49:49 +02:00
Janne Heß
ecf388e90b
vmTools: Make msize larger to silence warning
See https://issues.guix.gnu.org/47225
2021-11-18 21:21:49 +01:00
Christian Kögler
9bf244964d runInLinuxImage: Add missing backing format 2021-10-28 00:05:27 +02:00
Vladimír Čunát
52b10ee872
vmTools refactor: don't use huge with pkgs;
... especially when scoped over hundreds of lines of code.
2021-09-30 21:26:35 +02:00
Robert Hensing
8863a5199d vmTools.createEmptyImage: Add destination parameter 2021-09-29 09:33:14 +02:00
Timothy DeHerrera
895f3956d2
Merge pull request #127933 from rnhmjoj/qemu-restoration
Qemu restoration
2021-09-28 21:35:23 -06:00
Jörg Thalheim
57e69a608a
Merge pull request #109636 from mroi/patch-vmtools
vmTools: fix cross compilation
2021-09-22 00:51:22 +01:00
rnhmjoj
b29c2f97c3
nixos/lib/qemu-flags: rename to qemu-common
The current name is misleading: it doesn't contain cli arguments,
but several constants and utility functions related to qemu.
This commit also removes the use of `with import ...` for clarity.
2021-09-18 16:58:16 +02:00
Felix Buehler
ae9337179b vm: deprecate phases 2021-08-20 23:31:26 +02:00
Jörg Thalheim
eb0034927d
vmTools: update current maintained debian versions
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-05-27 07:33:11 +02:00
Jörg Thalheim
e71c4f4628
vmTools: update current lts versions of ubuntu 2021-05-26 23:12:26 +02:00
Sandro Jäckel
3453b89f4b
lzma: deprecate alias 2021-04-04 19:49:52 +02:00
Michael Roitzsch
e56bddf0df vmTools: fix cross compilation
executables used at build-time should be taken from buildPackages
2021-03-23 13:16:17 +01:00
Pavol Rusnak
90f7338112
treewide: stdenv.lib -> lib 2021-01-24 01:49:49 +01:00
John Ericson
9c213398b3 lib: Clean up how linux and gcc config is specified
Second attempt of 8929989614589ee3acd070a6409b2b9700c92d65; see that
commit for details.

This reverts commit 0bc275e634.
2021-01-23 10:01:28 -05:00
Jonathan Ringer
0bc275e634
Revert "lib: Clean up how linux and gcc config is specified"
This is a stdenv-rebuild, and should not be merged
into master

This reverts commit 8929989614.
2021-01-22 14:07:06 -08:00
John Ericson
8929989614 lib: Clean up how linux and gcc config is specified
The `platform` field is pointless nesting: it's just stuff that happens
to be defined together, and that should be an implementation detail.

This instead makes `linux-kernel` and `gcc` top level fields in platform
configs. They join `rustc` there [all are optional], which was put there
and not in `platform` in anticipation of a change like this.

`linux-kernel.arch` in particular also becomes `linuxArch`, to match the
other `*Arch`es.

The next step after is this to combine the *specific* machines from
`lib.systems.platforms` with `lib.systems.examples`, keeping just the
"multiplatform" ones for defaulting.
2021-01-21 22:44:09 -05:00
aszlig
1152978cda
vm: Remove runInWindowsVM implementation
Originally this was meant to support other Windows versions than just
Windows XP, but before I actually got a chance to implement this I left
the project that I implemented this for.

The code has been broken for years now and I highly doubt anyone is
interested in resurrecting this (including me), so in order to make this
less of a maintenance burden for everybody, let's remove it.

Signed-off-by: aszlig <aszlig@nix.build>
2020-12-17 07:03:36 +01:00
Graham Christensen
bc49a0815a
utillinux: rename to util-linux 2020-11-24 12:42:06 -05:00
Florian Klink
8a388c8296
Merge pull request #82258 from erikarvstedt/fix-xchg-caching
fix inconsistent caching of VM xchg dirs
2020-06-01 22:34:48 +02:00
Erik Arvstedt
d85dc4f690
qemu-vm: fix inconsistent caching of xchg dirs
xchg is advertised as a bidirectional exchange dir, but file content
transfer from host to VM fails due to caching:
If a file is read in the VM and then modified on the host, subsequent
re-reads in the VM can yield old, cached data.
This is caused by the use of 9p's cache=loose mode that is explicitly
meant for read-only mounts.

9p doesn't provide any suitable cache modes, so fix this by disabling
caching.

Also, remove a now unnecessary sync in the test driver.
2020-06-01 21:55:33 +02:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00