systemd-vmspawnsystemdsystemd-vmspawn1systemd-vmspawnSpawn an OS in a virtual machine.systemd-vmspawnOPTIONSARGSDescriptionsystemd-vmspawn may be used to start a virtual machine from an OS image. In many ways it is similar to systemd-nspawn1, but it
launches a full virtual machine instead of using namespaces.OptionsThe arguments are passed straight through to QEMU, extending its command line arguments.The following options are understood:Image OptionsRoot file system disk image (or device node) for the virtual machine.Host ConfigurationSMPConfigures the number of CPUs to start the virtual machine with.Defaults to 1.MEMConfigures the amount of memory to start the virtual machine with.Defaults to 2G.Configure whether to use KVM.If the option is not specified KVM support will be detected automatically.
If yes is specified KVM is always used, and vice versa if no is set KVM is never used.Start QEMU in graphical mode.Configure whether to search for firmware which supports secure boot.If the option is not specified the first firmware which is detected will be used.
If the option is set to yes then the first firmware with secure boot support will be selected.
If no is specified then the first firmware without secure boot will be selected.CredentialsID:PATHID:VALUEPass a credential to the container. These two options correspond to the
LoadCredential= and SetCredential= settings in unit files. See
systemd.exec5 for
details about these concepts, as well as the syntax of the option's arguments.In order to embed binary data into the credential data for ,
use C-style escaping (i.e. \n to embed a newline, or \x00 to
embed a NUL byte). Note that the invoking shell might already apply unescaping
once, hence this might require double escaping!.OtherExamplesRun an Arch Linux VM image generated by mkosi# mkosi -d arch -p systemd -p linux --autologin -o image.raw -f build
# systemd-vmspawn --image=image.rawExit statusIf an error occurred the value errno is propagated to the return code.
Otherwise EXIT_SUCCESS is returned.See Alsosystemd1,
mkosi1,