-
- Influencer
- Posts: 13
- Liked: 1 time
- Joined: Feb 21, 2019 4:00 pm
- Full Name: Kim Johansen
- Contact:
How can i limit concurrent tasks of a Hyper-V host?
Like the title says, how can i limit concurrent tasks of a Hyper-V host with powershell?
I have not been able to find a command to do this.
Thanks in advance.
I have not been able to find a command to do this.
Thanks in advance.
-
- Veteran
- Posts: 1943
- Liked: 247 times
- Joined: Dec 01, 2016 3:49 pm
- Full Name: Dmitry Grinev
- Location: St.Petersburg
- Contact:
Re: How can i limit concurrent tasks of a Hyper-V host?
Hi Kim,
Have you read the article Set-VBRBackupRepository in the PowerShell Reference guide?
Another one for the Hyper-V proxy is here where you can set MaxTasks.
That's all I could find related to the topic.
Thanks!
Have you read the article Set-VBRBackupRepository in the PowerShell Reference guide?
Another one for the Hyper-V proxy is here where you can set MaxTasks.
That's all I could find related to the topic.
Thanks!
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How can i limit concurrent tasks of a Hyper-V host?
If you post a screenshot or location of the UI setting you're talking about, we will be able to tell you the name of suitable PS cmdlet. Thanks!
-
- Influencer
- Posts: 13
- Liked: 1 time
- Joined: Feb 21, 2019 4:00 pm
- Full Name: Kim Johansen
- Contact:
Re: How can i limit concurrent tasks of a Hyper-V host?
Hi veremin and DGrinev
Sorry for not replying sooner, work happened.
You can find the setting in: BACKUP INFRASTUCTURE -> Managed Servers -> Microsoft Hyper-V -> Right-click on a Hyper-V Server -> Properties -> Apply -> Max Tasks.
This is what I'm looking for (instead of New it says Edit in the top):
Add-VBRHvProxy has MaxTasks, but it is used when adding a Hyper-V Proxy. What I want is something like a Set-VBRHvProxy for modifying existing Hyper-V, but it doesn't appear to exist.
Sorry for not replying sooner, work happened.
You can find the setting in: BACKUP INFRASTUCTURE -> Managed Servers -> Microsoft Hyper-V -> Right-click on a Hyper-V Server -> Properties -> Apply -> Max Tasks.
This is what I'm looking for (instead of New it says Edit in the top):
Add-VBRHvProxy has MaxTasks, but it is used when adding a Hyper-V Proxy. What I want is something like a Set-VBRHvProxy for modifying existing Hyper-V, but it doesn't appear to exist.
-
- VeeaMVP
- Posts: 695
- Liked: 374 times
- Joined: Jun 24, 2019 1:39 pm
- Full Name: Chris Arceneaux
- Location: Georgia, USA
- Contact:
Re: How can i limit concurrent tasks of a Hyper-V host?
Hi Kim,
The code below will allow you to update an Off-Host proxy configuration.
If you're looking to update an On-Host proxy configuration, the below code will work on both types of proxies. Note that an undocumented function is used. Please use at your own risk as this is subject to change in the future.
The code below will allow you to update an Off-Host proxy configuration.
Code: Select all
$proxy = Get-VBRHvProxy -Name '10.0.2.110'
$options = $proxy.Options
$options.MaxTasksCount = 2
$proxy.SetOptions($options)
Code: Select all
$HvProxies = [Veeam.Backup.Core.CHvProxy]::GetAll()
$proxy = $HvProxies | Where-Object {$_.Name -eq '10.0.2.110'}
$options = $proxy.Options
$options.MaxTasksCount = 2
$proxy.SetOptions($options)
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: How can i limit concurrent tasks of a Hyper-V host?
Hi Kim,
Adding to what Chris wrote - I also documented your comments as a feature request:
1. Set-VBRHvHost cmdlet.
2. -MaxTasks attribute for Add-VBRHvHost and Set-VBRHvHost (on-host backup proxy configuration).
3. Set-VBRHvProxy cmdlet (off-host backup proxy configuration).
Thanks!
Oleg
Adding to what Chris wrote - I also documented your comments as a feature request:
1. Set-VBRHvHost cmdlet.
2. -MaxTasks attribute for Add-VBRHvHost and Set-VBRHvHost (on-host backup proxy configuration).
3. Set-VBRHvProxy cmdlet (off-host backup proxy configuration).
Thanks!
Oleg
-
- Influencer
- Posts: 13
- Liked: 1 time
- Joined: Feb 21, 2019 4:00 pm
- Full Name: Kim Johansen
- Contact:
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Jul 01, 2020 2:18 pm
- Full Name: Justin
- Contact:
Re: How can i limit concurrent tasks of a Hyper-V host?
So glad I found this!kjo@deif.com wrote: ↑Feb 03, 2020 11:35 am Hi veremin and DGrinev
Sorry for not replying sooner, work happened.
You can find the setting in: BACKUP INFRASTUCTURE -> Managed Servers -> Microsoft Hyper-V -> Right-click on a Hyper-V Server -> Properties -> Apply -> Max Tasks.
This is what I'm looking for (instead of New it says Edit in the top):
Add-VBRHvProxy has MaxTasks, but it is used when adding a Hyper-V Proxy. What I want is something like a Set-VBRHvProxy for modifying existing Hyper-V, but it doesn't appear to exist.
-
- Enthusiast
- Posts: 78
- Liked: 46 times
- Joined: Dec 10, 2019 3:59 pm
- Full Name: Ryan Walker
- Contact:
Re: How can i limit concurrent tasks of a Hyper-V host?
Did this get disabled? I'm getting an error now when trying to use this script.
So it pulls the maxtaskscount fine but doing an = isn't assigning a new value to the object.
Worked fine prior to 11/11a - wondering if they changed how this value is assigned/handled in powershell.
When looking at the hv details it almost seems like they added the maxtaskscount not as an option, unless it's always been this way, but still doesn't let you adjust it:
Digging in further to try another route, it looks like perhaps they set this read only:
'maxtaskscount' is a ReadOnly property
Why Veeam? Why...
Code: Select all
PS C:\scripts\> $options.MaxTasksCount = 6
The property 'MaxTasksCount' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:1
+ $options.MaxTasksCount = 6
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException
PS C:\scripts> $options.maxtaskscount
4
4
4
4
4
Worked fine prior to 11/11a - wondering if they changed how this value is assigned/handled in powershell.
When looking at the hv details it almost seems like they added the maxtaskscount not as an option, unless it's always been this way, but still doesn't let you adjust it:
Code: Select all
PS C:\scripts> $proxy.maxtaskscount
4
4
4
4
4
PS C:\scripts> $proxy.maxtaskscount=6
The property 'maxtaskscount' cannot be found on this object. Verify that the property exists and can be set.
Code: Select all
PS C:\scripts> Foreach($proxy_specific in $proxy){$proxy_specific.maxtaskscount = 6}
'maxtaskscount' is a ReadOnly property.
Why Veeam? Why...
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: How can i limit concurrent tasks of a Hyper-V host?
Hi Ryan,
In your first two code snippets it looks like you are trying to set the value for MaxTasksCount property for an array of proxies at once. If it is the case, makes sense that it doesn't work.
As for the read-only restriction, yes, our developers might have set it so. But as Chris mentioned in his message, this function is undocumented and a subject to changes in the future, which means it is not supported. Besides, setting properties on objects directly via Powershell is not a best practice and should be avoided unless no other way is available. Cmdlet parameters should be used instead. That's why I noted a feature request for this.
Thanks,
Oleg
In your first two code snippets it looks like you are trying to set the value for MaxTasksCount property for an array of proxies at once. If it is the case, makes sense that it doesn't work.
As for the read-only restriction, yes, our developers might have set it so. But as Chris mentioned in his message, this function is undocumented and a subject to changes in the future, which means it is not supported. Besides, setting properties on objects directly via Powershell is not a best practice and should be avoided unless no other way is available. Cmdlet parameters should be used instead. That's why I noted a feature request for this.
Thanks,
Oleg
Who is online
Users browsing this forum: No registered users and 10 guests