bootc-base-image-build-mirror/scripts/utils/setVMIP.sh

13 lines
337 B
Bash
Raw Normal View History

2024-08-11 09:09:04 +00:00
#!/bin/bash
set -e
vmIPaddress=$(virsh domifaddr rocky | awk '/ipv4/ {print $4}' | awk -F'/' '{print $1}')
while [ -z "$vmIPaddress" ]; do
sleep 3
vmIPaddress=$(virsh domifaddr rocky | awk '/ipv4/ {print $4}' | awk -F'/' '{print $1}')
done
export vmIPaddress="$vmIPaddress"
echo "Builder VM IP (vmIPaddress) is: $vmIPaddress"