diff --git a/README.md b/README.md index e5b42445..62ada2eb 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,17 @@ # muvm - run programs from your system in a microVM -`muvm` allows you to run arbitrary programs from your system in a microVM. It's comprised of three small programs: +`muvm` allows you to run arbitrary programs from your system in a microVM. It's comprised of 2 small programs: - `muvm`: links against [libkrun](https://github.com/containers/libkrun) to create the microVM. -- `muvm-guest`: acts as an entrypoint inside the microVM to set up the environment for running your program. - -- `muvm-server`: a server listening for requests to run additional programs. This allows you to run multiple graphical applications inside the same microVM. +- `muvm-guest`: acts as an entrypoint inside the microVM to set up the environment for running your program. It spawns a server listening for requests to run additional programs. This allows you to run multiple graphical applications inside the same microVM. ## Using ``` sh -Usage: muvm [-c=CPU_LIST]... [-e=ENV]... [--mem=MEM] [--vram=VRAM] [--passt-socket=PATH] [-p= -SERVER_PORT] [-f=FEX_IMAGE]... COMMAND [COMMAND_ARGS]... +Usage: muvm [-c=CPU_LIST]... [-e=ENV]... [--mem=MEM] [--vram=VRAM] [--passt-socket=PATH] [-f= +FEX_IMAGE]... [-m] [-i] [-t] [--privileged] [-p=<[[IP:][HOST_PORT]:]GUEST_PORT[/PROTOCOL]>]... [ +--emu=EMU] COMMAND [COMMAND_ARGS]... Available positional items: COMMAND the command you want to execute in the vm @@ -34,19 +33,27 @@ Available options: Machine Monitor) will attempt to return as many pages as possible to the host. [default: 80% of total RAM] - --vram=VRAM The amount of Video RAM, in MiB, that will be available to this - microVM. - The memory configured for the microVM will not be reserved - immediately. Instead, it will be provided as the guest demands - it, and will be returned to the host once the guest releases - the underlying resources. - [default: same as the total amount of RAM in the system] + --vram=VRAM The amount of Video RAM, in MiB, that will reported by userspace in + this microVM. + The userspace drivers will report this amount as heap size + to the clients running in the microVM. + [default: 50% of total RAM] --passt-socket=PATH Instead of starting passt, connect to passt socket at PATH - -p, --server-port=SERVER_PORT Set the port to be used in server mode - [default: 3334] -f, --fex-image=FEX_IMAGE Adds an erofs file to be mounted as a FEX rootfs. May be specified multiple times. First the base image, then overlays in order. + -m, --merged-rootfs Use merged rootfs for FEX (experimental) + -i, --interactive Attach to the command's stdin/out after starting it + -t, --tty Allocate a tty for the command + --privileged Run the command as root inside the vm. + This notably does not allow root access to the host fs. + -p, --publish=<[[IP:][HOST_PORT]:]GUEST_PORT[/PROTOCOL]> + Publish a guest’s port, or range of ports, to the host. + The syntax is similar to podman/docker. + --emu=EMU Which emulator to use for running x86_64 binaries. + Valid options are "box" and "fex". If this argument is not + present, muvm will try to use FEX, falling back to Box if it + can't be found. -h, --help Prints help information ``` diff --git a/crates/muvm/src/monitor.rs b/crates/muvm/src/monitor.rs index 836acd5f..316ecb20 100644 --- a/crates/muvm/src/monitor.rs +++ b/crates/muvm/src/monitor.rs @@ -39,7 +39,7 @@ pub fn spawn_monitor() { fn set_guest_pressure(pressure: GuestPressure) -> Result<()> { if pressure == GuestPressure::Critical { debug!("requesting the guest to drop its caches"); - // This is a fake command that tells muvm-server to write to "/proc/sys/vm/drop_caches" + // This is a fake command that tells `muvm-guest` server to write to "/proc/sys/vm/drop_caches" let command = PathBuf::from("/muvmdropcaches"); let command_args = vec![]; let env = HashMap::new();