13 Replies Latest reply on Dec 16, 2017 1:09 AM by Nitin Murkute

    Onboard Existing AWS VM into BMC CLM

    Abhijeet Deshpande

      Hello,

       

      I am facing issues while onboarding the existing AWS VMs into CLM. I have tried with two ways to onboard VM i.e. using Quick Start and using CLM API. I have shared the screenshot for the same.

       

      Quick Start:

       

      While onboarding using Quick Start the server list is not getting populated.

       

       

      CLM API:

       

      While using CLM API for onboarding VM, I am getting an error in creating resource set.

       

       

      Kindly suggest on the same.

       

      Thanks in advance.

        • 1. Re: Onboard Existing AWS VM into BMC CLM
          Devendra Dehadaraya

          Can you please create a support ticket for this? Team might need to go through the CLM logs in both the cases.

          • 2. Re: Onboard Existing AWS VM into BMC CLM
            Nitin Murkute

            Hi Devendra,

             

            Thanks for your quick help here as always!

             

            We were analyzing csm log in detail today where while onboarding AWS VM using CLM API and observing following discrepancy in it,

             

            06 Dec 2017 00:39:02,926 [ERROR] EFM - [Thread=6114b657-66dc-42cb-b2c2-ec7135226e22::583564b1-5bbd-4a7f-9648-f2ccee3c6de1::5f8dbac4-aad1-4834-a616-7c62f5be0850(222)] [Class=resourceset:offboard] - callComputeOffboard :: computeContainerUriList are null or empty

             

            06 Dec 2017 00:39:02,926 [ERROR] TASK - [Thread=6114b657-66dc-42cb-b2c2-ec7135226e22::583564b1-5bbd-4a7f-9648-f2ccee3c6de1::5f8dbac4-aad1-4834-a616-7c62f5be0850(222)] [Class=ErrorAction:execute] - Adding TaskError with errorid [10500141] message [No Compute Container associated with this resource set [rsUUID]. Cannot proceed.] errSev [CRITICAL]

             

            06 Dec 2017 00:55:11,395 [INFO] DB - [Thread=e2d9771d-166d-4dda-9f0e-c538898d8b44::9446b30e-05e5-44fc-8492-983fc3b981fe::d756c500-9a2f-4050-ac30-f4291b1f82df(220)] [Class=CloudDBRequestProcessor:search] - ##START CLOUDDB ComputeContainer[] SEARCH##

            06 Dec 2017 00:55:11,422 [INFO] DB_BUILDER - [Thread=e2d9771d-166d-4dda-9f0e-c538898d8b44::9446b30e-05e5-44fc-8492-983fc3b981fe::d756c500-9a2f-4050-ac30-f4291b1f82df(220)] [Class=ComputeContainerBuilder:VirtualGuest:getServerTypeforAllServers] -  Exception occured while trying to get the system type instance for server 4a192de9-fc0a-4950-8f1e-57c2573ea9d2

            06 Dec 2017 00:55:11,422 [INFO] DB - [Thread=e2d9771d-166d-4dda-9f0e-c538898d8b44::9446b30e-05e5-44fc-8492-983fc3b981fe::d756c500-9a2f-4050-ac30-f4291b1f82df(220)] [Class=CloudDBRequestProcessor:search] - ##END CLOUDDB ComputeContainer[] SEARCH success##

            06 Dec 2017 00:55:11,422 [INFO] AWS_PROVIDER - [Thread=e2d9771d-166d-4dda-9f0e-c538898d8b44::9446b30e-05e5-44fc-8492-983fc3b981fe::d756c500-9a2f-4050-ac30-f4291b1f82df(220)] [Class=com.bmc.cloud.provider.aws.provisioning.task.ComputeContainerSearchTaskHelper:performOnboardedSearch] - Search for com.bmc.cloud.model.beans.ComputeContainer in clouddb completed

             

            Also, we have service blueprint with required AWS AMI from which we are able to provisioned the SOI in CLM.

             

            Is there anything that you can suggest here from this log for AWS VM onboarding using our API.

             

            Thanks & Regards,

            Nitin Murkute

            • 3. Re: Onboard Existing AWS VM into BMC CLM
              Devendra Dehadaraya

              It seems from the logs that these are destructor flow logs. The error must have occurred before this during onboard due to which offboarding is called up.

               

              Better to raise a support ticket so that someone can go through the complete logs properly.

               

              Thanks,

              D

              • 4. Re: Onboard Existing AWS VM into BMC CLM
                Nitin Murkute

                Hi Devendra,

                 

                Thanks for the reply.

                 

                Yes we have requested customer to open a case for this issue.

                 

                Also, we are debugging the same from our side. Your suggestions will be highly appreciated.

                 

                Attaching csm log for the reference.

                 

                Thanks & Regards,

                Nitin Murkute

                • 5. Re: Onboard Existing AWS VM into BMC CLM
                  Devendra Dehadaraya

                  What is the JSON request that you are sending to the API?

                   

                  There are few things in the logs though -

                   

                  1. Code should not throw a NPE exception.

                   

                  Caused by: java.lang.NullPointerException

                  at com.bmc.cloud.provider.awsconnect.helper.EC2WorkloadOnboardExecHelper.onboard(EC2WorkloadOnboardExecHelper.java:58)

                  at com.bmc.cloud.provider.awsconnect.task.AWSComputeServiceImpl.onboard(AWSComputeServiceImpl.java:695)

                   

                  2.  You seem to be trying to onboard resources from eu-central-1 region. Are there any instances in this region?

                   

                  3. The Virtulguest name is somehow returned to be NULL. This might be triggerring NPE exception.

                   

                  task.ComputeContainerOnboardTaskHelper:performOnboard] - Attempting to populate ec2 workload for onboardnull and provisioning target : clm01:eu-central-1b

                   

                  Need to know the input JSON request which you are sending. Hence these things can be worked over the support ticket.

                  • 6. Re: Onboard Existing AWS VM into BMC CLM
                    Nitin Murkute

                    Hi Devendra,

                     

                    Thanks again for your reply.

                     

                    Please find below input JSON which we are using for AWS VM onboarding API.

                     

                    {

                        "timeout": -1,

                        "preCallout": "",

                        "postCallout": "",

                        "operationParams": [

                            {

                                "name": "computeContainers",

                                "type": "com.bmc.cloud.model.beans.ComputeContainer",

                                "multiplicity": "1..*",

                                "value": [

                                            {

                                                "cloudClass": "com.bmc.cloud.model.beans.ComputeContainer",

                                                "serverObject": {

                                                                    "cloudClass": "com.bmc.cloud.model.beans.VirtualGuest",

                                                                    "hostName": "NMAWS",

                                                                    "name": "NMAWS",

                                                                    "provider": "/provider/c71a65e4-3fe8-4c84-995a-d730799bda91",

                                                                    "externalID":"c71a65e4-3fe8-4c84-995a-d730799bda91:eu-central-1:eu-central-1b:default:true"

                                                                },

                                                "resourceSetObject": {

                                                                    "cloudClass": "com.bmc.cloud.model.beans.ResourceSet",

                                                                    "name": "RS1"

                                                                }

                                            }

                                        ]

                                    },

                                    {

                                        "name": "serviceOfferingReconId",

                                        "type": "java.lang.String",

                                        "multiplicity": "1",

                                        "value": "REHAIU00AIXBDAPACO3WFZTGO4MEBE"

                                    },

                                    {

                                        "name": "LogicalHostingEnvironmentId",

                                        "type": "java.lang.String",

                                        "multiplicity": "1",

                                        "value": "c6e4e2a8-f5af-4a5f-9bcd-bef23e5fa6d5"

                                    },

                                    {

                                        "name": "tenant",

                                        "type": "java.lang.String",

                                        "multiplicity": "1",

                                        "value": "CLM Provider"

                                    },

                                   {

                                        "name": "name",

                                        "type": "java.lang.String",

                                        "multiplicity": "0..1",

                                        "value": "NMAWS"

                                    },

                                    {

                                        "name": "owner",

                                        "type": "java.lang.String",

                                        "multiplicity": "1",

                                        "value": "clmadmin"

                                    }

                             ]

                    }

                     

                    Also, we are passing VirtualGuest here in json with name "NMAWS" but not getting why it is throwing NPE exception here, even though I tried with replacing the hostname with AWS VM instance ID but failing with same issue.

                     

                    Thanks & Regards,

                    Nitin Murkute

                    • 7. Re: Onboard Existing AWS VM into BMC CLM
                      Devendra Dehadaraya

                      The request JSON seems to be incorrect. Instead of >>

                       

                      {

                                          "name": "name",

                                          "type": "java.lang.String",

                                          "multiplicity": "0..1",

                                          "value": "NMAWS"

                                      },

                       

                      You should have a parameter named "actualVMName" in the request.

                       

                       

                        {

                                          "name": "actualVMName",

                                          "type": "java.lang.String",

                                          "multiplicity": "0..1",

                                          "value": "NMAWS"

                                      },

                       

                      Please try it and let me know.

                       

                       

                      Thanks,

                      Devendra

                      1 of 1 people found this helpful
                      • 8. Re: Onboard Existing AWS VM into BMC CLM
                        Nitin Murkute

                        Hi Devendra,

                         

                        Thanks for your reply here.

                         

                        We tried with changing parameter from 'name' to "actualVMName" in input json as suggested and made a call for onboard, but still we are facing the same issue again.

                        Sending more details here,

                         

                        Input JSON used:

                         

                        {

                        "timeout": -1,

                        "preCallout": "",

                        "postCallout": "",

                        "operationParams": [

                        {

                        "name": "computeContainers",

                        "type": "com.bmc.cloud.model.beans.ComputeContainer",

                        "multiplicity": "1..*",

                        "value": [

                        {

                        "cloudClass": "com.bmc.cloud.model.beans.ComputeContainer",

                        "serverObject": {

                        "cloudClass": "com.bmc.cloud.model.beans.VirtualGuest",

                        "hostName": "NMAWS",

                        "name": "NMAWS",

                        "provider": "/provider/c71a65e4-3fe8-4c84-995a-d730799bda91",

                          "externalID":"c71a65e4-3fe8-4c84-995a-d730799bda91:eu-central-1:eu-central-1b:default:true"

                        },

                        "resourceSetObject": {

                        "cloudClass": "com.bmc.cloud.model.beans.ResourceSet",

                        "name": "RS1"

                        }

                        }

                        ]

                        },

                        {

                        "name": "serviceOfferingReconId",

                        "type": "java.lang.String",

                        "multiplicity": "1",

                        "value": "REHAIU00AIXBDAPACO3WFZTGO4MEBE"

                        },

                        {

                        "name": "LogicalHostingEnvironmentId",

                        "type": "java.lang.String",

                        "multiplicity": "1",

                        "value": "c6e4e2a8-f5af-4a5f-9bcd-bef23e5fa6d5"

                        },

                        {

                        "name": "tenant",

                        "type": "java.lang.String",

                        "multiplicity": "1",

                        "value": "CLM Provider"

                        },

                        {

                        "name": "actualVMName",

                        "type": "java.lang.String",

                        "multiplicity": "0..1",

                        "value": "NMAWS"

                        },

                        {

                        "name": "owner",

                        "type": "java.lang.String",

                        "multiplicity": "1",

                        "value": "clmadmin"

                        }

                        ]

                        }

                         

                        Available VM on AWS Console:

                        Thanks in advance...!

                         

                        Regards,

                        Nitin Murkute

                        • 9. Re: Onboard Existing AWS VM into BMC CLM
                          Devendra Dehadaraya

                          In this case the error might be different. CSM logs would help to debug further.

                          • 10. Re: Onboard Existing AWS VM into BMC CLM
                            Nitin Murkute

                            Hi Devandra,

                             

                            Please find attached csm log for dipper information for onboarding issue.

                             

                            Thanks & Regards,

                            Nitin Murkute

                            • 11. Re: Onboard Existing AWS VM into BMC CLM
                              Devendra Dehadaraya

                              As mentioned, it failed for a different reason.

                               

                              The error in the CSM logs clearly shows the problem ->

                               

                              Caused by: java.lang.IllegalArgumentException: Compute contiainer externalId is not formatted properly: c71a65e4-3fe8-4c84-995a-d730799bda91:eu-central-1:eu-central-1b:default:true

                               

                              You need to construct the external ID in following manner ->

                               

                              <PROVIDER_ID>:<VPC_NAME>:<AZ_NAME>:<AMI_ID>:<DEFAULT_SG>:<KERNEL_ID>:<PLATFORM>:<INSTANCE_TYPE>:<INSTANCE_ID>:<ROOT_DEVICE>

                               

                              Example is  ->

                               

                              b3975711-c237-4436-a8f1-383235cc4408:VPC_NAME_PH:us-east-1a:ami-xxxx:sg-e2xxxx:null:windows:m1.small:i-7bcxxxx:/dev/sda1

                              3 of 3 people found this helpful
                              • 12. Re: Onboard Existing AWS VM into BMC CLM
                                Abhishek Rai

                                The new format of an external id should help.

                                 

                                Nitin Murkute did this help?

                                 

                                Regards,

                                Abhishek

                                • 13. Re: Onboard Existing AWS VM into BMC CLM
                                  Nitin Murkute

                                  Hi Devendra,

                                   

                                  Thanks once again for your valuable answer as always and it works this time with changing in external ID for AWS VM in our API,

                                   

                                  <PROVIDER_ID>:<VPC_NAME>:<AZ_NAME>:<AMI_ID>:<DEFAULT_SG>:<KERNEL_ID>:<PLATFORM>:<INSTANCE_TYPE>:<INSTANCE_ID>:<ROOT_DEVICE>

                                   

                                  @Abhishek, yes, his solution works for us. We need to have the same available on docs for AWS VM as well like mentioned for vCenter VM external ID.Thanks again!

                                   

                                  Regards,

                                  Nitin Murkute