To change the IP address of an NFS datastore in ESXi, the existing datastore must be unmounted and re-added using the new IP address. Therefore all Virtual Machines residing on the datastore must be either migrated or powered off and unregistered.
Detailed Steps:
- Ensure all virtual machines on the NFS datastore are migrated to another datastore.
- If unable to migrate the virtual machines, then power off all the virtual machines on the NFS datastore and unregister from the inventory.
- To unregister the VM:
- Right-click each VM and select "Remove from Inventory".
Warning: Do not select "Delete from Disk," as this will permanently delete the virtual machine data.
- Unmount the NFS Datastore:
- Navigate storage section in vCenter.
- Right-click on the NFS datastore and select Unmount datastore.
- Choose all the hosts and click OK.
- Create NFS Datastore with new IP address:
- Re-register VMs
- Power on the Virtual Machines.
Important Considerations:
- Ensure ESXi hosts have network connectivity to the new IP address (Update DNS records if required)
- Ensure NFS version supported by storage and ESXi host.
- Make sure using the correct version.