Skip to main content

Nutanix Backups Failing with Error Code AHV51 Due to API Authentication Failure.

Nutanix Backups Failing with Error Code AHV51 Due to API Authentication Failure.

Updated this week

Problem description

Nutanix backups were failing with error code AHV51 when triggered via Druva.

Cause:

The API admin user was locked out due to repeated authentication failures. This can occur if the same account is used by another tool or third-party software attempting frequent API access. As a result, Druva received a 401 Unauthorized error when attempting to connect to the Nutanix API.

Traceback

The backup logs showed the following errors:

level=error ts=2025-06-12T17:28:03.574794672-04:00 filename=backup.go:509 message="Failed to get VM by UUID using V3" Error="Unfortunately, Nutanix APIs are not responding appropriately" level=error ts=2025-06-12T17:28:03.574873474-04:00 stack="Unfortunately, Nutanix APIs are not responding appropriately\\ngoroutine 27 level=error ts=2025-06-12T17:28:03.574899519-04:00 filename=backup.go:308 message="Failed to init AHV State" level=error ts=2025-06-12T17:28:03.574914119-04:00 stack="Unfortunately, Nutanix APIs are not responding appropriately\\ngoroutine 27 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24

Resolution:

To resolve the issue, follow the steps below:

  1. Create a dedicated local Druva user account in both Prism Central and Prism Element.

Step 1: Log in to Prism Element

  1. Open a web browser.

  2. Go to the Prism Element (Cluster) IP address (e.g., https://<cluster-IP>:9440).

  3. Log in using your existing admin credentials.

Step 2: Navigate to User Management

  1. Click on the gear icon (Settings) in the top right corner.

  2. Select "Local User Management" or navigate to:
    Settings > User Management > Local Users

Step 3: Add a New User

  1. Click "Add User" or "Create Local User"

  2. In the dialog that appears:

    • Username: Enter the desired username (e.g., druva_backup)

    • Password: Set a secure password

    • Email: (Optional) Add a valid email

    • Role: Choose an appropriate role. For Druva backups, roles such as:

      • Viewer (minimum for visibility)

      • Backup Admin

      • Cluster Admin (recommended for full access)

  3. Confirm and click Save.

Step 4: Verify User Creation

  1. The new user should now be listed under Local Users.

  2. Use this username and password when configuring Nutanix AHV protection in the Druva Console and in the ProxyConf utility on the backup proxy.

  3. Assign the Super Admin role to the Druva user.

  4. Verify access by logging into the Nutanix console using the new credentials.

  5. From the backup proxy, test API connectivity using a curl command to the Nutanix API endpoint.
    curl -k -u <username>:<password> https://<PrismElement-IP>:9440/api/nutanix/v3/vms/list
    Replace:
    <username> with your Nutanix username
    <password> with the account password
    <PrismElement-IP> with the IP address of your Prism Element cluster
    If you receive a 401 Unauthorised response, it confirms that the credentials are not accepted by Prism Element, even if they work with Prism Central.

Once access is confirmed, trigger a backup job from Druva.

After completing these steps, backups proceeded successfully.

Note:

If the issue persists or if API access remains unresponsive, it is recommended to contact Nutanix Support for further investigation.

Did this answer your question?