| 1 | #!/usr/bin/env bash |
| 2 | # Install dependencies required by eBPF for Windows. |
| 3 | |
| 4 | set -euo pipefail |
| 5 | |
| 6 | VM_NAME="$1" |
| 7 | |
| 8 | ip=$(virsh --connect qemu:///system domifaddr "$VM_NAME" | gawk 'match($0, /([[:digit:]\.]+)\//, a) { print a[1] }') |
| 9 | |
| 10 | if [ -z "$ip" ]; then |
| 11 | echo "Can't figure out IP address of VM, giving up" |
| 12 | exit 1 |
| 13 | fi |
| 14 | |
| 15 | echo "VM IP is $ip" |
| 16 | |
| 17 | echo Installing eBPF for Windows dependencies |
| 18 | scp ./*.ps1 "$ip": |
| 19 | ssh -t "$ip" ".\\Setup.ps1" |