vmspawn: Add --user/--system and support user session machined registration

The UX of registering with the user session machined
instance is much better as there won't be an authorization
prompt. To make that available for users, let's add --user
and --system switches for vmspawn. For backwards compat, we'll
still try to register with the system machined instance if the
user machined instance is not available.
This commit is contained in:
Daan De Meyer
2026-01-02 08:49:36 +09:00
committed by Yu Watanabe
parent 2ff1a84b19
commit 4e805ec152
5 changed files with 89 additions and 25 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ _systemd_vmspawn() {
local i verb comps
local -A OPTS=(
[STANDALONE]='-h --help --version -q --quiet --no-pager -n --network-tap --network-user-mode'
[STANDALONE]='-h --help --version -q --quiet --no-pager -n --network-tap --network-user-mode --user --system'
[PATH]='-D --directory -i --image --linux --initrd --extra-drive --forward-journal'
[BOOL]='--kvm --vsock --tpm --secure-boot --discard-disk --register --pass-ssh-key'
[FIRMWARE]='--firmware'