From 5d26426074d76d70fe7635edcae20ed83df2f429 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 13 Jan 2024 09:11:50 +0100 Subject: [PATCH] Update documentation --- virtweb_docs/SETUP_PROD.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/virtweb_docs/SETUP_PROD.md b/virtweb_docs/SETUP_PROD.md index 76d6fa4..262b111 100644 --- a/virtweb_docs/SETUP_PROD.md +++ b/virtweb_docs/SETUP_PROD.md @@ -126,4 +126,24 @@ sudo sysctl -p /etc/sysctl.conf ```bash sudo apparmor_parser -r /etc/apparmor.d/usr.sbin.libvirtd +``` + +* Create VirtWeb hook. Set the following content inside `/etc/libvirt/hooks/network`: + +```bash +#!/bin/bash +NAT_MODE=1 /usr/local/bin/virtweb_backend --storage /home/virtweb/storage --network-name "$1" --operation "$2" --sub-operation "$3" +``` + +* Make the script executable: + +```bash +sudo chmod +x /etc/libvirt/hooks/network +``` + +* Restart `libvirtd` and `VirtWeb`: + +```bash +sudo systemctl restart libvirtd +sudo systemctl restart virtweb ``` \ No newline at end of file