patches and low-level development discussion
 help / color / mirror / code / Atom feed
bbfa913e89884932e268937a40364d9164603967 blob 860 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
= Managing VMs with Nix
:page-parent: How-to Guides

// SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
// SPDX-License-Identifier: GFDL-1.3-no-invariants-or-later OR CC-BY-SA-4.0

VMs in a Spectrum system can optionally be managed with
https://nixos.org/[Nix], a functional package manager.

To create a VM with Nix:

. Define your VM in vm-config/vms.nix on the
xref:user-partition.adoc[user data partition].
+
TIP: Supported settings for VM configuration are documented in
xref:creating-vms.adoc[Creating VMs].  A Nix helper function called
https://spectrum-os.org/git/spectrum/tree/vm-lib/make-vm.nix[`makeVm`]
is provided for creating VM configuration directories with Nix.
. Start the appvm-nix VM (provided by default), and run `vm-rebuild
switch` in its console.
. Reboot the Spectrum host system.  (In future, this step will not be
required.)
debug log:

solving bbfa913 ...
found bbfa913 in https://spectrum-os.org/lists/archives/spectrum-devel/20221010232909.1953738-23-hi@alyssa.is/

applying [1/1] https://spectrum-os.org/lists/archives/spectrum-devel/20221010232909.1953738-23-hi@alyssa.is/
diff --git a/Documentation/nix-vms.adoc b/Documentation/nix-vms.adoc
new file mode 100644
index 0000000..bbfa913

Checking patch Documentation/nix-vms.adoc...
Applied patch Documentation/nix-vms.adoc cleanly.

index at:
100644 bbfa913e89884932e268937a40364d9164603967	Documentation/nix-vms.adoc

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).