> systemd-vmspawn [OPTION…] [ARGUMENTS…]
Spawn a command or OS in a virtual machine.
Options:
-h --help Show this help
--version Show package version
-q --quiet Do not show status information
--no-pager Do not start a pager
--no-ask-password Do not prompt for password
--system Run in the system service manager scope
--user Run in the user service manager scope
Image:
-D --directory=PATH Root directory for the VM
-x --ephemeral Run VM with snapshot of the disk or
directory
-i --image=FILE|DEVICE Root file system disk image or device
for the VM
--image-format=FORMAT Specify disk image format (raw, qcow2;
default: raw)
--image-disk-type=TYPE Specify disk type (virtio-blk,
virtio-scsi, nvme, scsi-cd; default:
virtio-blk)
--discard-disk=BOOL Control processing of discard requests
-G --grow-image=BYTES Grow image file to specified size in
bytes
Host Configuration:
--cpus=CPUS Configure number of CPUs in guest
--ram=BYTES[:MAXBYTES[:SLOTS]] Configure guest's RAM size (and
max/slots for hotplug)
--kvm=BOOL Enable use of KVM
--vsock=BOOL Override autodetection of VSOCK support
--vsock-cid=CID Specify the CID to use for the guest's
VSOCK support
--tpm=BOOL Enable use of a virtual TPM
--tpm-state=off|auto|PATH Where to store TPM state
--efi-nvram-template=PATH Set the path to the EFI NVRAM template
file to use
--efi-nvram-state=off|auto|PATH Where to store EFI Variable NVRAM state
--secure-boot=BOOL|auto Enable searching for firmware supporting
SecureBoot
--firmware=auto|uefi|bios|none|PATH|list|describe Select firmware to use, or a firmware
definition file (or list/describe
available)
--firmware-features=FEATURE,...|list Require/exclude specific firmware
features
--coco=no|sev-snp|tdx Run the guest as a confidential VM
Networking:
-n --network-tap Create a TAP device for networking
--network-user-mode Use user mode networking
Execution:
--linux=PATH Specify the linux kernel for direct
kernel boot
--initrd=PATH Specify the initrd for direct kernel
boot
-s --smbios11=STRING Pass an arbitrary SMBIOS Type #11 string
to the VM
--notify-ready=BOOL Wait for ready notification from the VM
System Identity:
-M --machine=NAME Set the machine name for the VM
--uuid=UUID Set a specific machine UUID for the VM
Properties:
-S --slice=SLICE Place the VM in the specified slice
--property=NAME=VALUE Set scope unit property
--register=BOOLEAN Register VM as machine
--keep-unit Do not register a scope for the machine,
reuse the service unit vmspawn is
running in
User Namespacing:
--private-users=UIDBASE[:NUIDS] Configure the UID/GID range to map into
the virtiofsd namespace
Mounts:
--bind=SOURCE[:TARGET] Mount a file or directory from the host
into the VM
--bind-ro=SOURCE[:TARGET] Mount a file or directory, but read-only
--extra-drive=[FORMAT:][DISKTYPE:]PATH Adds an additional disk to the VM
--bind-volume=PROVIDER:VOLUME[:CONFIG][:KEY=VALUE,...] Acquire a storage volume from a
StorageProvider and attach it to the VM
--bind-user=NAME Bind user from host to virtual machine
--bind-user-shell=BOOL|PATH Configure the shell to use for
--bind-user= users
--bind-user-group=GROUP Add an auxiliary group to --bind-user=
users
Logging:
--forward-journal=FILE|DIR Forward the VM's journal to the host
--forward-journal-max-use=BYTES Maximum disk space for forwarded journal
--forward-journal-keep-free=BYTES Minimum disk space to keep free
--forward-journal-max-file-size=BYTES Maximum size of individual journal files
--forward-journal-max-files=N Maximum number of journal files to keep
SSH:
--pass-ssh-key=BOOL Create an SSH key to access the VM
--ssh-key-type=TYPE Choose what type of SSH key to pass
Input/Output:
--console=MODE Console mode (interactive, native, gui,
read-only or headless)
--console-transport=TRANSPORT Console transport (virtio or serial)
--background=COLOR Set ANSI color for background
Credentials:
--set-credential=ID:VALUE Pass a credential with literal value to
the VM
--load-credential=ID:PATH Load credential for the VM from file or
AF_UNIX stream socket
See the systemd-vmspawn(1) man page for details.
Options (58)
| Option | Description | Source |
|---|---|---|
-h --help | Show this help | help |
--version | Show package version | help |
-q --quiet | Do not show status information | help |
--no-pager | Do not start a pager | help |
--no-ask-password | Do not prompt for password | help |
--system | Run in the system service manager scope | help |
--user | Run in the user service manager scope | help |
-D --directory=PATH | Root directory for the VM | help |
-x --ephemeral | Run VM with snapshot of the disk or directory | help |
-i --image=FILE|DEVICE | Root file system disk image or device for the VM | help |
--image-format FORMAT | Specify disk image format (raw, qcow2; | help |
--image-disk-type TYPE | Specify disk type (virtio-blk, virtio-scsi, nvme, scsi-cd; | help |
--discard-disk BOOL | Control processing of discard requests | help |
-G --grow-image=BYTES | Grow image file to specified size in bytes | help |
--cpus CPUS | Configure number of CPUs in guest | help |
--ram BYTES[:MAXBYTES[:SLOTS | Configure guest's RAM size (and max/slots for hotplug) | help |
--kvm BOOL | Enable use of KVM | help |
--vsock BOOL | Override autodetection of VSOCK support | help |
--vsock-cid CID | Specify the CID to use for the guest's VSOCK support | help |
--tpm BOOL | Enable use of a virtual TPM | help |
--tpm-state off|auto|PATH | Where to store TPM state | help |
--efi-nvram-template PATH | Set the path to the EFI NVRAM template file to use | help |
--efi-nvram-state off|auto|PATH | Where to store EFI Variable NVRAM state | help |
--secure-boot BOOL|auto | Enable searching for firmware supporting SecureBoot | help |
--firmware auto|uefi|bios|none|PATH|list|describe | Select firmware to use, or a firmware definition file (or list/describe available) | help |
--firmware-features FEATURE | Require/exclude specific firmware features | help |
--coco no|sev-snp|tdx | Run the guest as a confidential VM | help |
-n --network-tap | Create a TAP device for networking | help |
--network-user-mode | Use user mode networking | help |
--linux PATH | Specify the linux kernel for direct kernel boot | help |
--initrd PATH | Specify the initrd for direct kernel boot | help |
-s --smbios11=STRING | Pass an arbitrary SMBIOS Type #11 string to the VM | help |
--notify-ready BOOL | Wait for ready notification from the VM | help |
-M --machine=NAME | Set the machine name for the VM | help |
--uuid UUID | Set a specific machine UUID for the VM | help |
-S --slice=SLICE | Place the VM in the specified slice | help |
--property NAME=VALUE | Set scope unit property | help |
--register BOOLEAN | Register VM as machine | help |
--keep-unit | Do not register a scope for the machine, reuse the service unit vmspawn is running in | help |
--private-users UIDBASE[:NUIDS | Configure the UID/GID range to map into the virtiofsd namespace | help |
--bind SOURCE[:TARGET | Mount a file or directory from the host into the VM | help |
--bind-ro SOURCE[:TARGET | Mount a file or directory, but read-only | help |
--extra-drive FORMAT:][DISKTYPE:]PATH | Adds an additional disk to the VM | help |
--bind-user NAME | Bind user from host to virtual machine | help |
--bind-user-shell BOOL|PATH | Configure the shell to use for | help |
--bind-user-group GROUP | Add an auxiliary group to --bind-user= users | help |
--forward-journal FILE|DIR | Forward the VM's journal to the host | help |
--forward-journal-max-use BYTES | Maximum disk space for forwarded journal | help |
--forward-journal-keep-free BYTES | Minimum disk space to keep free | help |
--forward-journal-max-file-size BYTES | Maximum size of individual journal files | help |
--forward-journal-max-files N | Maximum number of journal files to keep | help |
--pass-ssh-key BOOL | Create an SSH key to access the VM | help |
--ssh-key-type TYPE | Choose what type of SSH key to pass | help |
--console MODE | Console mode (interactive, native, gui, read-only or headless) | help |
--console-transport TRANSPORT | Console transport (virtio or serial) | help |
--background COLOR | Set ANSI color for background | help |
--set-credential ID:VALUE | Pass a credential with literal value to the VM | help |
--load-credential ID:PATH | Load credential for the VM from file or AF_UNIX stream socket | help |