Problem description
When attempting to discover SQL instances on an Azure VM using the Druva MS-SQL agent, the discovery process fails. The Druva console will not display any available SQL instances for configuration, despite SQL Server being installed and active on the virtual machine.
Cause
The Druva MS-SQL agent relies on the SQL Server VSS Writer to browse and identify SQL instances. This issue is typically caused by:
The SQLWriter service being disabled or not installed.
The SQL VSS Writer being in a "Failed" or "Inconsistent" state, preventing it from reporting instances to the Druva discovery tool.
Traceback
The following error can be found in C:\ProgramData\Druva\EnterpriseWorkloads\logs\mssqldiscovery.log:
Plaintext
level=info ts=2025-06-17T15:47:21.4525916Z filename=vssbackuphelper.go:2394 message="Windows service is already running" WindowsServiceName=SQLWriter level=error ts=2025-06-17T15:47:21.9013642Z filename=main.go:69 message="Discovery failed" Error="message: Insctance list is empty, original error: Insctance list is empty" stack="goroutine 1 [running]: ... main.main() git.druva.org/phoenixdev/sql-client/agent/cmd/sqldiscovery/main.go:69 +0x468"
Resolution
To resolve the discovery failure, ensure the SQL Writer service is functional:
Check Service Status: Run the following command in an elevated Command Prompt to confirm if the service is recognized by Windows:
sc query SQLWriterVerify VSS Writer Health: Run the following command to check the state of the writer:
vssadmin list writersConfirm that 'SqlServerWriter' appears in the list.
Ensure the State is
[1] Stable.
Restart Services: If the writer is missing or in an error state, restart the SQL Server VSS Writer service via
services.msc.Alternative Approach: * For Azure VMs: If the VSS framework is consistently unstable, ensure the VM has the latest Azure VM Agent updates.
For Azure Managed Instances: Note that agent-based solutions are not supported; use the Azure SQL native protection instead.
Verification
Open the Command Prompt as an Administrator.
Type
vssadmin list writersand press Enter.Confirm SqlServerWriter is listed without errors.
In the Druva Cloud Platform Console, navigate to the specific Azure VM and click Refresh/Discover Instances. The instances should now populate.
