VM cannot connect via HTTPS due to self-signed certificate errors. Added: - test-vm-connectivity.ps1: 5-step diagnostic for VM - agent/QUICK-FIX-VM.md: Use HTTP for Hyper-V local network - open-firewall-for-vm.ps1: Open Windows Firewall Since VM and host are on same physical machine (Hyper-V internal network), HTTP is acceptable for local monitoring. For production: Use proper TLS certificates.
1.3 KiB
1.3 KiB
Quick Fix: Agent Can't Connect from VM
Problem
SSL certificate errors when connecting from VM to host.
Solution: Use HTTP on Local Network
Since the VM and host are on a trusted local network (Hyper-V), use HTTP instead of HTTPS.
On VM - Set HTTP in Registry:
# On VM (as Administrator):
New-Item -Path 'HKLM:\SOFTWARE\GE\ShopDB' -Force
Set-ItemProperty -Path 'HKLM:\SOFTWARE\GE\ShopDB' -Name 'BaseUrl' -Value 'http://172.31.96.1:5001'
Set-ItemProperty -Path 'HKLM:\SOFTWARE\GE\ShopDB' -Name 'CollectorKey' -Value 'shopdb_pat_b4a3fe2a01abc6bc1cb685280e65a8c35d52ec43'
Test it works:
# On VM:
curl.exe http://172.31.96.1:5001
# Should return HTML
Then run the agent:
cd C:\ProgramData\ShopDB\EndpointAgent
.\shopdb-endpoint-agent.exe --once
Why HTTP is OK Here
- ✅ VM and host on same physical machine (Hyper-V)
- ✅ Traffic never leaves the host
- ✅ Hyper-V internal network is isolated
- ✅ No external network exposure
For production multi-machine deployment, use HTTPS with proper certificates.
Alternative: Fix HTTPS (More Complex)
If you need HTTPS:
- Export the self-signed cert from host
- Import to VM's Trusted Root Certification Authorities
- Use HTTPS URL
See main INSTALL-ON-VM.md for details.