PowerShell script exchange
Post Reply
sandsturm
Veteran
Posts: 291
Liked: 25 times
Joined: Mar 23, 2015 8:30 am
Contact:

create VLAB based on VMs from StorageSnapshots

Post by sandsturm »

Hi

I want to create a virtual LAB with VMs from StorageSnapshots. If I do this via GUI, i have the option to choose VMs from a storagesnapshot, but if I want to used powershell for that I couldn't find it. I tried to create an ApplicationGroup with Add-VBRViApplicationGroup or Add-VSBViApplicationGroup, but neither has the option to get VMs from a storagesnapshot. How do I have to do that?

thx
sandsturm
david.domask
Veeam Software
Posts: 2123
Liked: 513 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: create VLAB based on VMs from StorageSnapshots

Post by david.domask »

Hi @sandsturm, just to confirm, you already tried fetching the job with Get-VBRJob, get the Job Objects with Get-VBRJobObject, and then passed that to New-VBRSureBackupVM?

https://helpcenter.veeam.com/docs/backu ... ml?ver=110

My vlab filer is down so I cannot test at the moment, but as long as they're added by VM I think it works? I've not really tested this though.
David Domask | Product Management: Principal Analyst
sandsturm
Veteran
Posts: 291
Liked: 25 times
Joined: Mar 23, 2015 8:30 am
Contact:

Re: create VLAB based on VMs from StorageSnapshots

Post by sandsturm »

I just tried to pass the VMs to New-VBRSureBackupVM, but..... it's a bit complex :-) I configured veeam backupjobs to just create storagesnapshots. I use vSphere tags as the source for these veeam storagesnapshot jobs. These vSphere tags are tagged on our datastores and therefore storagesnapshots for all the virtual machines running on these datastores are made. The problem is now, that I cannot use the Get-VBRJobObject cmdlet, because I just get back the vsphere tags which are sat on the vSphere datastores, :-) Do you understand what i mean? Is there another way to pass the VMs to Add-VBRViApplicationGroup instead of using New-VBRSureBackupVM?

thx,
sandsturm
david.domask
Veeam Software
Posts: 2123
Liked: 513 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: create VLAB based on VMs from StorageSnapshots

Post by david.domask »

Hi @sandsturm,

Aha, I understand you completely :) And I was afraid of this answer.

I'm afraid that as I understand the cmdlet, New-VBRSureBackupVM requires a Job Object, but when you add by tags you cannot do this :(

You can try linked jobs, but this might include undesired machines, so maybe it's not suitable.
David Domask | Product Management: Principal Analyst
sandsturm
Veteran
Posts: 291
Liked: 25 times
Joined: Mar 23, 2015 8:30 am
Contact:

Re: create VLAB based on VMs from StorageSnapshots

Post by sandsturm »

Thanks a lot for your fast reply. That is really sad to hear, that I don't have another option, but thanks anyway for your answer! Using vSphere tags as source for backupjobs is quite common I think. Maybe you can pass a request to your dev-guys, so they can plan to add that in an upcoming release?

thx,
sandsturm
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: create VLAB based on VMs from StorageSnapshots

Post by oleg.feoktistov »

Hi @sandsturm,

Yes, it's quite demanded feature. We actually plan to enhance New-VBRSureBackupVM cmdlet in v12 adding a new parameter so that you could pass any restore point there instead of going with CObjectInJob objects and such. The reason for this change is that on the backend we check if a backup already exists for the entity you are about to add and fail if we don't find any. So we could just add restore points directly anyway. I think it should also do the trick in your case.

Thanks,
Oleg
sandsturm
Veteran
Posts: 291
Liked: 25 times
Joined: Mar 23, 2015 8:30 am
Contact:

Re: create VLAB based on VMs from StorageSnapshots

Post by sandsturm »

That's great news.

thx
sandsturm
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests