If vCenter resources (datacenter, cluster, folder, template folder or resource pool) are renamed after deploying VCF components (VCFA / VIDB ), stored vSphere inventory paths in appliance cluster become invalid, potentially causing any of the following related issues:
This guide provides steps to identify, potentially remediate for any issues and update appliance configurations for any vSphere resource renaming scenario.
Please NOTE the following before proceeding with this article:
Before starting to use and execute this run-book guide, ensure the following is available:
vmware-system-user credentials update_vc_paths.sh" with this guideFollowing are possible scenarios and remediations for this issue:
In this scenario, vSphere resource names are not changed yet.
This supports automated resolution using the following provided bash script (update_vc_paths.sh), which updates appliance cluster configuration to reflect updated vSphere resource paths for the changed resources.
Follow below steps to successfully update vSphere resources and corresponding appliance cluster configuration:
Step 1: SSH into VCFA or VIDB Primary appliance using root credentials
Step 2: Copy and prepare provided bash script in VCFA or VIDB Primary appliance and execute it in dry-run mode
# assuming bash script file is copied into appliance vm
# make sure to change to root user in appliance vm
sudo -i
# update bash script file permission
chmod +x update_vc_paths.sh
# run help command to get details on how to use the script
$ ./update_vc_paths.sh -h
Usage: ./update_vc_paths.sh [OPTIONS]
Updates appliance cluster configuration with new vCenter resource paths.
OPTIONS:
--vc-server SERVER vCenter server (optional: will be retrieved from the appliance if not provided)
--vc-username USERNAME vCenter username (required)
--vc-password PASSWORD vCenter password (required)
--vc-datacenter DATACENTER vCenter Datacenter name or path (optional)
--vc-cluster CLUSTER vCenter Cluster name or path (optional)
--vc-folder FOLDER vCenter Folder name or path (optional)
--vc-template-folder FOLDER vCenter Template folder name or path (optional)
--vc-resource-pool POOL vCenter Resource pool name or path (optional)
--dry-run [true|false] Enable/disable dry run mode (default: true). Use --dry-run false to apply changes.
--backup-dir DIR Backup directory (default: ./backups)
-h, --help Show this help message
EXAMPLES:
# Dry run (default)
./update_vc_paths.sh --vc-username 'admin' --vc-password 'password' --vc-datacenter 'NewDatacenterName'
# Apply changes
./update_vc_paths.sh --dry-run false --vc-username 'admin' --vc-password 'password' --vc-datacenter 'NewDatacenterName'
# With vCenter server and credentials (required)
./update_vc_paths.sh --vc-server 'vcenter.example.com' --vc-username 'admin' --vc-password 'password' --vc-datacenter 'NewDatacenterName'
Note: Only resources with explicit arguments will be updated. Resources will be validated in vCenter before updating.
Step 3: Update resources in vSphere
Step 4: Execute bash script to update vSphere resource paths in appliance configuration
# THIS IS JUST AN EXAMPLE - Apply changes by passing '--dry-run false' and renamed resource names
./update_vc_paths.sh --dry-run false --vc-username 'admin' --vc-password 'password' --vc-datacenter 'NewDatacenterName' --vc-cluster "cluster1"
In this scenario, vSphere resources are already changed and appliance needs to be remediated for any issues and updated for the changes.
Follow the steps below to identify the specific issue, remediate it, and update the cluster configuration for vSphere resource changes.
STEP 1: Revert the vSphere resource changes if possible and/or Run the cluster health check and remediate issues if any
STEP 2: Update appliance cluster configuration with new vSphere resource paths