|
| 1 | +firectl |
| 2 | +=== |
| 3 | + |
| 4 | +There's a basic command-line tool, built as `cmd/firectl/firectl` that lets you |
| 5 | +run arbitrary Firecracker MicroVMs via the command line. This lets you run a |
| 6 | +fully functional Firecracker MicroVM, including console access, read/write |
| 7 | +access to filesystems, and network connectivity. |
| 8 | + |
| 9 | +Usage |
| 10 | +--- |
| 11 | + |
| 12 | +``` |
| 13 | +Usage: |
| 14 | + firectl |
| 15 | +
|
| 16 | +Application Options: |
| 17 | + --firecracker-binary= Path to firecracker binary |
| 18 | + --firecracker-console= Console type (stdio|xterm|none) (default: stdio) |
| 19 | + --kernel= Path to the kernel image (default: ./vmlinux) |
| 20 | + --kernel-opts= Kernel commandline (default: ro console=ttyS0 noapic reboot=k panic=1 pci=off nomodules) |
| 21 | + --root-drive= Path to root disk image |
| 22 | + --root-partition= Root partition UUID |
| 23 | + --add-drive= Path to additional drive, suffixed with :ro or :rw, can be specified multiple times |
| 24 | + --tap-device= NIC info, specified as DEVICE/MAC |
| 25 | + --vsock-device= Vsock interface, specified as PATH:CID. Multiple OK |
| 26 | + --vmm-log-fifo= FIFO for firecracker logs |
| 27 | + --log-level= vmm log level (default: Debug) |
| 28 | + --metrics-fifo= FIFO for firecracker metrics |
| 29 | + -t, --disable-hyperthreading Disable CPU Hyperthreading |
| 30 | + -c, --ncpus= Number of CPUs (default: 1) |
| 31 | + --cpu-template= Firecracker CPU Template (C3 or T2) |
| 32 | + -m, --memory= VM memory, in MiB (default: 512) |
| 33 | + --metadata= Firecracker Meatadata for MMDS (json) |
| 34 | + -d, --debug Enable debug output |
| 35 | + -h, --help Show usage |
| 36 | +``` |
| 37 | + |
| 38 | +Example |
| 39 | +--- |
| 40 | + |
| 41 | +``` |
| 42 | +./cmd/firectl/firectl \ |
| 43 | + --firecracker-binary=/usr/local/bin/firecracker \ |
| 44 | + --kernel=/home/user/bin/vmlinux \ |
| 45 | + --root-drive=/images/image-debootstrap.img -t \ |
| 46 | + --cpu-template=T2 \ |
| 47 | + --vmm-log-fifo=/tmp/fc-logs.fifo \ |
| 48 | + --metrics-fifo=/tmp/fc-metrics.fifo \ |
| 49 | + --kernel-opts="console=ttyS0 noapic reboot=k panic=1 pci=off nomodules rw init=/sbin/init" \ |
| 50 | + --firecracker-console=stdio \ |
| 51 | + --vsock-device=root:3 \ |
| 52 | + --metadata='{"foo":"bar"}' |
| 53 | +``` |
| 54 | + |
0 commit comments