Powershell script failes for the vcenter server

PowerShell script exchange

Powershell script failes for the vcenter server

Veeam Logoby sorin.andruseac » Thu Jul 12, 2018 6:10 am

Hi all,

I'm using Veeam Backup and Replication 9.5 free and the standard powershell script.
However in the list of the VMs I also have the vcenter server. It backups ok all the VMs with the exception of the vcenter server. It fails with the error:

Code: Select all
Start-VBRZip : Veeam Backup Free Edition does not support of multiple VMs backup. Specify a single VM, or install a paid product license.


Has anyone else experienced this?

Thanks,
sorin.andruseac
Novice
 
Posts: 4
Liked: never
Joined: Thu Jul 12, 2018 6:05 am
Full Name: Sorin

Re: Powershell script failes for the vcenter server

Veeam Logoby v.Eremin » Thu Jul 12, 2018 11:41 am

With free edition you cannot backup multiple VMs within one VeeamZIP task. You have to backup them one by one. Thanks.
v.Eremin
Veeam Software
 
Posts: 14812
Liked: 1113 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Powershell script failes for the vcenter server

Veeam Logoby sorin.andruseac » Thu Jul 12, 2018 1:44 pm

well ... the script backups all vms one by one successfully. However in the list of the VMs is also the vcenter server. Only for this VM the backup fails wih the error above.
sorin.andruseac
Novice
 
Posts: 4
Liked: never
Joined: Thu Jul 12, 2018 6:05 am
Full Name: Sorin

Re: Powershell script failes for the vcenter server

Veeam Logoby v.Eremin » Thu Jul 12, 2018 1:54 pm

Chances are, the script assumes it's a container of VMs and therefore fails. Thanks.
v.Eremin
Veeam Software
 
Posts: 14812
Liked: 1113 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Powershell script failes for the vcenter server

Veeam Logoby sorin.andruseac » Thu Jul 12, 2018 2:03 pm

The script has a list a VMs:

$VMNames = "VM1","VM2","VcenterServer","VM3"
foreach ($VMName in $VMNames)
{
Start-VBRZip -Entity $VM
}

I removed irrelevant parts of the script.
It backups ok all the VMs, only for the Vcenter server fails with the error above.

Thanks in advance for any help.
sorin.andruseac
Novice
 
Posts: 4
Liked: never
Joined: Thu Jul 12, 2018 6:05 am
Full Name: Sorin

Re: Powershell script failes for the vcenter server

Veeam Logoby sorin.andruseac » Thu Jul 12, 2018 2:13 pm

On the second thought you are right indeed.

Code: Select all
Find-VBRViEntity -Name $VMName -Server $Server


returns two "entities" one of type VM and one of type VC. As a quick fix I added a filter and rewrite the above line like this:

Code: Select all
Find-VBRViEntity -Name $VMName -Server $Server |?{$_.type -eq 'vm'}


Thanks for your help, this can be closed :)
sorin.andruseac
Novice
 
Posts: 4
Liked: never
Joined: Thu Jul 12, 2018 6:05 am
Full Name: Sorin

Re: Powershell script failes for the vcenter server

Veeam Logoby v.Eremin » Thu Jul 12, 2018 2:44 pm

That's exactly what I suspected. Glad you've found a way to solve the issue.

Should other help be needed, don't hesitate to let us know.

Thanks.
v.Eremin
Veeam Software
 
Posts: 14812
Liked: 1113 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 8 guests