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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
 
= Creating VMs
:page-parent: Getting Started

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

== Configuration

Each VM is configured using a directory under svc/data/ on the
xref:user-partition.adoc[user partition].  The name of the directory
determines the name of the VM.

The directory can contain the following files:

vmlinux:: An uncompressed Linux kernel image for the VM to boot.
*Required.*

rootfs.ext4:: A disk image that will be provided to the guest as a
virtio-blk device.  *Required.*

providers/net:: A directory containing a file named for each VM that
should provide networking to this VM.  The contents of these files are
ignored.

=== Example

A configuration directory for a VM called "appvm-lynx" dedicated to
the https://lynx.invisible-island.net[Lynx] web browser, set up to
have networking provided by a VM named "netvm" would look like this:

----
appvm-lynx
├── providers/
│   └── net/
│       └── netvm
├── rootfs.ext4
└── vmlinux*
----

== Devices

The virtual devices described here are always created for Spectrum
VMs.  It's important for guests to recognize these devices and use
them in the intended way so that they integrate into the rest of the
system.

=== Logging

Every VM has a serial console that is connected to the host system's
logging infrastructure.  The console is write-only -- there will never
be any input to read from the console.

=== User interface

Every VM has a virtio-console device to use to interact with the user
of the Spectrum system.

=== Networking

The Spectrum host system can create network connections between VMs.
These take the form of virtio-net devices.  Guests must support the
VIRTIO_NET_F_MAC feature.

A guest can distinguish between virtual inter-guest network
connections and hardware network connections through the MAC address
of the corresponding network interface: guest network interfaces for
inter-guest networking have the OUI `0A:B3:EC`.

Connections to *network provider VMs* have the IP address to use
encoded in the client interface's MAC address.  The client guest
should configure an IPv4 address in `100.64.0.0/16`, where the final
two octets of the IP address are the final two octets of the
interface's MAC address.  For example, an application VM where a
network interface named `eth0` has the MAC address `0A:B3:EC:00:A5:46`
should configure `eth0` with the IPv4 address `100.64.165.70` (because
`A5` in hexadecimal is `165` in decimal, and `46` in hexadecimal is
`70` in decimal).
debug log:

solving e06be85 ...
found e06be85 in https://spectrum-os.org/lists/archives/spectrum-devel/20220906135533.576642-1-evgeniia.nikolaenko@unikie.com/ ||
	https://spectrum-os.org/lists/archives/spectrum-devel/20221028110558.205351-1-evgeniia.nikolaenko@unikie.com/
found d967098 in https://spectrum-os.org/git/spectrum
preparing index
index prepared:
100644 d96709826aea512725e78d8bc62a87060c713b71	Documentation/creating-vms.adoc

applying [1/2] https://spectrum-os.org/lists/archives/spectrum-devel/20220906135533.576642-1-evgeniia.nikolaenko@unikie.com/
diff --git a/Documentation/creating-vms.adoc b/Documentation/getting-started/creating-vms.adoc
similarity index 98%
rename from Documentation/creating-vms.adoc
rename to Documentation/getting-started/creating-vms.adoc
index d967098..e06be85 100644

Checking patch Documentation/creating-vms.adoc => Documentation/getting-started/creating-vms.adoc...
Applied patch Documentation/creating-vms.adoc => Documentation/getting-started/creating-vms.adoc cleanly.

skipping https://spectrum-os.org/lists/archives/spectrum-devel/20221028110558.205351-1-evgeniia.nikolaenko@unikie.com/ for e06be85
index at:
100644 e06be8585acaf98f20e0232550bec6981096ccab	Documentation/getting-started/creating-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).