Skip to content

Commit d1d48ea

Browse files
committed
Update notes on nested virt
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent 63c9ad3 commit d1d48ea

File tree

2 files changed

+7
-38
lines changed

2 files changed

+7
-38
lines changed

docs/examples/kvm-guest.md

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,15 @@
11
# Example: Run a KVM guest
22

3-
It is possible to launch a Virtual Machine (VM) within a GitHub Action. Support for virtualization is not enabled by default for Actuated. The Agent has to be configured to use a custom kernel.
3+
It is possible to launch a Virtual Machine (VM) within a GitHub Action using nested virtualisation.
44

5-
There are some prerequisites to enable KVM support:
5+
With the following caveats:
66

7-
- `aarch64` runners are not supported at the moment.
8-
- A bare-metal host for the Agent is required.
7+
- Nested Virtualisation is generally slower than bare-metal.
8+
- Arm is not supported by the Linux Kernel or the current generation of Arm SoCs.
99

10+
The `kvm` and `kvm_intel` / `kvm_amd` modules are shipped with the actuated Kernel, so you can load them in your workflow via `sudo modprobe`.
1011

11-
!!! info "Nested virtualisation is a premium feature"
12-
This feature requires a plan size of 15 concurrent builds or greater, however you can get a 14-day free trial by contacting our team directly through the actuated Slack.
13-
14-
## Configure the Agent
15-
16-
1. Make sure [nested virtualization is enabled](https://ostechnix.com/how-to-enable-nested-virtualization-in-kvm-in-linux/) on the Agent host.
17-
18-
2. Edit `/etc/default/actuated` on the Actuated Agent and add the `kvm` suffix to the `AGENT_KERNEL_REF` variable:
19-
20-
```diff
21-
- AGENT_KERNEL_REF="ghcr.io/openfaasltd/actuated-kernel:x86_64-latest"
22-
+ AGENT_KERNEL_REF="ghcr.io/openfaasltd/actuated-kernel:x86_64-kvm-latest"
23-
```
24-
25-
3. Also add it to the `AGENT_IMAGE_REF` line:
26-
27-
```diff
28-
- AGENT_IMAGE_REF="ghcr.io/openfaasltd/actuated-ubuntu22.04:x86_64-latest"
29-
+ AGENT_IMAGE_REF="ghcr.io/openfaasltd/actuated-ubuntu22.04:x86_64-kvm-latest"
30-
```
31-
32-
3. Restart the Agent to use the new kernel.
33-
34-
```bash
35-
sudo systemctl daemon-reload && \
36-
sudo systemctl restart actuated
37-
```
38-
39-
4. Run a [test build](/test-build/) to verify KVM support is enabled in the runner. The specs script from the test build will report whether `/dev/kvm` is available.
40-
41-
## Run a Firecracker microVM
12+
## Example: Run a Firecracker microVM
4213

4314
This example is an adaptation of the [Firecracker quickstart guide](https://github.com/firecracker-microvm/firecracker/blob/main/docs/getting-started.md) that we run from within a GitHub Actions workflow.
4415

docs/faq.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,7 @@ It is possible to launch a Virtual Machine (VM) with KVM from within a Firecrack
348348

349349
Use-cases may include: building and snapshotting VM images, running Packer, launching VirtualBox and Vagrant, accelerating the Android emulator, building packages for NixOS and other testing which requires KVM.
350350

351-
It's disabled by default, but you can opt-in to the feature by following the steps in this article:
352-
353-
[How to run a KVM guest in your GitHub Actions](https://actuated.com/blog/kvm-in-github-actions)
351+
Follow an example build that uses Firecracker within a GitHub Action: [How to run a KVM guest in your GitHub Actions](https://actuated.com/blog/kvm-in-github-actions)
354352

355353
At time of writing, only Intel and AMD CPUs support nested virtualisation.
356354

0 commit comments

Comments
 (0)