apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
1.99k stars 1.09k forks source link

Veeam integration #9423

Open cdfgallo opened 2 months ago

cdfgallo commented 2 months ago
ISSUE TYPE
COMPONENT NAME
Veeam integration plugin
CLOUDSTACK VERSION
4.19.1
CONFIGURATION

Master node on Ubuntu 22, advanced networking, veeam version 12

OS / ENVIRONMENT
SUMMARY

After configuring the Veeam plugin, Veeam B&R to support the plugin and VeeamEM, when I try to create a Backup Offering, I receive the following error only in the zone where I have a vCenter configured and properly registered with Veeam.

" Request failed. (530) Veeam B&R API call unauthorized, please ask your administrator to fix integration issues. "

STEPS TO REPRODUCE
Register the Veeam plugin in CS
EXPECTED RESULTS
I should be able to select the backup job with tag associated with my vCenter.
ACTUAL RESULTS
We receive error:

"
Request failed. (530)
Veeam B&R API call unauthorized, please ask your administrator to fix integration issues.
"

and we can observe the following log in the master node:

"
2024-07-19 13:51:31,354 DEBUG [o.a.c.b.BackupManagerImpl] (qtp364604394-15:ctx-88652954 ctx-70dd5d41) (logid:db53cbb4) Listing external backup offerings for the backup provider configured for zone ID 2
2024-07-19 13:51:31,392 INFO  [c.c.a.ApiServer] (qtp364604394-15:ctx-88652954 ctx-70dd5d41) (logid:db53cbb4) Veeam B&R API call unauthorized, please ask your administrator to fix integration issues.
2024-07-19 13:51:31,393 DEBUG [c.c.a.ApiServlet] (qtp364604394-15:ctx-88652954 ctx-70dd5d41) (logid:db53cbb4) ===END===  172.16.2.79 -- GET  zoneid=14a81d5c-8fda-4de6-a4f3-1932c562e559&command=listBackupProviderOfferings&response=json
"

If I try to import the backup offering in a different zone I can see all offerings.
Here attached the configuration CS side
![image](https://github.com/user-attachments/assets/f1e30e55-d424-49f4-a833-4f191c70347a)
cdfgallo commented 2 months ago

Hi @DaanHoogland , I thought the integration was ok with CS version 4.19.1 after this issue https://github.com/apache/cloudstack/issues/8461

Am I getting something wrong Ty!

DaanHoogland commented 2 months ago

yes @cdfgallo , it should be. I have no veeam though so I can not check.

cdfgallo commented 2 months ago

I'm using Shapeblue packages. Idk if it's related to that

DaanHoogland commented 2 months ago

I don't think there is a difference between shapeblue packages and upstream for this release, so that is not an issue.

weizhouapache commented 2 months ago

@cdfgallo I think this issue has been fixed in 4.19.1.0 by #8241 can you share

cdfgallo commented 2 months ago

Hi @weizhouapache ,

I'm indeed using version 4.19.1.0 and Veeam B&R version 12 (do you need the minor also?). Here are the settings for global and the specific zone which is not working (I didn't make any modification in the zone settings from the defaults) image

Ty!

weizhouapache commented 2 months ago

I suspect this is a configuration issue. I cannot tell what is wrong, maybe wrong username or password or api url ?

@omurozlu has reported another veeam issue in #9440, but it looks like the backup offering has been successfully imported.

kiranchavala commented 2 months ago

@cdfgallo did you install the veeam Enterprise manager ?

https://docs.cloudstack.apache.org/en/4.19.1.0/adminguide/veeam_plugin.html#installing-veeam-backup-and-recovery-for-use-with-cloudstack

https://helpcenter.veeam.com/docs/backup/em/introduction.html?ver=120

cdfgallo commented 2 months ago

@weizhouapache indeed it was. Looks like that if you specify the password in the global settings and also in the zone, the two values are added together (it was too strange that I had no problem importing backup in the other two zones..). In the Veeam EM I also have to install Veeam Console in order to have the Veeam.Backup.PowerShell module, correct?

cdfgallo commented 2 months ago

@kiranchavala yes, we have a Veeam B&R server and a Veeam EM server.

steven3579 commented 1 month ago

Hi @weizhouapache I am also encountering a similar issue with CloudStack version 4.19.0.1

kiranchavala commented 1 month ago

@steven3579

Could you share the exception message or management server log when you try to create a backup offering

steven3579 commented 1 month ago

Hi @kiranchavala

the following log in the master node

2024-08-05 02:37:09,172 DEBUG [c.c.a.t.Request] (RedundantRouterStatusMonitor-3:ctx-f566fac2) (logid:9808fbc4) Seq 1-2170172070439207155: Received:  { Ans: , MgmtId: 204998180945383, via: 1(esxi01.defensive.cloud), Ver: v1, Flags: 10, { CheckRouterAnswer } }
2024-08-05 02:37:09,172 DEBUG [c.c.a.m.AgentManagerImpl] (RedundantRouterStatusMonitor-3:ctx-f566fac2) (logid:9808fbc4) Details from executing class com.cloud.agent.api.CheckRouterCommand: Status: BACKUP

2024-08-05 02:37:09,358 INFO  [c.c.a.ApiServer] (qtp239372207-181794:ctx-1229870c ctx-377e6018) (logid:afaed4b5) Veeam B&R API call unauthorized, please ask your administrator to fix integration issues.
2024-08-05 02:37:09,359 DEBUG [c.c.a.ApiServlet] (qtp239372207-181794:ctx-1229870c ctx-377e6018) (logid:afaed4b5) ===END===  x.x.x.x -- GET  zoneid=780c89df-02ad-447e-9ce9-874fd8295ddf&command=listBackupProviderOfferings&response=json
2024-08-05 02:37:09,638 DEBUG [c.c.a.m.AgentManagerImpl] (AgentManager-Handler-1:null) (logid:) Ping from 4(v-226-VM)
2024-08-05 02:37:09,795 DEBUG [o.a.c.h.HAManagerImpl] (BackgroundTaskPollManager-3:ctx-a638e145) (logid:736a6ab7) HA health check task is running...
weizhouapache commented 1 month ago

@steven3579 can you check by the following comands ?

curl -k https://xxx:9398/api/ 
ssh username@xxx hostname

https://xxx:9398/api/ : value of backup.plugin.veeam.url username: value of backup.plugin.veeam.username

steven3579 commented 1 month ago

Hi @weizhouapache I have tried running the two commands above, and here are the results. Thank you

curl -k https://xxx:9398/api/ 
<?xml version="1.0" encoding="utf-8"?><EnterpriseManager xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.veeam.com/ent/v1.0"><Links><Link Href="https://xxx:9398/api/logonSessions" Type="LogonSessionList" Rel="Down" /><Link Href="https://xxx:9398/api/sessionMngr/?v=latest" Type="LogonSession" Rel="Create" /></Links><SupportedVersions><SupportedVersion Name="v1_5"><Links><Link Href="https://xxx:9398/api/sessionMngr/?v=v1_5" Type="LogonSession" Rel="Create" /></Links></SupportedVersion><SupportedVersion Name="v1_6"><Links><Link Href="https://xxx:9398/api/sessionMngr/?v=v1_6" Type="LogonSession" Rel="Create" /></Links></SupportedVersion><SupportedVersion Name="v1_7"><Links><Link Href="https://xxx:9398/api/sessionMngr/?v=v1_7" Type="LogonSession" Rel="Create" /></Links></SupportedVersion></SupportedVersions></EnterpriseManager>
ssh username@xxx 
Microsoft Windows [Version 10.0.20348.1129]
(c) Microsoft Corporation. All rights reserved.

administrator@xxx  C:\Users\Administrator>
steven3579 commented 1 month ago

Hi @weizhouapache I have upgraded to CloudStack version 4.19.1.1 and successfully connected. I have an issue. If my backed-up VM is deleted in CloudStack, how can I restore it from the backup on Veeam? And i have tried deleting a VM in CloudStack, but I cannot proceed with the restoration.

Steps to reproduce the issue

  1. create a VM (A) with ROOT
  2. assign to a backup offering
  3. create backup
  4. create another VM (B)
  5. restore the disk of VM A, and attach to VM

==> Fail restore

  1. create a VM (A) with ROOT
  2. assign to a backup offering
  3. create backup
  4. destroy VM (A)
  5. restore VM (A)

====> Fail restore

Thanks Team!