PowerShell script exchange
Post Reply
SvenP
Novice
Posts: 4
Liked: never
Joined: Mar 31, 2016 12:53 pm
Full Name: Sven Putze
Contact:

9.5 Update 4a - Powershell - Possible race condition?

Post by SvenP » Apr 18, 2019 12:56 pm

Before upgrading to version 9.5 update 4a, something like

Code: Select all

$NewJob = Add-VBRViBackupJob -Name "$JobName" -Description "$Description" -Entity $Entity -BackupRepository $Repository
Set-VBRJobAdvancedViOptions -Job $NewJob -VMToolsQuiesce $True
worked without any problems in a Cmdlet (the variables are set, of course).

After the upgrade the VMToolsQuiesce option is not set. If I enter the second code line manually some time (here is the possible race condition) afterwards the option will be set.
Same goes for

Code: Select all

Set-VBRJobAdvancedViOptions -Job $NewJob -SetResultsToVmAttribute $True -VmAttributeName "veeam"| Out-Null
Also in the variations

Code: Select all

# first query the new created job
Get-VBRJob -Name "$JOBName"|Set-VBRJobAdvancedViOptions -SetResultsToVmAttribute $True -VmAttributeName "veeam" | Out-Null
#or
Get-VBRJob -Name "$JOBName"|Set-VBRJobAdvancedViOptions -SetResultsToVmAttribute $True -VmAttributeName "veeam"
No errors are printed nor exceptions thrown. Inserting "sleep" didn't help either. Has anyone else experienced the same problem? Any ideas for a remedy?

HannesK
Veeam Software
Posts: 3226
Liked: 384 times
Joined: Sep 01, 2014 11:46 am
Location: Austria
Contact:

Re: 9.5 Update 4a - Powershell - Possible race condition?

Post by HannesK » Apr 18, 2019 2:24 pm

Hello,
I tested your code and it works for me. The quiesce option was set correctly.

Code: Select all

Add-PSSnapin VeeamPSSnapin
$Entity = Find-VBRViEntity -Name HK-Nano
$NewJob = Add-VBRViBackupJob -Name "BJ-Quiesce" -Description "Description" -Entity $Entity  -BackupRepository VBR-01-ReFS64k-Repo1
Set-VBRJobAdvancedViOptions -Job $NewJob -VMToolsQuiesce $true
As it seems to be a specific case, I suggest opening a support case. Please post the case number for reference.

Thanks,
Hannes

SvenP
Novice
Posts: 4
Liked: never
Joined: Mar 31, 2016 12:53 pm
Full Name: Sven Putze
Contact:

Re: 9.5 Update 4a - Powershell - Possible race condition?

Post by SvenP » Apr 19, 2019 10:22 am

Thank you! I will do so after the holidays when the office is manned again.

v.eremin
Product Manager
Posts: 16342
Liked: 1344 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: 9.5 Update 4a - Powershell - Possible race condition?

Post by v.eremin » Apr 22, 2019 11:58 am

I've also confirmed your script that sets attributes, so, it indeed seems to be environment specific problem. Thanks!

SvenP
Novice
Posts: 4
Liked: never
Joined: Mar 31, 2016 12:53 pm
Full Name: Sven Putze
Contact:

Re: 9.5 Update 4a - Powershell - Possible race condition?

Post by SvenP » May 24, 2019 8:46 am

So, finally opened Case # 03582291 a few minutes ago, let's wait and see.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 8 guests