You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-24Lines changed: 12 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,6 @@ Firecracker consists of a single micro Virtual Machine Manager binary that will
11
11
* Add memory to the microVM.
12
12
* Add one or more network interfaces to the microVM.
13
13
* Add one or more read/write disks (block devices) to the microVM.
14
-
* Add one or more vSockets to the microVM.
15
14
* Start the microVM using a given kernel image and root file system.
16
15
* Stop the microVM.
17
16
@@ -21,7 +20,6 @@ Firecracker consists of a single micro Virtual Machine Manager binary that will
21
20
* Emulated keyboard (i8042) and serial console (UART). The microVM serial console input and output are connected to those of the Firecracker process (this allows direct console access to the guest OS).
22
21
* The capability of mapping an existing host tun-tap device as a virtIO/net device into the microVM.
23
22
* The capability of mapping an existing host file as a virtIO/block device into the microVM.
24
-
* The capability of creating a virtIO/vsock between the host and the microVM.
25
23
* Default demand fault paging & CPU oversubscription.
26
24
27
25
## Limits and Performance
@@ -47,21 +45,19 @@ Firecracker expects network interfaces and drives to be created beforehand and p
47
45
48
46
## Select the Guest Kernel and RootFS
49
47
To run microVMs with Firecracker, you will need to have:
50
-
* a guest kernel image that boots and runs with Firecracker's minimal/VirtIO device model, and
51
-
* a guest root file system that boots with that kernel.
52
-
* The guest RootFS can be an image file or drive.
48
+
* a guest kernel image that boots and runs with Firecracker's minimal/VirtIO device model
49
+
* a guest root file system that boots with that kernel (can be an image file or drive).
53
50
54
51
## Runtime Dependencies
55
-
* Firecracker needs rw access to `/dev/kvm`. You can grant these rights, e.g., to tall users, with: `sudo chmod a+rw /dev/kvm`
56
-
* If you want to use vsocks between the Firecracker guest and host, Firecracker will need to be run with sudo rights.
52
+
* Firecracker needs rw access to `/dev/kvm`. You can grant these rights, e.g., to all users, with: `sudo chmod a+rw /dev/kvm`.
57
53
58
54
## Start Firecracker & the Micro VM
59
55
60
-
The python-based toy example below will start a Firecracker microVM with 2 vCPUs, 256 MiB or RAM, two network interfaces, two disks (rootfs and temp), and a vsocket.
56
+
The python-based toy example below will start a Firecracker microVM with 2 vCPUs, 256 MiB or RAM, two network interfaces and two disks (rootfs and temp).
61
57
62
-
Currently, only the core parts of the API (`/actions`, `/machine-config`, `/boot-source`, `/network-interfaces`, `/drives`, and `/vsocks`) are implemented. For the planned v1.0 API description see `/api/swagger/all.yaml`.
58
+
Currently, only the core parts of the API (`/actions`, `/machine-config`, `/boot-source`, `/network-interfaces`and `/drives`) are implemented. For the planned v1.0 API description see `/api/swagger/firecracker-v1.0.yaml`.
63
59
64
-
The toy example snapshot below uses a Python script to start a Firecracker instance. The Firecracker binary, as well as compatible kernel, root file system, and temp file system images are assumed to already exist. The TUN/TAP devices passed to the networking API are also assumed to already exist. Firecracker requires root privileges to open vsock interfaces on a host.
60
+
The toy example snapshot below uses a Python script to start a Firecracker instance. The Firecracker binary, as well as compatible kernel, root file system, and temp file system images are assumed to already exist. The TUN/TAP devices passed to the networking API are also assumed to already exist.
65
61
66
62
The full example can be found in [the examples directory](examples/hello_api/spawn_microvm.py)
67
63
@@ -125,13 +121,6 @@ requests.put(
125
121
}
126
122
)
127
123
128
-
# Add a vsocket between the host and guest OSs (requiers both to be Linux).
129
-
# Requires appropriate privileges, and both host and guest kernel support.
# Currently, only linux kernel images are supported.
137
126
requests.put(
@@ -152,13 +141,12 @@ requests.put(
152
141
153
142
## Notes
154
143
1. The Kernel and RootFS need to work together, and the Kernel needs to run with Firecracker's limited device model.
155
-
2. Vsocket usage currently requires root privileges, and both host (`CONFIG_VHOST_VSOCK`) and guest (`CONFIG_VIRTIO_VSOCKETS`) kernel support.
156
-
3. It is the user's responsibility to make sure that the same backing file is not added as a read-write block device to multiple Firecracker instances. A file can be safely added as a read-only block device to multiple Firecracker instances.
157
-
4. Firecracker uses default values for the following parameters:
144
+
2. It is the user's responsibility to make sure that the same backing file is not added as a read-write block device to multiple Firecracker instances. A file can be safely added as a read-only block device to multiple Firecracker instances.
145
+
3. Firecracker uses default values for the following parameters:
158
146
1. Kernel Command Line: `console=ttyS0 noapic reboot=k panic=1 pci=off nomodules`. This can be changed with a `PUT` request to `/boot-source`.
159
147
2. Number of vCPUs: 1. This can be changed with a `PUT` request to `/machine-config`
160
148
3. Memory Size: 128 MiB. This can be changed with a `PUT` request to `/machine-config`
161
-
4.Unix domain socket: `/tmp/firecracker.socket`. This can be changed only when Firecracker is started, by using the command line parameter `--api-sock`.
162
-
5. Firecracker links the microVM serial console output to its stdout, and its stdin to the microVM serial console input. Therefore, you can interact with the microVM guest in the screen session.
163
-
6. Important: The unix domain socket is not deleted when Firecracker is stopped. You have to remove it yourself after stopping the Firecracker process.
164
-
7. Firecracker doesn't yet emulate a power management device. This means that any shutdown/poweroff command issued by the guest OS only does partial shutdown then hangs. The linux 'reboot' command when run in the guest OS will actually cleanly shut down the guest without bringing it back up.
149
+
4. Unix domain socket: `/tmp/firecracker.socket`. This can be changed only when Firecracker is started, by using the command line parameter `--api-sock`.
150
+
4. Firecracker links the microVM serial console output to its stdout, and its stdin to the microVM serial console input. Therefore, you can interact with the microVM guest in the screen session.
151
+
5. Important: The unix domain socket is not deleted when Firecracker is stopped. You have to remove it yourself after stopping the Firecracker process.
152
+
6. Firecracker doesn't yet emulate a power management device. This means that any shutdown/poweroff command issued by the guest OS only does partial shutdown then hangs. The linux 'reboot' command when run in the guest OS will actually cleanly shut down the guest without bringing it back up.
0 commit comments