constellation/hack/qemu-metadata-api
renovate[bot] 4d618a4b99
deps: update fedora:37 Docker digest (#1448)
Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2023-03-17 18:47:36 +01:00
..
server hack: remove unused tools (#1387) 2023-03-09 16:59:33 +01:00
virtwrapper bazel: add build files for go (#1186) 2023-03-09 15:23:42 +01:00
BUILD.bazel bazel: add build files for go (#1186) 2023-03-09 15:23:42 +01:00
Dockerfile deps: update fedora:37 Docker digest (#1448) 2023-03-17 18:47:36 +01:00
main.go initserver: add client verification 2022-11-28 19:34:02 +01:00
README.md AB#2114 Add QEMU metadata API (#237) 2022-06-30 11:14:26 +02:00

QEMU metadata API

This program provides a metadata API for Constellation on QEMU.

Dependencies

To interact with QEMU libvirt is required. Install the C libraries:

On Ubuntu:

sudo apt install libvirt-dev

On Fedora:

sudo dnf install libvirt-devel

Firewalld

If your system uses firewalld virtmanager will add itself to the firewall rules managed by firewalld. Your VMs might be unable to communicate with the host.

To fix this open port 8080 (the default port for the QEMU metadata API) for the libvirt zone:

# Open the port
sudo firewall-cmd --zone libvirt --add-port 8080/tcp --permanent

Docker image

Build the image:

DOCKER_BUILDKIT=1 docker build -t ghcr.io/edgelesssys/constellation/qemu-metadata-api:latest -f hack/qemu-metadata-api/Dockerfile .

A container of the image is automatically started by Terraform. You can also run the image manually using the following command:

docker run -it --rm \
    --network host \
    -v /var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock \
    ghcr.io/edgelesssys/constellation/qemu-metadata-api:latest