Add troubleshooting points for curl usage
@@ -364,6 +364,26 @@ not run on an EC2 .metal instance. You can skip performance tests with:
./tools/devtool test -- --ignore integration_tests/performance
```
+## Troubleshooting
+
+### Errors while using `curl` to access the API
+
+Points to check to confirm the API socket is running and accessible:
+
+- Check that the user running the Firecracker process and the user using `curl`
+ have equivalent privileges. For example, if you run Firecracker with **sudo**
+ that you run `curl` with **sudo** as well.
+- [SELinux](https://man7.org/linux/man-pages/man8/selinux.8.html) can regulate
+ access to sockets on RHEL based distributions. How user's permissions are
+ configured is environmentally specific, but for the purposes of
+ troubleshooting you can check if it is enabled in `/etc/selinux/config`.
+- With the Firecracker process running using `--api-sock /tmp/firecracker.socket`,
+ confirm that the socket is open:
+ - `ss -a | grep '/tmp/firecracker.socket'`
+ - If you have socat available, try `socat - UNIX-CONNECT:/tmp/firecracker.socket`
+ This will throw an explicit error if the socket is inaccessible, or it will pause
+ and wait for input to continue.
+
## Appendix A: Setting Up KVM Access
Some Linux distributions use the `kvm` group to manage access to `/dev/kvm`,
