Skip to content

Commit

Permalink
Rename various [Runtime] options and rename mkosi qemu to mkosi vm
Browse files Browse the repository at this point in the history
- Let's get rid of the "Qemu" prefix for runtime options as they apply
  both to the qemu and vmspawn verbs.
- Let's rename QemuGui= to Console= and make it take all the options
  that are accepted by vmspawn's --console= option.
- Let's rename the various runtime options to the corresponding vmspawn
  option where applicable.
- Let's rename mkosi qemu to mkosi vm as well while we're at it.
  • Loading branch information
DaanDeMeyer committed Dec 27, 2024
1 parent 9ca1f93 commit 3401176
Show file tree
Hide file tree
Showing 14 changed files with 388 additions and 355 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
Environment=SYSTEMD_REPART_MKFS_OPTIONS_EROFS="--quiet"
[Runtime]
QemuKvm=yes
KVM=yes
EOF
# TODO: Remove once all distros have recent enough systemd that knows systemd.default_device_timeout_sec.
Expand Down
2 changes: 1 addition & 1 deletion docs/distribution-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ used:
another existing distribution, update the `[Match]` blocks for the
existing distribution to also match against the new distribution. To
test whether all necessary changes were made, you can run
`mkosi -d <distribution> --tools-tree -t disk -f qemu`.
`mkosi -d <distribution> --tools-tree -t disk -f vm`.
2 changes: 1 addition & 1 deletion mkosi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ KernelModulesInitrdExclude=.*
KernelModulesInitrdInclude=default

[Runtime]
QemuMem=4G
RAM=4G
2 changes: 1 addition & 1 deletion mkosi.conf.d/15-memory.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Format=|uki
Format=|cpio

[Runtime]
QemuMem=8G
RAM=8G
3 changes: 2 additions & 1 deletion mkosi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2623,7 +2623,7 @@ def check_tools(config: Config, verb: Verb) -> None:
if verb == Verb.boot:
check_systemd_tool(config, "systemd-nspawn", version="254", reason="boot images")

if verb == Verb.qemu and config.vmm == Vmm.vmspawn:
if verb in (Verb.vm, Verb.qemu) and config.vmm == Vmm.vmspawn:
check_systemd_tool(config, "systemd-vmspawn", version="256", reason="boot images with vmspawn")

if verb == Verb.sysupdate:
Expand Down Expand Up @@ -4809,6 +4809,7 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None:
{
Verb.shell: run_shell,
Verb.boot: run_shell,
Verb.vm: run_vm,
Verb.qemu: run_vm,
Verb.serve: run_serve,
Verb.burn: run_burn,
Expand Down
Loading

0 comments on commit 3401176

Please sign in to comment.