core vm¶
LinuxKit VM management.
LinuxKit VMs are lightweight, immutable VMs built from YAML templates. They run using qemu or hyperkit depending on your system.
Usage¶
Commands¶
| Command | Description |
|---|---|
run |
Run a LinuxKit image or template |
ps |
List running VMs |
stop |
Stop a VM |
logs |
View VM logs |
exec |
Execute command in VM |
| templates | Manage LinuxKit templates |
vm run¶
Run a LinuxKit image or build from a template.
Supported image formats: .iso, .qcow2, .vmdk, .raw
Flags¶
| Flag | Description |
|---|---|
--template |
Run from a LinuxKit template (build + run) |
--var |
Template variable in KEY=VALUE format (repeatable) |
--name |
Name for the container |
--memory |
Memory in MB (default: 1024) |
--cpus |
CPU count (default: 1) |
--ssh-port |
SSH port for exec commands (default: 2222) |
-d |
Run in detached mode (background) |
Examples¶
# Run from image file
core vm run image.iso
# Run detached with more resources
core vm run -d image.qcow2 --memory 2048 --cpus 4
# Run from template
core vm run --template core-dev --var SSH_KEY="ssh-rsa AAAA..."
# Multiple template variables
core vm run --template server-php --var SSH_KEY="..." --var DOMAIN=example.com
vm ps¶
List running VMs.
Flags¶
| Flag | Description |
|---|---|
-a |
Show all (including stopped) |
Output¶
vm stop¶
Stop a running VM by ID or name.
Supports partial ID matching.
Examples¶
vm logs¶
View VM logs.
Flags¶
| Flag | Description |
|---|---|
-f |
Follow log output |
Examples¶
vm exec¶
Execute a command in a running VM via SSH.