55 lines
1.6 KiB
Ruby
55 lines
1.6 KiB
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
#
|
|
# Vagrant Windows 11 test machine for Android File Handler installer testing.
|
|
#
|
|
# Prerequisites:
|
|
# - Vagrant >= 2.4
|
|
# - Hyper-V enabled (Windows host)
|
|
#
|
|
# Usage:
|
|
# cd vagrant
|
|
# vagrant up --provider=hyperv
|
|
# vagrant snapshot save clean
|
|
# ..\scripts\windows\run_vagrant_tests.ps1
|
|
#
|
|
|
|
Vagrant.configure("2") do |config|
|
|
config.vm.box = "gusztavvargadr/windows-11-24h2-enterprise"
|
|
|
|
config.vm.hostname = "afh-test"
|
|
config.vm.communicator = "winrm"
|
|
|
|
config.winrm.username = "vagrant"
|
|
config.winrm.password = "vagrant"
|
|
config.winrm.transport = :plaintext # Vagrant's own comms (boot check, provision)
|
|
config.winrm.basic_auth_only = true
|
|
|
|
config.vm.guest = :windows
|
|
config.vm.boot_timeout = 900
|
|
config.vm.graceful_halt_timeout = 120
|
|
|
|
# Automatically select the Default Switch for Hyper-V to avoid interactive prompt
|
|
config.vm.network "public_network", bridge: "Default Switch"
|
|
|
|
config.vm.network "forwarded_port", guest: 5985, host: 55985 # Vagrant plaintext WinRM
|
|
config.vm.network "forwarded_port", guest: 5986, host: 55986 # PSSession HTTPS WinRM
|
|
|
|
config.vm.provider "hyperv" do |hv|
|
|
hv.vmname = "afh-win11-test"
|
|
hv.memory = 8192
|
|
hv.maxmemory = 8192
|
|
hv.cpus = 4
|
|
hv.enable_enhanced_session_mode = true
|
|
hv.linked_clone = true
|
|
end
|
|
|
|
# Disable default Vagrant synced folder to prevent SMB credential prompts.
|
|
# Files are transferred directly via PSSession by run_vagrant_tests.ps1.
|
|
config.vm.synced_folder ".", "/vagrant", disabled: true
|
|
|
|
config.vm.provision "shell",
|
|
path: "provision.ps1",
|
|
privileged: true
|
|
end
|