VAMI based backup of vCenter Server 7.0 returns access denied for NFS and vSAN File Service target
search cancel

VAMI based backup of vCenter Server 7.0 returns access denied for NFS and vSAN File Service target

book

Article ID: 318213

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • Backup of vCenter Server 7.0 with NFS target returns stderr: mount.nfs: access denied by server while mounting
  • /var/log/vmware/applmgmt/backup.log:
2020-07-21T18:46:55.743 [20200721-184642-16386292] [MainProcess:PID-60318] [BackupManager::CheckFileIntegrity:BackupManager.py:416] INFO: File integrity check is not enabled.
2020-07-21T18:46:55.798 [20200721-184642-16386292] [MainProcess:PID-60318] [MountedFSStorageIOLib::_run_timed_cmd:MountedFSStorageIOLib.py:130] ERROR: Cmd ['/usr/bin/mount', '-t', 'nfs', '<NFS Mount Path>/vCenter/sn_<VCSA FQDN>/M_7.0.0.10400_20200721-184642_/', '/storage/remote/backup/nfs/<NFS IP/FQDN>/fBPRgNVs/mtgosf9X', '-o', 'hard,intr'] failed. rc: 32, stdout: , stderr: mount.nfs: access denied by server while mounting <NFS Mount Path>/vCenter/<VCSA FQDN>/M_7.0.0.10400_20200721-184642_/
2020-07-21T18:46:55.798 [20200721-184642-16386292] [MainProcess:PID-60318] [MountedFSStorageIOLib::mount:MountedFSStorageIOLib.py:229] INFO: Failed to mount the nfs share <NFS Mount Path>/vCenter/<VCSA FQDN>/M_7.0.0.10400_20200721-184642_/ at /storage/remote/backup/nfs/<NFS IP/FQDN>/fBPRgNVs/mtgosf9X. Err- rc: 32, out=, err=mount.nfs: access denied by server while mounting <NFS Mount Path>/vCenter/<VCSA FQDN>/M_7.0.0.10400_20200721-184642_/
2020-07-21T18:46:55.799 [20200721-184642-16386292] [MainProcess:PID-60318] [BackupManager::main:BackupManager.py:621] ERROR: BackupManager encountered an exception: Plugin error occurred. ErrCode: 150, Args: ()

Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.


Environment

VMware vCenter Server 7.0.x

Cause

With NFS share as well as with VMware vSAN File service NFS share the server will return rc 32 with error message as access denied when the path is not available in the target server.

Resolution

This issue is resolved with VMware vCenter Server 7.0 Update 1c. 

Workaround:
To workaround this issue, modify the MountedFSStorageIOLib.py script

Note: Ensure you have a working backup/snapshot of the vCenter Server (VCSA) before making any changes
  1. Log in to the VCSA via ssh
  2. Stop the Appliance Management Service
service-control --stop applmgmt
  1. Edit the script MountedFSStorageIOLib.py as below:
  • cd /usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/plugins/
  • vi MountedFSStorageIOLib.py
Existing line:
231             if (rc == 32) and any(err_msg in err for err_msg in NON_EXIST_ERR_MSGS):

Changed entry:
231             if (rc == 32) or any(err_msg in err for err_msg in NON_EXIST_ERR_MSGS):
  • Save and exit the file (!wq)
  1. Start the Appliance Management service
service-control --start applmgmt
  1. Log in to the VCSA via VAMI (Appliance Management Interface) and trigger the backup

Note: This workaround is not persistent across VCSA updates and the needs to be re-implemented post patching