PowerShell script exchange
Post Reply
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

vCloud backup and Get-VBRTaskSession

Post by masonit »

Hi!

With vsphere vm backup, when I lookup tasksessions for at specific vm in a job. I match using "Get-VBRJobObject.Objectid" data with "Get-VBRTaskSession.Info.ObjectId".

Now I try to do the same thing with vcloud backup. vCloud vms is specifically added to job. But I can't find a match between "Get-VBRJobObject.Objectid" data with "Get-VBRTaskSession.Info.ObjectId".
From "Get-VBRTaskSession.Info.ObjectId" I get an id that I can't find anywhere. I guess it would be possible to match vm name instead. But I would prefer to match using id. How can I trace my vcloud "Get-VBRJobObject.Objectid" to specific tasksessions for vcloud backup?

\Magnus
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by oleg.feoktistov »

Hi Magnus,

Just to clarify, which VBR precise version are you talking about?

Best regards,
Oleg
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by masonit »

Hi!

10a.

\Magnus
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by oleg.feoktistov » 1 person likes this post

Reproduced your issue in my lab. Checking with QA. Please, stay tuned. Thanks!
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by masonit »

Hi!

Any update on this?

\Masonit
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by oleg.feoktistov »

Hi,

No news on that, unfortunately, as the QA team responsible for this feature have been busy with v11 pre-release testing.
Now that it is passed, we'll discuss it with the QA engineer, who is aware of this, as soon as he gets back from vacation next week.

Thanks,
Oleg
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by oleg.feoktistov »

Hi Magnus,

Small update. We found the cause of such discrepancy - if a virtual machine is added directly as a vcloud backup job include, on each task session run it is referenced by the object related to vSphere infrastructure. So, the id you see in task session object is the id of VM in vCenter.
Entries for both objects are kept in [Backup.Model.ObjectsView]. Now we are looking into backend code to determine whether it is possible to match these objects by any means other than by their names. I will keep you posted on the outcome.

Thanks,
Oleg
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by oleg.feoktistov »

We checked this together with developers and came to conclusion that, unfortunately, there is no way to correlate VM objects from job includes and VM objects from task sessions in vCD backup jobs if VMs are added directly. Currently, the only way to bind them through powershell is by name.
However, I noted this for further internal discussions. Thanks!
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by masonit »

Hi!

Ok, now I know. Thanks for the update!

\Magnus
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by masonit »

Hi!

Still having this issue in version 11.0.1.1261. This time I am trying to match id from Get-VBRBackup.GetAllChildrenStorages().ObjectId with Get-VBRJobObject.Objectid. Works fine with normal vsphere vm backup where vms is added in backupjob. But not for the same setup with vcloud vms. Any update on this?

\Maso
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by masonit »

We are moving more and more towards vCloud director. Not having a unique key between Veeam cmdlets for vCloud vms as you have with vSphere vms. Is a big issue when trying to automate vCloud workloads in Veeam..

@Veeam: Any update on this problem?

\Maso
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by oleg.feoktistov »

No updates on the subject so far. I'll raise this question internally once again and follow up the thread. Thanks!
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by masonit »

Hi!

Any update?
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by oleg.feoktistov »

No updates so far, the internal conversation is still ongoing. I'll update the thread once I have something. Thanks
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by masonit »

Ok, thanks for update. You mentioned earlier in the thread this "on each task session run it is referenced by the object related to vSphere infrastructure. So, the id you see in task session object is the id of VM in vCenter".

I can't find any task session id that match any of the vcenter or vcloud id for a vm. Could you be more specific on what id that should match? Thanks!

\Maso
oleg.feoktistov wrote: Apr 16, 2021 3:06 pm Hi Magnus,

Small update. We found the cause of such discrepancy - if a virtual machine is added directly as a vcloud backup job include, on each task session run it is referenced by the object related to vSphere infrastructure. So, the id you see in task session object is the id of VM in vCenter.
Entries for both objects are kept in [Backup.Model.ObjectsView]. Now we are looking into backend code to determine whether it is possible to match these objects by any means other than by their names. I will keep you posted on the outcome.

Thanks,
Oleg
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: vCloud backup and Get-VBRTaskSession

Post by oleg.feoktistov »

The problem is you can't really match it with anything besides vsphere hierarchy object id. But then it won't point you to vcd object, nor will it hold any reference to it:

Code: Select all

$job = Get-VBRJob -Name 'Backup Job 6'
$objects = Get-VBRJobObject -Job $job
$sessions = Get-VBRBackupSession | where {$_.JobId -eq $job.Id}
$taskSessions = Get-VBRTaskSession -Session $sessions
[Veeam.Backup.Core.CHierarchyObj]::Find($taskSessions[1].ObjectId)
Also, in backup.model.objectsview table they are also kept separately and don't reference each other.
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests