Linux command
smolvm 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Run a command
smolvm machine run [command]
Start an interactive shell
smolvm machine run -it
Create
smolvm machine create [name]
Create a VM
smolvm machine create [name] --net
Execute a command
smolvm machine exec [name] [command]
Start
smolvm machine start [name]
Stop
smolvm machine stop [name]
Pack
smolvm pack create [name] -o [output]
说明
smolvm is a CLI tool for building and running portable, lightweight, self-contained virtual machines with sub-second cold starts and elastic memory usage. Each workload gets real hardware isolation — its own kernel running on Hypervisor.framework (macOS) or KVM (Linux). VMs can be packed into single .smolmachine files that rehydrate on any supported platform. All dependencies are pre-baked with no install step or runtime downloads required, booting in under 200ms. Memory is elastic via virtio balloon — the host only commits what the guest actually uses and reclaims the rest automatically. Network access is opt-in and disabled by default, providing a strong security boundary for sandboxing untrusted code. Host filesystem, network, and credentials are separated by a hypervisor boundary.
参数
- machine run _command_
- Execute a command in an ephemeral VM that is cleaned up after exit
- machine run -it
- Start an interactive shell in an ephemeral VM
- machine create _name_ _--net_ _--image image_ _--cpus n_ _--mem size_
- Create a persistent virtual machine
- machine start _name_
- Boot a stopped VM
- machine stop _name_
- Halt a running VM
- machine exec _name_ _command_
- Run a command in an existing VM
- pack create _name_ _-o path_ _-s smolfile_
- Bundle a workload into a portable, self-contained executable
- --net
- Enable network access (disabled by default; TCP/UDP only, no ICMP)
- --image _image_
- Specify the base Linux image
- --cpus _n_
- Override vCPU count (default: 4)
- --mem _size_
- Override RAM allocation (default: 8 GiB)
- --ssh-agent
- Forward host SSH keys into the VM
- --allow-host _domain_
- Restrict egress to specific domains
- -o _path_
- Output path for packed binaries
- -s _smolfile_
- Use a Smolfile configuration
FAQ
What is the smolvm command used for?
smolvm is a CLI tool for building and running portable, lightweight, self-contained virtual machines with sub-second cold starts and elastic memory usage. Each workload gets real hardware isolation — its own kernel running on Hypervisor.framework (macOS) or KVM (Linux). VMs can be packed into single .smolmachine files that rehydrate on any supported platform. All dependencies are pre-baked with no install step or runtime downloads required, booting in under 200ms. Memory is elastic via virtio balloon — the host only commits what the guest actually uses and reclaims the rest automatically. Network access is opt-in and disabled by default, providing a strong security boundary for sandboxing untrusted code. Host filesystem, network, and credentials are separated by a hypervisor boundary.
How do I run a basic smolvm example?
Run `smolvm machine run [command]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does machine run _command_ do in smolvm?
Execute a command in an ephemeral VM that is cleaned up after exit