PowerShell script exchange
Post Reply
mboswell
Service Provider
Posts: 43
Liked: 3 times
Joined: Jul 21, 2022 10:40 pm
Full Name: Matthew Boswell
Contact:

Find-VbrViFolder and Find-VBRViResourcePool return nothing

Post by mboswell »

This is in reference to support case 06094250. I don't get any errors, just those two commands return nothing when run against an ESXi host. I should note that running the deprecated Find-VBRResourcePool does return expected results.

This is V12. End goal is to use the results of the above commands to populate params for Start-VbrViInstantRecoveryMigration.

example:

Code: Select all

$instantrecoveries = Get-VBRInstantRecovery
foreach ($instantrecovery in ($instantrecoveries | Where-Object StateString -eq "Mounted"))
{
    $server = Get-VBRServer | Where-Object Name -eq $instantrecovery.EsxName
    $datastore = Find-VBRViDatastore -Server $server | Where-Object Name -eq "nfs0"
    $resourcepool = Find-VBRResourcePool -Server $server | Where-Object Name -eq "Resources"
    $folder = Find-VBRViFolder -Server $server  #this results in an empty object
    Start-VbrViInstantRecoveryMigration -InstantRecovery $instantrecovery -Datastore $datastore -DeleteSourceVmFiles -RunAsync `
    -Server $server -ResourcePool $resourcepool -Folder $folder
}
Thanks,

Matt
Mildur
Product Manager
Posts: 9933
Liked: 2632 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Find-VbrViFolder and Find-VBRViResourcePool return nothing

Post by Mildur »

Hi Matt

I can see, that you have opened a case for the community edition. As a service provider you should have rental licenses which would give you guaranteed support responses.
But it's possible that support won't be able to help, because it looks like you are using a custom script.

I tried the following commands and it gives me a list of folders and resource Pools:

Code: Select all

$instantrecovery = Get-VBRInstantRecovery | select -First 1
$server = Get-VBRServer | Where-Object Name -eq $instantrecovery.EsxName
$resourcepool = Find-VBRViResourcePool -Server $server"
$folder = Find-VBRViFolder -Server $server
Best,
Fabian
Product Management Analyst @ Veeam Software
mboswell
Service Provider
Posts: 43
Liked: 3 times
Joined: Jul 21, 2022 10:40 pm
Full Name: Matthew Boswell
Contact:

Re: Find-VbrViFolder and Find-VBRViResourcePool return nothing

Post by mboswell »

It was a NFR license actually. I can use a rental license and open a new case.
Mildur
Product Manager
Posts: 9933
Liked: 2632 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Find-VbrViFolder and Find-VBRViResourcePool return nothing

Post by Mildur »

You may also try the commands outside of a For Each Loop first. With a single instant recovery session.
That should prove that there is an issue with both those commands.

For that follow the example code in our user guide. If the example does not work, support should help you to solve it. But our customer support won't be able to help for Custom scripts like yours.
https://helpcenter.veeam.com/docs/backu ... ml?ver=120

Best,
Fabian
Product Management Analyst @ Veeam Software
mboswell
Service Provider
Posts: 43
Liked: 3 times
Joined: Jul 21, 2022 10:40 pm
Full Name: Matthew Boswell
Contact:

Re: Find-VbrViFolder and Find-VBRViResourcePool return nothing

Post by mboswell »

Yes, I have tried the commands outside of the loop.
mboswell
Service Provider
Posts: 43
Liked: 3 times
Joined: Jul 21, 2022 10:40 pm
Full Name: Matthew Boswell
Contact:

Re: Find-VbrViFolder and Find-VBRViResourcePool return nothing

Post by mboswell »

Mildur wrote: Jun 01, 2023 7:17 am Hi Matt

I can see, that you have opened a case for the community edition. As a service provider you should have rental licenses which would give you guaranteed support responses.
But it's possible that support won't be able to help, because it looks like you are using a custom script.

I tried the following commands and it gives me a list of folders and resource Pools:

Code: Select all

$instantrecovery = Get-VBRInstantRecovery | select -First 1
$server = Get-VBRServer | Where-Object Name -eq $instantrecovery.EsxName
$resourcepool = Find-VBRViResourcePool -Server $server"
$folder = Find-VBRViFolder -Server $server
Best,
Fabian
Out of curiosity what version of ESXi is $server in this example?
Mildur
Product Manager
Posts: 9933
Liked: 2632 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Find-VbrViFolder and Find-VBRViResourcePool return nothing

Post by Mildur »

I run the test with a ESXI v7.0.2, 17867351 host.

Best,
Fabian
Product Management Analyst @ Veeam Software
mboswell
Service Provider
Posts: 43
Liked: 3 times
Joined: Jul 21, 2022 10:40 pm
Full Name: Matthew Boswell
Contact:

Re: Find-VbrViFolder and Find-VBRViResourcePool return nothing

Post by mboswell »

Hm. I was thinking maybe it was ESXi 8 that was the problem but I tried with a ESXi 7 host and got the same result. Did your test have any explicitly defined resource pools or folders? Example showing "Find-VBRResourcePool" working where "Find-VBRViResourcePool" does not:

Code: Select all

PS C:\Windows\system32> Find-VBRResourcePool -Server $server
WARNING: This cmdlet is obsolete, use Find-VBRViResourcePool instead.

Name                      Ref                 
----                      ---                 
Resources                 ha-root-pool        



PS C:\Windows\system32> Find-VBRViResourcePool -Server $server

PS C:\Windows\system32> 
mboswell
Service Provider
Posts: 43
Liked: 3 times
Joined: Jul 21, 2022 10:40 pm
Full Name: Matthew Boswell
Contact:

Re: Find-VbrViFolder and Find-VBRViResourcePool return nothing

Post by mboswell »

New support case # w/ rental license is 06096091
Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests