Auto-unmount Veeam vPower NFS datastore
When doing an Instant VM recovery or a Linux FLR recovery using Veeam Backup & Replication it will create a NFS share within a VMware infrastructure which allows it to power on VM’s directly from a backup file. However when the restore is done the NFS share remains in the infrastructure. This is done to speed up future recoveries.
I received the question if there was a way to auto-unmount the datastore once a restore was done. This is currently not possible but the following script will remove any NFS datastore in the infrastructure called “VeeamBackup_” on all hypervisors.
# Script to unmount Veeam vPower NFS datastore # Fill in the information below # vCenter server address (FQDN or IP) $vcenter = "IP-HOSTNAME" # vCenter Username $user = "SOMEADMIN" # Password $pass = "SOMEPASS" # DO NOT TOUCH BELOW!! # Connect to vCenter Connect-VIServer -Server $vcenter -Username $user -Password $pass | Out-Null $hosts = Get-VMHost foreach ($VMHost in $hosts) { $veeamshare = Get-Datastore | where {$_.type -eq "NFS" -and $_.name -Match "VeeamBackup_*"} Remove-Datastore -VMHost $VMHost -Datastore $veeamshare -confirm:$false } # Disconnect from vCenter Disconnect-VIServer -Server $vcenter -Confirm:$false | Out-Null
You can automate this task by running the script as a scheduled task.
Enjoy!
12 thoughts on “Auto-unmount Veeam vPower NFS datastore”
Auto-unmount Veeam vPower NFSĀ datastore https://t.co/LLmSvd4OLi
RT @nielsengelen: New blog: Auto-unmount Veeam vPower NFS datastore https://t.co/bNXKumB7QN
Auto-unmount Veeam vPower NFS datastore https://t.co/OEaIT9cAnG
RT @nielsengelen: New blog: Auto-unmount Veeam vPower NFS datastore https://t.co/bNXKumB7QN
Auto-unmount Veeam vPower NFS datastore – https://t.co/sC80HcTzjV via @nielsengelen
RT @haslund: Auto-unmount Veeam vPower NFS datastore – https://t.co/sC80HcTzjV via @nielsengelen
RT @haslund: Auto-unmount Veeam vPower NFS datastore – https://t.co/sC80HcTzjV via @nielsengelen
Auto-unmount Veeam vPower NFS datastore https://t.co/CjyRqp9grH #PowerCLI #Veeam
RT @xinity_bot: Auto-unmount Veeam vPower NFS datastore https://t.co/CjyRqp9grH #PowerCLI #Veeam
Auto-unmount Veeam vPower NFS datastore – https://t.co/XKtunGgaHy https://t.co/XKtunGgaHy
RT @tdewin: Auto-unmount Veeam vPower NFS datastore – https://t.co/XKtunGgaHy https://t.co/XKtunGgaHy
Comments are closed.