Skip to content

Commit d6ebdb6

Browse files
author
Noah Meyerhans
committed
Move most of the firectl docs to a dedicated README
1 parent fa29a4c commit d6ebdb6

File tree

2 files changed

+56
-22
lines changed

2 files changed

+56
-22
lines changed

README.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,8 @@ additional flags to the Go compiler via the `EXTRAGOARGS` make variable.
2525
Tools
2626
---
2727

28-
There's a basic command-line tool, built as `cmd/firectl/firectl` that lets you
29-
run arbitrary Firecracker MicroVMs via the command line. This lets you run a
30-
fully functional Firecracker MicroVM, including console access, read/write
31-
access to filesystems, and network connectivity.
32-
33-
```
34-
Usage of ./cmd/firectl/firectl:
35-
--firecracker-binary= Path to Firecracker binary
36-
--firecracker-console= Console type (stdio|xterm|none) (default: stdio)
37-
--kernel= Path to the kernel image (default: ./vmlinux)
38-
--kernel-opts= Kernel commandline (default: ro console=ttyS0 noapic reboot=k panic=1 pci=off nomodules)
39-
--root-drive= Path to root disk image
40-
--add-drive= Path to additional drive, suffixed with :ro or :rw, can be specified multiple times
41-
--tap-device= NIC info, specified as DEVICE:MAC
42-
--vmm-log-fifo= FIFO for Firecracker logs
43-
--log-level= vmm log level (default: Debug)
44-
--metrics-fifo= FIFO for Firecracker metrics
45-
-d, --debug Enable debug output
46-
-h, --help Show usage
47-
```
48-
49-
`$ ./cmd/firectl/firectl --firecracker-binary=./firecracker-0.10.1 --firecracker-console=stdio --root-drive=openwrt-x86-64-rootfs-squashfs.img --tap-device=vmtap33/9a:e4:f6:b0:2d:f3 --add-drive drive-2.img:ro -d --vmm-log-fifo=/tmp/fc-logs.fifo --metrics-fifo=/tmp/fc-metrics`
28+
There's a [firectl](cmd/firectl) tool that provides a simple command-line
29+
interface to launching a firecracker VM.
5030

5131
Network configuration
5232
---

cmd/firectl/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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

Comments
 (0)