8 Replies Latest reply on Mar 4, 2014 5:18 AM by Aryan Anantwar

    createVirtualGuest Error

      Hi BSA Consultants,

       

      I am trying to create Virtual Guest Job through BLCLI. I am making use of

      blcli_execute Virtualization createVirtualGuest "//xxxxxxxxx/d/VirtualGuestJob.xml" for creation of Virtual Guest Job, but it is showing me following error,

       

      "Command execution failed. com.bladelogic.om.infra.mfw.util.BlException: Unexpected Error. Check App Server Logs for details".


      (Additional thing which I want to know:This command does not any provision about where that job will get save.)

      I have following steps:

      Step 1:

      R0273# blcli_execute Virtualization listVirtualGuestPackages 2

      17782::VGP_27Feb_12.00::::2::xxxxxxxx::Red Hat Enterprise Linux 5

       

      Step 2:

      R0273# blcli_execute Virtualization getVirtualGuestPackage 17782

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

      <VirtualGuestPackageConfiguration>

          <GeneralInfo>

              <PackageName>VGP_27Feb_12.00</PackageName>

              <PackageDescription></PackageDescription>

              <DepotGroupId>2000052</DepotGroupId>

              <VirtualGuestPackageType>2</VirtualGuestPackageType>

              <VirtualGuestName>Red Hat VM _ 27Feb</VirtualGuestName>

          </GeneralInfo>

          <PlatformInfo>

              <VMwareInfo>

                  <ClonedDiskFormat>sameAsSource</ClonedDiskFormat>

                  <IsCustomConfig>false</IsCustomConfig>

                  <VMXDatastore>datastore1</VMXDatastore>

                  <GuestOSId>2</GuestOSId>

                  <GuestOSVersionId>8</GuestOSVersionId>

                  <NumOfProcessors>1</NumOfProcessors>

                  <MemoryInMB>1024</MemoryInMB>

                  <VMwareDiskSettings>

                      <DiskInfo>

                          <DiskSize>15360</DiskSize>

                          <DiskSizeUnit>MB</DiskSizeUnit>

                          <Datastore>datastore1</Datastore>

                          <ThinProvisioning>true</ThinProvisioning>

                      </DiskInfo>

                  </VMwareDiskSettings>

                  <VMwareNetworkSettings>

                      <NetworkConnection>

                          <Network>VM Network</Network>

                          <Adapter>Flexible (default)</Adapter>

                          <ConnectAtPowerOn>true</ConnectAtPowerOn>

                      </NetworkConnection>

                  </VMwareNetworkSettings>

              </VMwareInfo>

          </PlatformInfo>

      </VirtualGuestPackageConfiguration>

       

      And Last Step:

      R0273# blcli_execute Virtualization createVirtualGuest "//xxxxx/d/VirtualGuestJob.xml"

      Command execution failed. com.bladelogic.om.infra.mfw.util.BlException: Unexpected Error. Check App Server Logs for details

       

      If I see in App server log it shows me:

       

      [27 Feb 2014 17:01:39,566] [Client-Connections-Thread-4] [ERROR] [BLAdmin:BLAdmins:172.16.2.91] [Client] com.bladelogic.om.virtualization.app.service.parser.jaxb.VirtualGuestPackageConfiguration cannot be cast to com.bladelogic.om.virtualization.app.service.parser.jaxb.VirtualGuestJobConfiguration

      java.lang.ClassCastException: com.bladelogic.om.virtualization.app.service.parser.jaxb.VirtualGuestPackageConfiguration cannot be cast to com.bladelogic.om.virtualization.app.service.parser.jaxb.VirtualGuestJobConfiguration

       

      If I manually create a job using same vg package it is deploying exact VM???

       

      What Could be the possible cause behind this????


        • 1. Re: createVirtualGuest Error
          Bill Robinson

          Can you attach the entire appserver log ?

          • 2. Re: Re: createVirtualGuest Error

            Hi Bill,

             

            PFA appserver log.

             

            You can find above error in it.

            • 3. Re: Re: createVirtualGuest Error
              Aryan Anantwar

              Hi Rohan,

              You did half of the procedure correctly & missed half one.

              How??? see below:

               

              See the link below for correct sample XML for creating VGJ.

              https://docs.bmc.com/docs/display/public/bsa83/Sample+VGJ+XML+file+-+VMware+vCenter

               

              The XML you are using is not well formed.

              The Command "Virtualization getVirtualGuestPackage" will only return you the current configuration for specific VGP.

               

              But for the command Virtualization createVirtualGuest "//xxxxx/d/VirtualGuestJob.xml" the input XML format is little different. The above link will clear your idea.


              • The XML you have used contains the <GeneralInfo> section, which is not required for VGJ xml.
              • Also your XML actually missing the below section which is mandatory:

                 <VirtualGuestJob>        <JobName>win2k8_job_4</JobName>        <JobFolderID>2000100</JobFolderID>        <VirtualGuestDestination>XX</VirtualGuestDestination>                                   <ExecuteNow>true</ExecuteNow>    </VirtualGuestJob>

              • Here you can specify the Job Name for the VGJ which is going to be created by this command
              • JobFolderID the location where this Job will get created
              • VirtualGuestDestination where the VM should geet deployed
              • ExecuteNow option allows you to execute the VGJ immediately.

               

              Follow the steps for VGP provisioning using BLCLI mentioned in below doc:

              https://docs.bmc.com/docs/display/public/bsa83/Virtualization+concepts

               

              HTH.

               

              Regards,

              Aryan Anantwar


              • 4. Re: Re: createVirtualGuest Error

                Thanks Aryan,

                 

                For your descriptive response, but I don't have access to BMC docs, so will you please provide me exact commands in sequence which needs to be followed.

                 

                I am looking in BLCLI help as well, if I resolved the issue, I will update you about the same.

                • 5. Re: createVirtualGuest Error

                  Hi Aryan,

                   

                  is this right VGJ xml???

                   

                  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

                  <VirtualGuestJobConfiguration>

                   

                      <VirtualGuestPackage>

                     <VGPackageID>17782</VGPackageID>

                     <VirtualGuestName>red_hat_3March_vm</VirtualGuestName>

                   

                      <PlatformInfo>

                          <VMwareInfo>

                              <ClonedDiskFormat>sameAsSource</ClonedDiskFormat>

                              <IsCustomConfig>false</IsCustomConfig>

                              <VMXDatastore>datastore1</VMXDatastore>

                              <GuestOSId>2</GuestOSId>

                              <GuestOSVersionId>8</GuestOSVersionId>

                              <NumOfProcessors>1</NumOfProcessors>

                              <MemoryInMB>1024</MemoryInMB>

                              <VMwareDiskSettings>

                                  <DiskInfo>

                                      <DiskSize>15360</DiskSize>

                                      <DiskSizeUnit>MB</DiskSizeUnit>

                                      <Datastore>datastore1</Datastore>

                                      <ThinProvisioning>true</ThinProvisioning>

                                  </DiskInfo>

                              </VMwareDiskSettings>

                              <VMwareNetworkSettings>

                                  <NetworkConnection>

                                      <Network>VM Network</Network>

                                      <Adapter>Flexible (default)</Adapter>

                                      <ConnectAtPowerOn>true</ConnectAtPowerOn>

                                  </NetworkConnection>

                              </VMwareNetworkSettings>

                          </VMwareInfo>

                      </PlatformInfo>

                      </VirtualGuestPackage>

                   

                     <VirtualGuestJob>

                         <JobName>red_hat_3_march_job</JobName>

                         <JobFolderID>2000065</JobFolderID>

                         <VirtualGuestDestination>46 VMwareESXServer host-65</VirtualGuestDestination>

                         <ExecuteNow>false</ExecuteNow>

                      </VirtualGuestJob>

                   

                  </VirtualGuestJobConfiguration>

                  1 of 1 people found this helpful
                  • 6. Re: createVirtualGuest Error
                    Aryan Anantwar

                    Hi Rohan,

                     

                    Yes, now this looks to work.

                    Just check in the link mentione din my last reply, for the Network Connection details:

                    For ref.

                      <NetworkConnection>

                       <Network>VM Network</Network>

                       <Adapter>E1000</Adapter>

                       <ConnectAtPowerOn>true</ConnectAtPowerOn>

                       <GuestNetworkConfiguration>

                       <IPAddress>192.168.1.13</IPAddress>

                       <SubnetMask>255.255.255.0</SubnetMask>

                       <DefaultGateway>192.168.1.1</DefaultGateway>

                       <PrimaryDNS>192.168.1.204</PrimaryDNS>

                       <SecondaryDNS>192.168.1.203</SecondaryDNS>

                       <TertiaryDNS>192.168.1.202</TertiaryDNS>

                       <PrimaryDnsSuffix>dsl.bmc.com</PrimaryDnsSuffix>

                       </GuestNetworkConfiguration>

                      </NetworkConnection>

                     

                    Also if you are providing diff values for Memory & CPU than which are configured in VM Template, then use "true" value for

                    <IsCustomConfig> attribute.

                     

                    HTH.

                    All The Best

                     

                    Regards,

                    Aryan Anantwar

                    • 7. Re: createVirtualGuest Error

                      Thanks Aryan,

                       

                      Finally Succeeded in Creating Virtual Guest Job using BLCLI and executed that job for RHEL VM provisioning.

                       

                      Implemented same using Atrium Orchestrator to create Virtual Guest Job and it has successfully provisioned new RHEL VM.

                       

                      Thanks,

                      Rohan More

                      • 8. Re: createVirtualGuest Error
                        Aryan Anantwar

                        Hey Rohan,

                        That's cool.

                         

                        Regards,

                        Aryan Anantwar