in these days we are working to automatate the disaster recovery plan with Ansible, and powershell. The idea is starting a new different veeam standby server, adding a new smb share as repository and starting a live mount of a backupped vm. Till now we had reached the goals and we are happy, we were able to start the vms with the command "Start-VBRInstantRecovery " with a read and write cache, and the vm is poweron... But in this moment we aren't able to attach to vm a different network as the default one, thus there are some switch with the command ""Start-VBRInstantRecovery " that should accomplish this.
So what's wrong?
here is the code:
Code: Select all
$backup = Get-VBRBackup
$restorepoint = Get-VBRRestorePoint -Backup $backup | Sort-Object –Property CreationTime –Descending | Select -First 1
$EsxServer = Get-VBRServer -Type ESXi -Name Esx01.domain.local
$pool = Find-VBRViResourcePool -Name "Recovery Resource Pool" -Server $server
$folder = Find-VBRViFolder -Name "ADR" -Server $server
$VMName = "itxxxxxx"
$store = Find-VBRViDatastore -Name "Volume001" -server $ESXServer
$SourceNetwork = Get-VBRViServerNetworkInfo -server "esxdmz25.itservice.local" | Where { $_.name -eq "tenant.xxxx.vlan1012" }
$TargetNetwork = $SourceNetwork
Start-VBRInstantRecovery -RestorePoint $restorepoint -VMName $VMName -Server $Esxserver -Datastore $store -ResourcePool $pool -Folder $folder -PowerUp:$true -NICsEnabled:$true -Reason "Data recovery" -RunAsync -SourceNetwork $SourceNetwork -TargetNetwork $targetNetwork -Verbose