Skip to main content

VMware VM Backup Fails with Error: "Cannot Concatenate 'str' and 'NoneType' Objects"

VMware VM Backup Fails with Error: "Cannot Concatenate 'str' and 'NoneType' Objects"

Updated over a week ago

Problem Description

During VMware virtual machine (VM) backups using Druva, backups may fail with the following internal error:

Error: TypeError: cannot concatenate 'str' and 'NoneType' objects

Internal Error Code: 65535

This error often occurs during the first backup of a VM or when there are configuration inconsistencies within the VM’s .vmx file.

Traceback:

[INFO] VMX fpath: [Datastore] VM_Name/VM_Name.vmx

[ERROR] Error <type 'exceptions.TypeError'>: cannot concatenate 'str' and 'NoneType' objects

Traceback (most recent call last):

File "agents/vmware/vmwareAgent.py", line 1772, in do_retry

File "agents/vmware/vmwareAgent.py", line 1958, in get_nvram_from_datastore

File "agents/vmware/vmwareAgent.py", line 1945, in __get_nvram_path

TypeError: cannot concatenate 'str' and 'NoneType' objects

Cause:

This error is typically caused when the backup agent is unable to construct a complete file path because one of the expected components (such as the NVRAM path) is missing or returns None.

Common root causes include:

  • The NVRAM property is missing from the VM’s .vmx configuration file.

  • The VMX file is corrupted, incomplete, or contains invalid values.

  • The datastore is inaccessible or unmounted from the ESXi host.

  • The VM has been recently moved or misconfigured within vCenter.

Resolution:

Option 1: Add Missing NVRAM Property to VM

  1. Open vSphere Client and navigate to the affected VM.

  2. Go to Edit Settings → VM Options → Advanced → Edit Configuration.

  3. Click Add Configuration Parameter.

  4. Add the following:

    • Name: nvram

    • Value: Name of the NVRAM file (e.g., VM_Name.nvram)

Note:

If the VM is already powered on and the NVRAM parameter is missing, VMware may generate an NVRAM file named nvram (with no extension). Please consult your VMware Administrator before applying manual changes.

Option 2: Validate VM and Datastore Accessibility

  1. Ensure the VM exists and is powered on or accessible in vCenter or ESXi.

  2. Confirm the datastore (e.g., [NetApp_nfs_ds2]) is mounted and accessible from the host.

  3. Check if the .vmx file path mentioned in the error log exists and is not corrupted.

  4. Optionally, perform a vMotion or migrate the VM to a different ESXi host to refresh the configuration.

  5. Re-run the backup after verifying the configuration.

See also

Did this answer your question?