Hello Ana Mata-Payerro,
We have tried a manual replication of your scenario to identify potential root causes to help you out.
We deployed your application package to a test VM using the same installation command and methodology as VMSS VM Applications (downloaded the files manually in the VM and then ran installation). Our manual testing revealed below findings that may explain why your application appears to install successfully but doesn't function as expected on VMSS instances.
Issues observed:
- Application Reboot Requirement:
->Your installation script is designed to automatically reboot the system after installation. ->This behavior disrupts VMSS deployment as reboots interrupt the VM Application Manager's status reporting. ->The reboot occurs before the installation can be properly verified and reported. - Relative Path Dependencies: -> The installation uses relative paths that reference temporary directories. -> Services get configured pointing to paths like "C:\VMAppTest\TestRun_20250926_000422\app\agent\KeyVaultAgent.exe". These temporary paths become invalid after installation, causing service failures.
- Service Configuration Issues: -> The Key Vault Agent service installs but fails to start due to incorrect executable paths. -> Services are created but remain in "Stopped" state without automatic recovery.
- Web Application Configuration:
-> IIS website and application pool are configured but not automatically started. -> HTTPS binding is configured without proper SSL certificate setup.
Based on our testing, we recommend reviewing these components in your application package :
- Primary Scripts:
Install.ps1- Contains reboot commands and relative path referencesBootstrap.ps1- Main installation logic may need path adjustments - Configuration Files:
ServiceConfiguration.Cloud.cscfg- Verify service paths and dependencies Application configuration files that may contain temporary path references
Key Areas for Fixes :
- Remove or modify reboot commands for VMSS compatibility.
- Replace relative paths with absolute paths or environment variables.
- Add service health checks and automatic start procedures.
- Implement proper error handling for VMSS environments
Recommended Next Steps:
- Test with our corrected installation approach that addresses the path and reboot issues
- Modify your installation scripts to be VMSS-compatible by:
->Eliminating system reboots. -> Using absolute paths for service executables -> Adding proper startup sequencing for services - Validate the application works manually before deploying to VMSS