summaryrefslogtreecommitdiff
path: root/packer/files/scripts/windows/setup-qemu-guest-agent.ps1
diff options
context:
space:
mode:
authorheqnx <root@heqnx.com>2025-07-11 21:50:55 +0300
committerheqnx <root@heqnx.com>2025-07-11 21:50:55 +0300
commit8cf16b5c899a60ea5982c5d8dc042153daf6ac5b (patch)
treed64092854fe32f4630f514b93b244b0b5eddc5d1 /packer/files/scripts/windows/setup-qemu-guest-agent.ps1
parent54ecdd04947e70026c96365ea29463f8b435c1aa (diff)
downloadansible-active-directory-range-8cf16b5c899a60ea5982c5d8dc042153daf6ac5b.tar.gz
ansible-active-directory-range-8cf16b5c899a60ea5982c5d8dc042153daf6ac5b.zip
added packer templates
Diffstat (limited to 'packer/files/scripts/windows/setup-qemu-guest-agent.ps1')
-rw-r--r--packer/files/scripts/windows/setup-qemu-guest-agent.ps114
1 files changed, 14 insertions, 0 deletions
diff --git a/packer/files/scripts/windows/setup-qemu-guest-agent.ps1 b/packer/files/scripts/windows/setup-qemu-guest-agent.ps1
new file mode 100644
index 0000000..a2baefa
--- /dev/null
+++ b/packer/files/scripts/windows/setup-qemu-guest-agent.ps1
@@ -0,0 +1,14 @@
+[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
+
+try {
+ $url = "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win-guest-tools.exe"
+ (New-Object System.Net.WebClient).DownloadFile($url, "C:\virtio-win-guest-tools.exe")
+ Write-Output "[INFO] Downloaded $url"
+
+ Start-Process -FilePath "C:\virtio-win-guest-tools.exe" -ArgumentList "/install /passive /norestart" -Wait -Verbose
+ Write-Output "[INFO] Successfully installed VirtIO Guest Tools"
+ Remove-Item "C:\virtio-win-guest-tools.exe" -Force
+} catch {
+ Write-Host "[ERR] Error occured while installing VirtIO Guest Tools"
+ Write-Host "$($_.Exception.Message)"
+}