10 Replies Latest reply on Apr 21, 2010 8:28 AM by lokesh NameToUpdate

    Bladelogic 8.0

      I am using the following command on nsh

      blcli Virtualization createVirtualGuestFromPackage "//10.35.141.94/c/propsFile.xml"

      and the xml file contains:

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


      <VirtualGuestPackage>

      <VGPackageID>2378</VGPackageID>
      <VGName>xyz</VGName>
      <VGNoOfProcessors>1</VGNoOfProcessors>
      <VGMemoryInMB>512</VGMemoryInMB>

      <VGDiskInfo>
        <Disk>
         <StoragePath>10.35.141.116:Storage1</StoragePath>
         <DiskSize>1</DiskSize>
         <UseExistingdisk>false</UseExistingdisk>
        </Disk>
      </VGDiskInfo>
      <VGNetworkInfo>
        <Network>
         <NetworkPortGroup>VM Network</NetworkPortGroup>
         <NetworkAdaptorType>E1000</NetworkAdaptorType>
         <ConnectAtPowerOn>true</ConnectAtPowerOn>
        </Network>
      </VGNetworkInfo>
      </VirtualGuestPackage>


      <VirtualGuestJob>

      <JobName>lokeshg</JobName>
      <JobFolderID>2000205</JobFolderID>

      <ExecuteNow>false</ExecuteNow>
      <VirtualGuestDestination>13 10.35.141.95 WORKGROUP</VirtualGuestDestination>
      </VirtualGuestJob>


      </CreateVGRequest>

      Appserver ip-10.35.141.94

      ESX server ip-10.35.141.116

      vcentre ip-10.35.141.95

      but i am executing the above mentioned command it shows the following error:

      Command execution failed.  com.bladelogic.mfw.util.BlException: com.bladelogic.m
      fw.util.BlException: invalid value in input file: <ServiceRquestID>

       

      I am not able to understand what's wrong with this command.Please help me out.

        • 1. Re: Bladelogic 8.0

          Hi Lokesh,

           

          Looking at the XML, I have 2 questions:

           

          1. Storage Path: You have mentioned this as '10.35.141.116:Storage1'. Is this the datastore name? It might be the case that the datastore is just Storage1. In that case you would have to give the names as Storage1 itself.
          2. VirtualGuestDestination: You have mentioned this as '13 10.35.141.95 WORKGROUP'. Is this correct? This looks wrong to me. Could you refer the documentation for VGP and generate the correct ID? It should be something like 'ServerID EntityType InternalName'

           

          -Umar

          • 2. Re: Bladelogic 8.0

            Hi,

            Storage1 is the datastore name and 10.35.141.116 is the ip of esx server.So please tell me is it the right way to provide this value '10.35.141.116:Storage1' in the Storage Path tag.

            10.35.141.95 is my vcentre server's ip and I have used the following command to know the serverid :

            blcli Server getServerIdByName "10.35.141.95"

            and this command's output is-13 that’s why in the VirtualGuestDestination I was using 13 vcentre WORKGROUP.

            Its not clear what is EntityType.In the VGP documentation in place of EntityType they are using VMwareCluster so should I use the same or tell me what command I can use to know the EntityType.

            Also I think in place of InternalName,I have to provide the domain name of the vcentre server but my vcentre server is not having any domain bcoz it is in the workgroup thats why I used 'WORKGROUP' which is its workgroup name.

            Please help me out with this issue as this is very critical to me.

             

            Thanks and Regards,

            Lokesh Goyal

            • 3. Re: Bladelogic 8.0

              Hi,

               

              Lokesh, I would need you to answer some questions.

               

              Can you open VI Client, connect to your vCenter and browse to the ESX Host where you want to deploy the VM? Go to the 'Summary' tab and look at what is the name of the datastore. It is present on the right.

               

              Can you tell me exactly where you want to deploy your VM? Is it on an ESX Host? Is that ESX Host in a Cluster? If yes, what type of cluster is it? If no, forget about the cluster altogether.

               

              Apart from this, I would suggest you to look at the following CLI's:

              blcli -v <profile-name> -r <role-name> Virtualization listVirtualEntityTypes
              blcli -v <profile-name> -r <role-name> Virtualization listVirtualEntityManagers

              blcli -v <profile-name> -r <role-name> Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType <server-id> <Entity-Type-Name-From-First-CLI>

               

              The results from these CLI's should be helping you out with your inputs. It's plain to see that your VirtualGuestDestination is wrong. It is actually got by running the last CLI. The Entity Type that you have to provide for the last CLI would come from where exactly you want to deploy your VM.

               

              Hope this helps.

               

              -Umar

              • 4. Re: Bladelogic 8.0

                Hi,

                name of the datastore is 'Storage1' I have checked it as you mentioned.

                I want to deploy my VM on ESX Host which is not in a cluster.

                Now I am giving you the output of the commands suggested by you.

                 

                1---> blcli -v <profile-name> -r <role-name> Virtualization listVirtualEntityTypes

                output:

                VMwareVirtualCenter,

                VMwareESXServer,

                VMwareCluster,

                VMwareResourcePool,

                VMwareVirtualMachine,

                VirtualMachineTemplates,

                VMwareNetwork,

                VMwareDataStore

                 

                2--->blcli -v <profile-name> -r <role-name> Virtualization listVirtualEntityManagers

                output:

                13::10.35.141.95

                 

                Now for the 3rd command i am facin a bit problem

                ESX Server ip-10.35.141.116(serverid-14)

                VCentre Server ip-10.35.141.95(serverid-13)

                Now i am executing the 3rd command with the following options and also showing the outputs

                 

                1)C:\Documents and Settings\Administrator>blcli -v defaultProfile -r BLAdmins Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType 13 VMwareVirtualCenter

                Command execution failed.  Unexpected exception while handling request.com.bladelogic.model.depot.vgpackage.VirtualGuestPackageService_listVirtualEntitiesByServerIDandEntityType(int, java.lang.String)

                 

                2)C:\Documents and Settings\Administrator>blcli -v defaultProfile -r BLAdmins Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType 13 VMwareESXServer

                10.35.141.116::10.35.141.116::13 VMwareESXServer host-29

                 

                3)C:\Documents and Settings\Administrator>blcli -v defaultProfile -r BLAdmins Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType 14 VMwareESXServer

                 

                4)C:\Documents and Settings\Administrator>blcli -v defaultProfile -r BLAdmins Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType 14 VMwareVirtualCenter

                 

                For 3) and 4) there is no output

                 

                Umar please have a look and suggest me what changes should I make in my xml that I provided you earlier.

                We can also have a live meeting if its possible for you.

                Please reply asap.

                 

                Thanks and Regards,

                Lokesh Goyal

                • 5. Re: Bladelogic 8.0

                  Great!

                   

                  You've got your final inputs yourself!

                   

                  Your VirtualGuestDestination is: 13 VMwareESXServer host-29

                  And your StoragePath is: Storage1

                   

                  Make these changes and check if it works.

                   

                  Btw, the BLCLI is basically to be run against the Virtual Center server. So you would run it against the server ID 13 only. It would not run for server ID 14. Moreover, the Entity Type was supposed to be VMwareESXServer because that is where you want to deploy the Virtual Machine within the Virtual Center. Thus we form the name "13 VMwareESXServer host-29", where 13 is your Virtual Center in BladeLogic, VMwareESXServer is the type on which you want to deploy your VM and host-29 is the host on which you want to deploy it on. (host-29 is the internal name of your ESX Host).

                   

                  Hope this helped.

                   

                  -Umar

                  • 6. Re: Bladelogic 8.0

                    Umar I have made the changes as mentioned by you in my xml file and then run the following command.

                    blcli -v defaultProfile -r BLAdmins Virtualization createVirtualGuestFromPackage "//10.35.141.94/c/propsFileURL.xml"

                    but still it's showing the following error:

                    Command execution failed.  com.bladelogic.mfw.util.BlException: com.bladelogic.mfw.util.BlException: invalid value in input file:

                     

                    Are there values right?

                     

                    Lokesh Goyal

                    • 7. Re: Bladelogic 8.0

                      Hi,

                       

                      The only change you made to the XML were those 2 fields right?

                       

                      I'll just run this against our environments and check whats the problem..

                       

                      -Umar

                      • 8. Re: Bladelogic 8.0

                        Hi,

                         

                        Could you add the following lines in the XML?

                         

                         

                         

                        These are basically some LifeCycle properties, but they would not be created. Just dummy values. Add these and run the cli again.

                         

                        -Umar

                        • 9. Re: Bladelogic 8.0

                          Oops... forgot to paste the lines itself

                           

                          <LifeCycle>

                                <noLifeCycle>false</noLifeCycle>

                               <ServiceRquestID>SRID1</ServiceRquestID>

                               <ChangeID>CID1</ChangeID>

                                <TaskID>TID1</TaskID>

                                <Owner>O1</Owner>

                                <ExpiryDate>2009-07-27 04:54:44</ExpiryDate>

                          </LifeCycle>

                           

                          -Umar

                          • 10. Re: Bladelogic 8.0

                            Thanks a lot Umar it worked!!!

                            Seriously thanks a lot again

                             

                            Regards,

                            Lokesh Goyal