CLI
The following list is not exhaustive, and may be out of date.
The most up to date reference is always the code itself,
as well as the generated CLI help (via cargo run -- --help).
--processors <COUNT>: The number of processors. Defaults to 1.--memory <SIZE>: The VM's memory size. Defaults to 1GB.--hv: Exposes Hyper-V enlightenments and VMBus support.--uefi: Boot usingmu_msvmUEFI--uefi-firmware <FILE>: Path to the UEFI firmware file (MSVM.fd). When--uefiis specified, this option is required only if you do not set the environment variableOPENVMM_UEFI_FIRMWARE(or the architecture-specific variantsX86_64_OPENVMM_UEFI_FIRMWARE, orAARCH64_OPENVMM_UEFI_FIRMWARE). If omitted, the default is read fromOPENVMM_UEFI_FIRMWAREfirst, then falls back to the architecture-specific variables.--pcat: Boot using the Microsoft Hyper-V PCAT BIOS--disk file:<DISK>: Exposes a single disk over VMBus. You must also pass--hv. TheDISKargument can be:- A flat binary disk image
- A VHD file with an extension of .vhd (Windows host only)
- A VHDX file with an extension of .vhdx (Windows host only)
--private-memory: Use private anonymous memory for guest RAM instead of shared file-backed sections.--thp: Enable Transparent Huge Pages for guest RAM (Linux only). Requires--private-memory.--nic: Exposes a NIC using the Consomme user-mode NAT.--gfx: Enable a graphical console over VNC (see below)--virtio-9p: Expose a virtio 9p file system. Uses the formattag,root_path, e.g.myfs,C:\\. The file system can be mounted in a Linux guest usingmount -t 9p -o trans=virtio tag /mnt/point. You can specify this argument multiple times to create multiple file systems.--virtio-fs: Expose a virtio-fs file system. The format is the same as--virtio-9p. The file system can be mounted in a Linux guest usingmount -t virtiofs tag /mnt/point. You can specify this argument multiple times to create multiple file systems.--virtio-rng: Add a virtio entropy (RNG) device, exposing/dev/hwrngin the Linux guest. The guest kernel must haveCONFIG_HW_RANDOM_VIRTIOenabled.--virtio-rng-bus <BUS>: Select the bus for the virtio-rng device (auto,mmio,pci,vpci). Defaults toauto.
And serial devices can each be configured to be relayed to different endpoints:
--com1/com2 <none|console|stderr|listen=PATH|listen=tcp:IP:PORT>none: Serial output is dropped.console: Serial input is read and output is written to the console.stderr: Serial output is written to stderr.listen=PATH: A named pipe (on Windows) or Unix socket (on Linux) is set up to listen on the given path. Serial input and output is relayed to this pipe/socket.listen=tcp:IP:PORT: As withlisten=PATH, but listen for TCP connections on the given IP address and port. Typically IP will be 127.0.0.1, to restrict connections to the current host.