sptest232 commented on issue #6599:
URL: https://github.com/apache/cloudstack/issues/6599#issuecomment-1335062902

   The same problem with:CloudStack 4.17.1.0 + Veeam Backup and Replication 9.5 
Update 4, Veeam Backup Enterprise Manager Service Version 9.5.4.2866 + vSphere 
6.5.0.41000, Windows Server 2019 Standard version 1809, 
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5, PowerShell 5.1.17763.2931
   
   I found that PowerShell VeeamPSSnapin (Veeam Backup and Replication 9.5 
Update 4) doesn't have necessary object "**VBRJob**" method 
"**GetBackupTargetRepository()**" and it doesn't understand the sign "**^**" in 
command "**Add-PSSnapin VeeamPSSnapin;$Job = Get-VBRJob -name 
"predef";$Job.GetBackupTargetRepository() ^| select Name | Format-List**" so 
CloudStack buckup plugin doesn't work.
   
   Here some logs and information:
   
   
http://docs.cloudstack.apache.org/en/latest/adminguide/veeam_plugin.html#veeam-backup-and-recovery-plugin
   
   CloudStack 4.17.1.0
   vSphere 6.5.0.41000
   Windows Server 2019 Standard version 1809
   OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
   PowerShell 5.1.17763.2931
   Veeam Backup and Replication 9.5 Update 4
   Veeam Backup Enterprise Manager Service Version 9.5.4.2866
   
   
   
   ##### PowerShell Information
   
   Add-PSSnapin VeeamPSSnapin;$Job = Get-VBRJob -name 
"predef";$Job.GetBackupTargetRepository() ^| select Name | Format-List
   At line:1 char:94
   + ...  Get-VBRJob -name "predef";$Job.GetBackupTargetRepository() ^| select 
...
   +                                                                 ~
   Unexpected token '^' in expression or statement.
       + CategoryInfo          : ParserError: (:) [], 
ParentContainsErrorRecordException
       + FullyQualifiedErrorId : UnexpectedToken
   
   
   Add-PSSnapin VeeamPSSnapin;$Job = Get-VBRJob -name 
"predef";$Job.GetBackupTargetRepository() ^| select Name | Format-List
   At line:1 char:94
   + ...  Get-VBRJob -name "predef";$Job.GetBackupTargetRepository() ^| select 
...
   +                                                                 ~
   Unexpected token '^' in expression or statement.
       + CategoryInfo          : ParserError: (:) [], 
ParentContainsErrorRecordException
       + FullyQualifiedErrorId : UnexpectedToken
   
   
   
    Get-VBRJob -name "predef" | Get-Member
   
   
      TypeName: Veeam.Backup.Core.CBackupJob
   
   Name                          MemberType Definition
   ----                          ---------- ----------
   CanRunByScheduler             Method     bool 
ISchedulableJob.CanRunByScheduler()
   CheckDeleteAllowed            Method     void CheckDeleteAllowed()
   Delete                        Method     void 
Delete(Veeam.Backup.Model.CModifiedUserInfo initiator)
   DisableScheduler              Method     void 
DisableScheduler(Veeam.Backup.Model.CModifiedUserInfo initiator)
   EnableScheduler               Method     void 
EnableScheduler(Veeam.Backup.Model.CModifiedUserInfo initiator)
   Equals                        Method     bool Equals(System.Object obj)
   FindChildEpSyncBackupJob      Method     Veeam.Backup.Core.CBackupJob 
FindChildEpSyncBackupJob()
   FindChildOracleLogBackupJob   Method     Veeam.Backup.Core.CBackupJob 
FindChildOracleLogBackupJob()
   FindChildSqlLogBackupJob      Method     Veeam.Backup.Core.CBackupJob 
FindChildSqlLogBackupJob()
   FindInitialRepository         Method     Veeam.Backup.Core.CBackupRepository 
FindInitialRepository()
   FindLastBackup                Method     Veeam.Backup.Core.CBackup 
FindLastBackup()
   FindLastBaseSession           Method     Veeam.Backup.Core.CBaseSession 
FindLastBaseSession()
   FindLastOib                   Method     Veeam.Backup.Core.COib 
FindLastOib(guid objId)
   FindLastSession               Method     Veeam.Backup.Core.CBackupSession 
FindLastSession(), Veeam.Backup.Model.CBaseSessionInfo IJob.FindLastSession()
   FindParentJob                 Method     Veeam.Backup.Core.CBackupJob 
FindParentJob()
   FindSourceWanAccelerator      Method     Veeam.Backup.Core.CWanAccelerator 
FindSourceWanAccelerator()
   FindTargetRepository          Method     Veeam.Backup.Core.CBackupRepository 
FindTargetRepository()
   FindTargetWanAccelerator      Method     Veeam.Backup.Core.CWanAccelerator 
FindTargetWanAccelerator()
   FindUserCryptoKey             Method     Veeam.Backup.Core.CCryptoKey 
FindUserCryptoKey()
   GetChildJobs                  Method     Veeam.Backup.Core.CBackupJob[] 
GetChildJobs()
   GetCredsId                    Method     guid GetCredsId()
   GetDesktopOij                 Method     Veeam.Backup.Core.CObjectInJob 
GetDesktopOij()
   GetDiskEffectiveCompression   Method     int 
GetDiskEffectiveCompression(Veeam.Backup.Core.IStorageCommander 
storageCommander, guid storageId)
   GetEndPointOijs               Method     Veeam.Backup.Core.CEndPointOij[] 
GetEndPointOijs()
   GetFilesEffectiveCompression  Method     int 
GetFilesEffectiveCompression(Veeam.Backup.Core.IStorageCommander 
storageCommander, guid storageId)
   GetGuestProcessingProxyHosts  Method     Veeam.Backup.Core.Common.CHost[] 
GetGuestProcessingProxyHosts()
   GetGuestProxies               Method     Veeam.Backup.Core.IProxyServer[] 
GetGuestProxies()
   GetHashCode                   Method     int GetHashCode()
   GetHvOijs                     Method     Veeam.Backup.Core.HyperV.CHvOij[] 
GetHvOijs()
   GetImageBackupJob             Method     Veeam.Backup.Core.CBackupJob 
GetImageBackupJob()
   GetInitialRepository          Method     Veeam.Backup.Core.CBackupRepository 
GetInitialRepository()
   GetJobDisplayName             Method     string GetJobDisplayName()
   GetLastBackup                 Method     Veeam.Backup.Core.CBackup 
GetLastBackup()
   GetLastResult                 Method     
Veeam.Backup.Model.CBaseSessionInfo+EResult GetLastResult(), 
Veeam.Backup.Model.CBaseSessionInfo+EResult IJob.GetLastResult()
   GetLastState                  Method     
Veeam.Backup.Model.CBaseSessionInfo+EState GetLastState(), 
Veeam.Backup.Model.CBaseSessionInfo+EState IJob.GetLastState()
   GetObjectsInJob               Method     Veeam.Backup.Core.CObjectInJob[] 
GetObjectsInJob()
   GetOptions                    Method     Veeam.Backup.Model.CJobOptions 
GetOptions()
   GetProxy                      Method     
System.Collections.Generic.IEnumerable[Veeam.Backup.Core.IBackupProxy] 
GetProxy()
   GetScheduleOptions            Method     Veeam.Backup.Model.ScheduleOptions 
GetScheduleOptions()
   GetSourceOffHostHvProxies     Method     Veeam.Backup.Core.CHvProxy[] 
GetSourceOffHostHvProxies()
   GetSourceViProxies            Method     Veeam.Backup.Core.CViProxy[] 
GetSourceViProxies()
   GetSourceWanAccelerator       Method     Veeam.Backup.Core.CWanAccelerator 
GetSourceWanAccelerator()
   GetTargetHost                 Method     Veeam.Backup.Core.Common.CHost 
GetTargetHost()
   GetTargetOffhostHvProxies     Method     Veeam.Backup.Core.CHvProxy[] 
GetTargetOffhostHvProxies()
   GetTargetProxies              Method     
System.Collections.Generic.IEnumerable[Veeam.Backup.Core.IBackupProxy] 
GetTargetProxies()
   GetTargetRepository           Method     Veeam.Backup.Core.CBackupRepository 
GetTargetRepository()
   GetTargetViProxies            Method     Veeam.Backup.Core.CViProxy[] 
GetTargetViProxies()
   GetTargetWanAccelerator       Method     Veeam.Backup.Core.CWanAccelerator 
GetTargetWanAccelerator()
   GetType                       Method     type GetType()
   GetVcdOijs                    Method     Veeam.Backup.Core.CObjectInJob[] 
GetVcdOijs()
   GetViOijs                     Method     Veeam.Backup.Core.CObjectInJob[] 
GetViOijs()
   GetVssOptions                 Method     
Veeam.Backup.Model.CGuestProcessingOptions GetVssOptions()
   IsBackupWindowAllowRunJobNow  Method     bool IsBackupWindowAllowRunJobNow()
   IsCloudTargetJob              Method     bool IsCloudTargetJob()
   IsEpAgentManagementClusterJob Method     bool IsEpAgentManagementClusterJob()
   IsFileCopy                    Method     bool IsFileCopy()
   IsInBackupWindow              Method     bool IsInBackupWindow(datetime now)
   IsSanSnapshotOnly             Method     bool IsSanSnapshotOnly()
   IsStopped                     Method     bool IsStopped()
   IsWanAcceleratorEnabled       Method     bool IsWanAcceleratorEnabled()
   LogHvProxySettings            Method     void LogHvProxySettings()
   LogJobOptions                 Method     void 
LogJobOptions(Veeam.Backup.Model.CDbBackupJobInfo+Mode mode)
   LogJobSession                 Method     void 
LogJobSession(Veeam.Backup.Core.CBackupSession jobSession, 
Veeam.Backup.Core.IBackupTask[] tasks)
   Reload                        Method     void Reload()
   ResetScheduleDependentJobs    Method     void 
ResetScheduleDependentJobs(Veeam.Backup.Core.CBackupJob parentJob)
   SetCreds                      Method     void SetCreds(guid credsId)
   SetOptions                    Method     void 
SetOptions(Veeam.Backup.Model.CJobOptions jobOptions, 
Veeam.Backup.Model.CModifiedUserInfo initiator)
   SetScheduleDependentJobs      Method     void 
SetScheduleDependentJobs(Veeam.Backup.Core.CBackupJob job)
   SetVssOptions                 Method     void 
SetVssOptions(Veeam.Backup.Model.CGuestProcessingOptions vssOptions)
   SureMoveObj                   Method     void SureMoveObj(guid objectId, 
Veeam.Backup.Model.CDbObjectInJobInfo+EType sourceType, 
Veeam.Backup.Model.CDbObjectInJobInfo+EType targetType)
   SureObjAdded                  Method     void SureObjAdded(guid objectId, 
Veeam.Backup.Model.CDbObjectInJobInfo+EType enType)
   ToString                      Method     string ToString()
   Update                        Method     void Update()
   UpdateNextRunTime             Method     void UpdateNextRunTime()
   AutoScheduleOptions           Property   
Veeam.Backup.Model.CAutoScheduleOptions AutoScheduleOptions {get;}
   BackupPlatform                Property   Veeam.Backup.Common.CPlatform 
BackupPlatform {get;}
   BackupPolicyTag               Property   string BackupPolicyTag {get;}
   BackupStorageOptions          Property   
Veeam.Backup.Model.CDomBackupStorageOptions BackupStorageOptions {get;}
   BackupTargetOptions           Property   
Veeam.Backup.Model.CDomBackupTargetOptions BackupTargetOptions {get;}
   CloudReplicaTargetOptions     Property   
Veeam.Backup.Model.CDomCloudReplicaTargetOptions CloudReplicaTargetOptions 
{get;}
   Description                   Property   string Description {get;}
   FreeBackupImpl                Property   
Veeam.Backup.Core.CFreeBackupJobImpl FreeBackupImpl {get;}
   HvReplicaTargetOptions        Property   
Veeam.Backup.Model.CDomHvReplicaTargetOptions HvReplicaTargetOptions {get;}
   HvSourceOptions               Property   
Veeam.Backup.Model.CDomHvSourceOptions HvSourceOptions {get;}
   Id                            Property   guid Id {get;}
   Info                          Property   Veeam.Backup.Model.CDbBackupJobInfo 
Info {get;}
   IsAgentManagement             Property   bool IsAgentManagement {get;}
   IsBackup                      Property   bool IsBackup {get;}
   IsBackupJob                   Property   bool IsBackupJob {get;}
   IsBackupPolicy                Property   bool IsBackupPolicy {get;}
   IsBackupSync                  Property   bool IsBackupSync {get;}
   IsChildJob                    Property   bool IsChildJob {get;}
   IsCloudReplica                Property   bool IsCloudReplica {get;}
   IsContinuous                  Property   bool IsContinuous {get;}
   IsEndpointJob                 Property   bool IsEndpointJob {get;}
   IsEpPolicy                    Property   bool IsEpPolicy {get;}
   IsFileTapeBackup              Property   bool IsFileTapeBackup {get;}
   IsForeverIncremental          Property   bool IsForeverIncremental {get;}
   IsFree                        Property   bool IsFree {get;}
   IsIdle                        Property   bool IsIdle {get;}
   IsInitialReplica              Property   bool IsInitialReplica {get;}
   IsLegacyReplica               Property   bool IsLegacyReplica {get;}
   IsLinuxEndpoint               Property   bool IsLinuxEndpoint {get;}
   IsMappingReplica              Property   bool IsMappingReplica {get;}
   IsReplica                     Property   bool IsReplica {get;}
   IsRequireRetry                Property   bool IsRequireRetry {get;}
   IsRunning                     Property   bool IsRunning {get;}
   IsScheduleEnabled             Property   bool IsScheduleEnabled {get;}
   IsSnapshotReplica             Property   bool IsSnapshotReplica {get;}
   IsTapeBackup                  Property   bool IsTapeBackup {get;}
   IsVmCopy                      Property   bool IsVmCopy {get;}
   IsVmTapeBackup                Property   bool IsVmTapeBackup {get;}
   JobScriptCommand              Property   
Veeam.Backup.Model.CDomJobScriptCommand JobScriptCommand {get;}
   JobTargetType                 Property   Veeam.Backup.Model.EDbJobType 
JobTargetType {get;}
   JobType                       Property   Veeam.Backup.Model.EDbJobType 
JobType {get;}
   LinkedBackups                 Property   Veeam.Backup.Core.CLinkedBackup[] 
LinkedBackups {get;}
   LinkedJobIds                  Property   
System.Collections.Generic.IEnumerable[guid] LinkedJobIds {get;}
   LinkedJobs                    Property   Veeam.Backup.Core.CLinkedJobs[] 
LinkedJobs {get;}
   LinkedRepositories            Property   
Veeam.Backup.Core.CLinkedBackupRepository[] LinkedRepositories {get;}
   LinkedRepositoryIds           Property   
System.Collections.Generic.IEnumerable[guid] LinkedRepositoryIds {get;}
   LogNameMainPart               Property   string LogNameMainPart {get;}
   Name                          Property   string Name {get;}
   NameWithDescription           Property   string NameWithDescription {get;}
   NotificationOptions           Property   
Veeam.Backup.Model.CDomNotificationOptions NotificationOptions {get;}
   Options                       Property   Veeam.Backup.Model.CJobOptions 
Options {get;}
   OracleEnabled                 Property   bool OracleEnabled {get;}
   ParentJobId                   Property   System.Nullable[guid] ParentJobId 
{get;}
   ParentScheduleId              Property   System.Nullable[guid] 
ParentScheduleId {get;}
   PreviousJobIdInScheduleChain  Property   System.Nullable[guid] 
PreviousJobIdInScheduleChain {get;}
   ScheduleOptions               Property   Veeam.Backup.Model.ScheduleOptions 
ScheduleOptions {get;}
   SheduleEnabledTime            Property   System.Nullable[datetime] 
SheduleEnabledTime {get;}
   SourceProxyAutoDetect         Property   bool SourceProxyAutoDetect {get;}
   SourceType                    Property   
Veeam.Backup.Model.CDbBackupJobInfo+ESourceType SourceType {get;}
   SqlEnabled                    Property   bool SqlEnabled {get;}
   TargetDir                     Property   Veeam.Backup.Common.CLegacyPath 
TargetDir {get;}
   TargetFile                    Property   string TargetFile {get;}
   TargetHostId                  Property   guid TargetHostId {get;}
   TargetType                    Property   
Veeam.Backup.Model.CDbBackupJobInfo+ETargetType TargetType {get;}
   TypeToString                  Property   string TypeToString {get;}
   UserCryptoKey                 Property   Veeam.Backup.Core.CCryptoKey 
UserCryptoKey {get;}
   Usn                           Property   long Usn {get;}
   ViReplicaTargetOptions        Property   
Veeam.Backup.Model.CDomViReplicaTargetOptions ViReplicaTargetOptions {get;}
   ViSourceOptions               Property   
Veeam.Backup.Model.CDomViSourceOptions ViSourceOptions {get;}
   VssOptions                    Property   
Veeam.Backup.Model.CGuestProcessingOptions VssOptions {get;}
   
   
   ######## CloudStack Log
   
   
   2022-12-02 11:45:34,664 DEBUG [o.a.c.b.v.VeeamClient] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) Trying 
to clone veeam job: urn:veeam:Job:f4258a33-8e7e-4c47-8f03-6899195a0286 with
   backup uuid: i-2-3-VM-CSBKP-9e20c9c3-ff77-408a-bdbd-dc9819393064
   2022-12-02 11:45:34,665 DEBUG [o.a.c.b.v.VeeamClient] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) Trying 
to list backup repository for backup job [name: predef] in server [id: 2fea7
   4ef-9dac-4134-a6fa-8811d0ae9193].
   2022-12-02 11:45:35,297 ERROR [c.c.u.s.SshHelper] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) SSH 
execution of command PowerShell Add-PSSnapin VeeamPSSnapin;$Job = Get-VBRJob 
-name
   "predef";$Job.GetBackupTargetRepository() ^| select Name | Format-List has 
an error status code in return. Result output: 'Format-List' is not recognized 
as an internal or external command,
   operable program or batch file.
   
   2022-12-02 11:45:35,298 ERROR [o.a.c.b.v.VeeamClient] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) Veeam 
PowerShell commands [PowerShell Add-PSSnapin VeeamPSSnapin;$Job = Get-VBRJob
   -name "predef";$Job.GetBackupTargetRepository() ^| select Name | 
Format-List] failed due to: ['Format-List' is not recognized as an internal or 
external command,
   operable program or batch file.
   ].
   2022-12-02 11:45:35,298 WARN  [o.a.c.b.v.VeeamClient] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) 
Exception caught while trying to clone Veeam job:
   com.cloud.utils.exception.CloudRuntimeException: Failed to get Repository 
Name from Job [name: predef].
           at 
org.apache.cloudstack.backup.veeam.VeeamClient.getRepositoryNameFromJob(VeeamClient.java:367)
           at 
org.apache.cloudstack.backup.veeam.VeeamClient.listBackupRepository(VeeamClient.java:343)
           at 
org.apache.cloudstack.backup.veeam.VeeamClient.cloneVeeamJob(VeeamClient.java:461)
           at 
org.apache.cloudstack.backup.VeeamBackupProvider.assignVMToBackupOffering(VeeamBackupProvider.java:148)
           at 
org.apache.cloudstack.backup.BackupManagerImpl$1.doInTransaction(BackupManagerImpl.java:304)
           at 
org.apache.cloudstack.backup.BackupManagerImpl$1.doInTransaction(BackupManagerImpl.java:296)
           at 
com.cloud.utils.db.Transaction$3.doInTransaction(Transaction.java:74)
           at com.cloud.utils.db.Transaction.execute(Transaction.java:62)
           at com.cloud.utils.db.Transaction.execute(Transaction.java:71)
           at 
org.apache.cloudstack.backup.BackupManagerImpl.transactionAssignVMToBackupOffering(BackupManagerImpl.java:296)
           at 
org.apache.cloudstack.backup.BackupManagerImpl.assignVMToBackupOffering(BackupManagerImpl.java:292)
           at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.base/java.lang.reflect.Method.invoke(Method.java:566)
           at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
           at 
org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
           at 
com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:52)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
           at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
           at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
           at com.sun.proxy.$Proxy315.assignVMToBackupOffering(Unknown Source)
           at 
org.apache.cloudstack.api.command.user.backup.AssignVirtualMachineToBackupOfferingCmd.execute(AssignVirtualMachineToBackupOfferingCmd.java:90)
           at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:163)
           at 
com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:106)
           at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:620)
           at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:48)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
           at 
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:45)
           at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:568)
           at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    ESCOD
   ngth: 7582, Content-Type: application/xml; charset=utf-8, Server: 
Microsoft-HTTPAPI/2.0, Date: Fri, 02 Dec 2022 08:45:33 GMT] 
ResponseEntityProxy{[Content-Type: application/xml; 
charset=utf-8,Content-Length: 7582,Chunked: false]}}] for URL: 
[https://XXXXXXXXXXX:9398/api/jobs/f4258a33-8e7e-4c47-8f03-6899195a0286?format=Entity].
   2022-12-02 11:45:34,664 DEBUG [o.a.c.b.v.VeeamClient] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) Trying 
to clone veeam job: urn:veeam:Job:f4258a33-8e7e-4c47-8f03-6899195a0286 with 
backup uuid: i-2-3-VM-CSBKP-9e20c9c3-ff77-408a-bdbd-dc9819393064
   2022-12-02 11:45:34,665 DEBUG [o.a.c.b.v.VeeamClient] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) Trying 
to list backup repository for backup job [name: predef] in server [id: 
2fea74ef-9dac-4134-a6fa-8811d0ae9193].
   2022-12-02 11:45:35,297 ERROR [c.c.u.s.SshHelper] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) SSH 
execution of command PowerShell Add-PSSnapin VeeamPSSnapin;$Job = Get-VBRJob 
-name "predef";$Job.GetBackupTargetRepository() ^| select Name | Format-List 
has an error status code in return. Result output: 'Format-List' is not 
recognized as an internal or external command,
   operable program or batch file.
   
   2022-12-02 11:45:35,298 ERROR [o.a.c.b.v.VeeamClient] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) Veeam 
PowerShell commands [PowerShell Add-PSSnapin VeeamPSSnapin;$Job = Get-VBRJob 
-name "predef";$Job.GetBackupTargetRepository() ^| select Name | Format-List] 
failed due to: ['Format-List' is not recognized as an internal or external 
command,
   operable program or batch file.
   ].
   2022-12-02 11:45:35,298 WARN  [o.a.c.b.v.VeeamClient] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) 
Exception caught while trying to clone Veeam job:
   com.cloud.utils.exception.CloudRuntimeException: Failed to get Repository 
Name from Job [name: predef].
           at 
org.apache.cloudstack.backup.veeam.VeeamClient.getRepositoryNameFromJob(VeeamClient.java:367)
           at 
org.apache.cloudstack.backup.veeam.VeeamClient.listBackupRepository(VeeamClient.java:343)
           at 
org.apache.cloudstack.backup.veeam.VeeamClient.cloneVeeamJob(VeeamClient.java:461)
           at 
org.apache.cloudstack.backup.VeeamBackupProvider.assignVMToBackupOffering(VeeamBackupProvider.java:148)
           at 
org.apache.cloudstack.backup.BackupManagerImpl$1.doInTransaction(BackupManagerImpl.java:304)
           at 
org.apache.cloudstack.backup.BackupManagerImpl$1.doInTransaction(BackupManagerImpl.java:296)
           at 
com.cloud.utils.db.Transaction$3.doInTransaction(Transaction.java:74)
           at com.cloud.utils.db.Transaction.execute(Transaction.java:62)
           at com.cloud.utils.db.Transaction.execute(Transaction.java:71)
           at 
org.apache.cloudstack.backup.BackupManagerImpl.transactionAssignVMToBackupOffering(BackupManagerImpl.java:296)
           at 
org.apache.cloudstack.backup.BackupManagerImpl.assignVMToBackupOffering(BackupManagerImpl.java:292)
           at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.base/java.lang.reflect.Method.invoke(Method.java:566)
           at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
           at 
org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
           at 
com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:52)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
           at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
           at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
           at com.sun.proxy.$Proxy315.assignVMToBackupOffering(Unknown Source)
           at 
org.apache.cloudstack.api.command.user.backup.AssignVirtualMachineToBackupOfferingCmd.execute(AssignVirtualMachineToBackupOfferingCmd.java:90)
           at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:163)
           at 
com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:106)
           at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:620)
           at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:48)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
           at 
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:45)
           at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:568)
           at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
           at java.base/java.lang.Thread.run(Thread.java:829)
   2022-12-02 11:45:35,303 ERROR [o.a.c.b.VeeamBackupProvider] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) Failed 
to clone pre-defined Veeam job (backup offering) for backup offering I
   D: urn:veeam:Job:f4258a33-8e7e-4c47-8f03-6899195a0286 but will check the 
list of jobs again if it was eventually succeeded.
   2022-12-02 11:45:35,303 DEBUG [o.a.c.b.v.VeeamClient] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) Trying 
to list backup policies that are Veeam jobs
   2022-12-02 11:45:35,313 DEBUG [o.a.c.b.v.VeeamClient] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) Response 
received in GET request is: [HttpResponseProxy{HTTP/1.1 200 OK [Content-Le
   ngth: 1488, Content-Type: application/xml; charset=utf-8, Server: 
Microsoft-HTTPAPI/2.0, Date: Fri, 02 Dec 2022 08:45:35 GMT] 
ResponseEntityProxy{[Content-Type: application/xml; 
charset=utf-8,Content-Length:
   1488,Chunked: false]}}] for URL: [https://XXXXXXXXXXX:9398/api/jobs].
   2022-12-02 11:45:35,322 ERROR [o.a.c.b.BackupManagerImpl] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) Failed 
to assign VM [{"backupOfferingId":1,"backupVolumes":"[{\"uuid\":\"4ae0f0
   
5b-4be0-4c95-b25d-2849f0732c3e\",\"type\":\"ROOT\",\"size\":16106127360,\"path\":\"f34ee3c6a568484d96292dd498c2b1df\"}]","instanceName":"i-2-3-VM","uuid":"9e20c9c3-ff77-408a-bdbd-dc9819393064"}]
 to the Backup
    Offering 
[{"externalId":"urn:veeam:Job:f4258a33-8e7e-4c47-8f03-6899195a0286","name":"pre","provider":"veeam","uuid":"21b5d5a0-3303-430b-89c1-7f518a93fa20"}],
 using provider [name: veeam, class: VeeamBackupPr
   ovider], due to: [Failed to assign the VM to the backup offering, please try 
removing the assignment and try again.].
   2022-12-02 11:45:35,322 DEBUG [o.a.c.b.BackupManagerImpl] 
(API-Job-Executor-4:ctx-f519d621 job-40 ctx-f1454416) (logid:55fc7a86) Failed 
to assign VM [{"backupOfferingId":1,"backupVolumes":"[{\"uuid\":\"4ae0f0
   
5b-4be0-4c95-b25d-2849f0732c3e\",\"type\":\"ROOT\",\"size\":16106127360,\"path\":\"f34ee3c6a568484d96292dd498c2b1df\"}]","instanceName":"i-2-3-VM","uuid":"9e20c9c3-ff77-408a-bdbd-dc9819393064"}]
 to the Backup
    Offering 
[{"externalId":"urn:veeam:Job:f4258a33-8e7e-4c47-8f03-6899195a0286","name":"pre","provider":"veeam","uuid":"21b5d5a0-3303-430b-89c1-7f518a93fa20"}],
 using provider [name: veeam, class: VeeamBackupPr
   ovider], due to: [Failed to assign the VM to the backup offering, please try 
removing the assignment and try again.].
   com.cloud.utils.exception.CloudRuntimeException: Failed to assign the VM to 
the backup offering, please try removing the assignment and try again.
           at 
org.apache.cloudstack.backup.BackupManagerImpl$1.doInTransaction(BackupManagerImpl.java:305)
           at 
org.apache.cloudstack.backup.BackupManagerImpl$1.doInTransaction(BackupManagerImpl.java:296)
           at 
com.cloud.utils.db.Transaction$3.doInTransaction(Transaction.java:74)
           at com.cloud.utils.db.Transaction.execute(Transaction.java:62)
           at com.cloud.utils.db.Transaction.execute(Transaction.java:71)
           at 
org.apache.cloudstack.backup.BackupManagerImpl.transactionAssignVMToBackupOffering(BackupManagerImpl.java:296)
           at 
org.apache.cloudstack.backup.BackupManagerImpl.assignVMToBackupOffering(BackupManagerImpl.java:292)
           at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.base/java.lang.reflect.Method.invoke(Method.java:566)
           at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
           at 
org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
           at 
com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:52)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
           at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
           at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
           at com.sun.proxy.$Proxy315.assignVMToBackupOffering(Unknown Source)
           at 
org.apache.cloudstack.api.command.user.backup.AssignVirtualMachineToBackupOfferingCmd.execute(AssignVirtualMachineToBackupOfferingCmd.java:90)
           at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:163)
           at 
com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:106)
           at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:620)
           at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:48)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
           at 
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:45)
           at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:568)
           at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
           at java.base/java.lang.Thread.run(Thread.java:829)
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to