Vagrant/Libvirt basic test/dev environment

Signed-off-by: Cédric Clerget <cedric.clerget@gmail.com>
This commit is contained in:
Cédric Clerget
2025-09-05 14:43:15 -05:00
committed by Jonathon Anderson
parent f2869f4949
commit 0d041cbbbb
11 changed files with 371 additions and 0 deletions

14
vagrant/export-libvirt-sock.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
pidfile=".export-libvirt-sock.pid"
pid=$(cat $pidfile 2>/dev/null || true)
if [ "$pid" != "" ]; then
if grep "/var/tmp/libvirt.sock:" /proc/$pid/cmdline >/dev/null 2>&1; then
exit 0
fi
fi
nohup vagrant ssh wwctl -- -o ServerAliveInterval=5 -o ServerAliveCountMax=1 -f -R /var/tmp/libvirt.sock:/var/run/libvirt/libvirt-sock -N >/dev/null 2>&1 &
echo $! > .export-libvirt-sock.pid