PowerShell script exchange
Post Reply
Leo0601
Enthusiast
Posts: 41
Liked: 2 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Virtual lab is not creating through PowerShell (v10)

Post by Leo0601 »

Hi Experts,

Virtual lab is not creating through PowerShell for Veeam 10. I am getting the below error while creating a virtual lab through PowerShell in vSphere 7.0.
Add-VBRViSimpleVirtualLab : Failed to add virtual lab. Specify both NetworkMappingRule and NetworkOptions parameters.
Below is my powershell code.

Code: Select all

$Server = Get-VBRServer -Name "ESXiIP"
$DatastoreName = (Find-VBRViDatastore -Server $Server | select Name, Freespace -Unique| Sort-Object -Descending -Property  FreeSpace | select -First 1).Name
$Datastore = Find-VBRViDatastore -Server $Server -Name $DatastoreName 
$Network = Get-VBRViServerNetworkInfo -Server $Server | Where-Object {$_.NetworkName -eq "VMNetwork(o)VLAN10-DepondsOnYourNetwork"}
$Appliance = New-VBRViVirtualLabProxyAppliance -Server $Server -Datastore $Datastore -Network $Network -ObtainIPAutomatically -ObtainDNSAutomatically -Name ProxyApplianceName
Add-VBRViSimpleVirtualLab -Server $Server -CacheDatastore $Datastore -Name VirtualLabName -ProxyAppliance $Appliance
Can someone please help to fix it.

I am looking forward to hear from you.
Mildur
Product Manager
Posts: 8735
Liked: 2294 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Virtual lab is not creating through PowerShell (v10)

Post by Mildur »

Hi Leo

I split your question from the other topic. Please use new ones if it's not related to the other question.

For your question. The error message is telling you to specify NetworkMappingRule and NetworkOptions parameters.
That doesn't sound like adding a simple virtual lab. It looks like powershell is trying to add an advanced virtual lab. Do you see the same error if you try the example in our userguide?
https://helpcenter.veeam.com/archive/ba ... allab.html

Please also consider to upgrade to V12. V10 is an old version of Veeam Backup & Replication.
You can upgrade if you are running V10a already.

Best,
Fabian
Product Management Analyst @ Veeam Software
Mildur
Product Manager
Posts: 8735
Liked: 2294 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Virtual lab is not creating through PowerShell (v10)

Post by Mildur »

@Leo0601
Please don't post the same question in 3 different topics. I deleted all of them.

Thanks,
Fabian
Product Management Analyst @ Veeam Software
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Virtual lab is not creating through PowerShell (v10)

Post by oleg.feoktistov »

The exception refers to the parameters that don't exist in Add-VBRViSimpleVirtualLab signature. However, the validation for these parameters is present in the cmdlet code, which doesn't make sense to me. I'll discuss it with Dev/QA and follow up the thread. Thanks
Leo0601
Enthusiast
Posts: 41
Liked: 2 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: Virtual lab is not creating through PowerShell (v10)

Post by Leo0601 »

@Mildur

Hi Fabian,

Thanks for splited my question.

Sorry I was looking for experts replies from last week itself, Since I haven't got any replies, I have posted my question on other Virtual lab-related topics.

By the way we cant upgrade to latest Veeam version (V12) without client request, Also it needs some downtime. So we cant upgrade it right now.
Leo0601
Enthusiast
Posts: 41
Liked: 2 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: Virtual lab is not creating through PowerShell (v10)

Post by Leo0601 »

@oleg.feoktistov

Hi Oleg,

You have already fixed my Veeam-related issue twice, I am glad you replied now. Thank you.

Earlier the same code was working so perfectly, recently I am facing this issue.

Yes please let me know.

I am looking forward to hearing from you.
Leo0601
Enthusiast
Posts: 41
Liked: 2 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: Virtual lab is not creating through PowerShell (v10)

Post by Leo0601 »

@oleg.feoktistov

Hi Oleg,

I am waiting for your reply.

Once you done with the discussion please let me know.

I am looking forward to hear from you.
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Virtual lab is not creating through PowerShell (v10)

Post by oleg.feoktistov » 1 person likes this post

Hi Leo,

As I anticipated, we confirmed it as a bug. To be fixed in the next release. Can't say for v10, but in my v11 lab the same code works perfectly. Was this code working with the same VBR version before? Have you updated/changed anything in the infrastructure since the time this code was working?

Best regards,
Oleg
Leo0601
Enthusiast
Posts: 41
Liked: 2 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: Virtual lab is not creating through PowerShell (v10)

Post by Leo0601 »

Hi Oleg,

Thanks for your reply and Confirmation. Your reply really helpful for me & Means a lot.

Yes, it worked perfectly earlier in the same setup. Recently only facing this issue. We have already tried with advance virtual lab creation cmdlet. Since it was not working, We tried with Add-VBRViSimpleVirtualLab which was suggested by veeam officals like you.

If its not possible in v10, Can I get one email from any Veeam official like its not possible to create Virtual lab in v10 through Powershell. Then it means a lot for me. I can share that email to my client.

I am looking forward to hear from you.

Regards
Leo
Leo0601
Enthusiast
Posts: 41
Liked: 2 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: Virtual lab is not creating through PowerShell (v10)

Post by Leo0601 »

@oleg.feoktistov

Hi Oleg,

Can I have only one mail confirmation from you or any other Veeam official like "Its not possible to create Virtual lab in v10 through Powershell".

That would help me to close the client request - Automation of Virtual lab creation in v10.

I am waiting for your reply.

Regards
Leo
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Virtual lab is not creating through PowerShell (v10)

Post by oleg.feoktistov »

Hi Leo,

It doesn't mean it's impossible. It means that we're yet to find out what's causing the issue. I'll follow up the thread once I find out a possible reason for this error.

Best regards,
Oleg
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Virtual lab is not creating through PowerShell (v10)

Post by oleg.feoktistov »

Hi Leo,

So this exception is thrown in cases when we cannot resolve default network settings for your virtual lab. It most likely means that you need to use advanced configuration and pass them manually. But it should work. Is the client also experiencing this issue when creating a virtual lab, either simple or advanced, through the UI?

Thanks,
Oleg
Leo0601
Enthusiast
Posts: 41
Liked: 2 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: Virtual lab is not creating through PowerShell (v10)

Post by Leo0601 »

@oleg.feoktistov

Hi Oleg,

Thanks for your reply. If it's possible then it's great.

Long back we used advanced virtual lab methods through PowerShell. Can you please guide me on how to create Virtual Lab with the advanced method.

Just virtual lab creation is enough, I am not looking for any configuration.

Looking forward to hear from you.

Regards
Leo
Leo0601
Enthusiast
Posts: 41
Liked: 2 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: Virtual lab is not creating through PowerShell (v10)

Post by Leo0601 »

@oleg.feoktistov

Hi Oleg,

I am waiting for your reply.

Looking forward to hearing from you.

Thanks.

Regards
Leo
Leo0601
Enthusiast
Posts: 41
Liked: 2 times
Joined: Oct 13, 2020 1:40 pm
Full Name: Leo
Contact:

Re: Virtual lab is not creating through PowerShell (v10)

Post by Leo0601 »

Hi Experts,

In below link I have noticed, Add-VBRViSimpleVirtualLab and Add-VBRViAdvancedVirtualLab not woking in v10 & v11. It got fixed in v12. If its not possible in v10 can I got only one email its not possible in v10.
If its possible in v10 please let me know which way I have to follow.
I am in hurry to close this task. Please let me know.

powershell-f26/virtual-lab-standalone-h ... 73081.html
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests