Skip to content

404 error when backup VM using the plugin "bareos-vmware-plugin" #2410

@Skimarii

Description

@Skimarii

Bareos component version

bareos-fd; bareos-dir; bareos-sd; bconsole - version 24.0.6pre55.68b648fd2
bareos-vmware-plugin/bareos,now 24.0.6
pre55.68b648fd2-103 amd64

python version 3.12.3
python packets version:
certifi-2025.10.5
charset_normalizer-3.4.4
idna-3.11
pyvmomi-9.0.0.0
requests-2.32.5
urllib3-2.5.0

Steps to reproduce

When I start a backup job in vCenter, I get the following error: "Fatal error: python3-fd-mod: Unexpected Error retrieving NVRAM file: 404 Client Error: Not Found for url: https://vc.com:443/folder/testVM/testVM.nvram?dsName=datastore1&dcPath=DC1".
the account that performs the backup has all the necessary permissions to perform the backup (it would also be nice if the necessary permissions were listed in the documentation, like in veeam https://helpcenter.veeam.com/docs/backup/permissions/cumulativepermissions.html?ver=120)
Also, when I follow the link in the error message, I also get a 404 error.

Expected results

the reason and solution to the problem is that the datacenter is not in the root, but in the datacenter folders, and its path in my case is "Folder 1/folder_new/DC1"
I have written all this in the fileset resource:
Plugin = "python"
":module_name=bareos-fd-vmware"
":dc=Folder 1/folder_new/DC1"

but the plugin doesn't take the path I specified when it runs, it just takes the datacenter name and inserts it into the URL.

Actual results

If I follow the corrected link in the browser: https://vc.com:443/folder/testVM/testVM.nvram?dsName=datastore1&dcPath=Folder 1/folder_new/DC1 (instead of https://vc.com:443/folder/testVM/testVM.nvram?dsName=datastore1&dcPath=DC1)
Then everything downloads smoothly and doesn't give a 404 error

The solution to the problem is to take the entire variable from the fileset that the user has set, rather than truncating it

UPD: 24.10.2025 06:18 UTC+0
I think I fixed this problem by changing the code in the script "bareos-fd-vmware.py"
i change "request_params["dcPath"]" in def retrieve_file_content_from_datastore and upload_file_content_to_datastore
from: request_params["dcPath"] = self.dc.name
to: request_params["dcPath"] = self.options["dc"]

but I'm not sure if this is correct, as I'm not very familiar with the script code.

UPD: 24.10.2025 06:54 UTC+0
I also now encounter an error during recovery "Fatal error: python3-fd-mod: Datacenter Folder 1/folder_new/DC1 not found!"
although he recently downloaded a VM backup using the same path

Environment

- OS: ubuntu 24.04.2 LTS (Noble Numbat)
- component:

Relevant log output

Relevant traces output

Anything else?

p.s. I would also like to avoid displaying the password in plain text from the vCenter backup account in the logs

Metadata

Metadata

Assignees

Labels

bugThis addresses a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions