Guest Setup
Guest setup runs through Azure VM Run Command after the VM exists.
Structured Packages
Section titled “Structured Packages”The sample config now declares package metadata:
softwareInstalls: allowDynamicBootstrap: true packages: - manager: "Chocolatey" name: "git.install" version: "2.54.0" - manager: "PowerShellGallery" name: "dbatools" version: "2.7.25"The toolkit generates pinned install commands from this metadata. Chocolatey package entries may also include sha256; when present, the generated choco install command passes it as --checksum ... --checksum-type sha256.
sha256 is intentionally rejected for PowerShellGallery packages because the current install path does not enforce a package checksum. sourceUri is a review/provenance reference only; it is not used as the install source.
allowDynamicBootstrap: true still permits Chocolatey bootstrap download during deployment, so hardened environments should either preinstall Chocolatey in the VM image or provide a verified internal bootstrap source and package mirror.
Additional Install Script
Section titled “Additional Install Script”softwareInstalls.installScript remains available as an additional custom hook after the structured package installs. Keep it small, reviewed, and free of secrets.
Logon Script
Section titled “Logon Script”The sample logon script installs the SQL Server VS Code extension:
code --install-extension ms-mssql.mssqlOnly use trusted logon script content.
Azure Files Mount
Section titled “Azure Files Mount”The VM managed identity retrieves the storage-key secret from Key Vault and mounts Azure Files to the configured drive letter. The mount script is also registered as a startup scheduled task.
Restore Helper
Section titled “Restore Helper”The script uploads restore-databases.ps1 to the Azure Files share. It restores .bak files from the configured backup path using dbatools.
Run it manually inside the VM after reviewing the backup files.