11 Replies Latest reply on Feb 12, 2012 9:48 AM by Umar Shaikh

    blcli createVirtualGuest failing

      We are trying to set the Network and Adapter in the VM Network Connection for a VGJ using blcli instead of GUI. With GUI it has worked (see attached picture GUI.png)

       

       

      With blcli we are receiving following error:

       

       

      blcli -v defaultprofile -r BLAdmins Virtualization createVirtualGuest //server/input.xml

       

       

      Command execution failed.  Error validating the input xml file - /opt/bmc/BladeLogic/8.0/NSH/tmp/application_server/blcliinfile_5c

      1af339-e1cb-4d56-b2f5-411e4598a93b.tmp. Exception is: Input VGP XML does not comply with the schema (line 11, column 15). Message:

      cvc-complex-type.2.4.a: Invalid content was found starting with element 'VMXDatastore'. One of '{NumOfProcessors, MemoryInMB, VMw

      areDiskSettings, VMwareNetworkSettings, OSCustomizationInfo}' is expected. Check app server logs for more details.es01-b-aos%

       

       

      The log from appserver shows:

       

       

      [10 Feb 2012 14:00:33,046] [Client-Connections-Thread-8] [ERROR] [BLAdmin:BLAdmins:10.95.187.39] [Client] Error validating the input xml file - /opt/bmc/BladeLogic/8.0/NSH/tmp/application_server/blcliinfile_2a282fc2-590e-4ec8-868d-85cb34ef32a1.tmp. Exception is: Input VGP XML does not comply with the schema (line 11, column 15). Message: cvc-complex-type.2.4.a: Invalid content was found starting with element 'VMXDatastore'. One of '{NumOfProcessors, MemoryInMB, VMwareDiskSettings, VMwareNetworkSettings, OSCustomizationInfo}' is expected. Check app server logs for more details.

      com.bladelogic.om.infra.mfw.util.BlException: Error validating the input xml file - /opt/bmc/BladeLogic/8.0/NSH/tmp/application_server/blcliinfile_2a282fc2-590e-4ec8-868d-85cb34ef32a1.tmp. Exception is: Input VGP XML does not comply with the schema (line 11, column 15). Message: cvc-complex-type.2.4.a: Invalid content was found starting with element 'VMXDatastore'. One of '{NumOfProcessors, MemoryInMB, VMwareDiskSettings, VMwareNetworkSettings, OSCustomizationInfo}' is expected. Check app server logs for more details.

       

       

      All of the missing elements are there (and they are also supposed to be optional as per the xsd (minOccurs=0).

       

      Attached also the input.xml

       

      Thanks in advance.

        • 1. blcli createVirtualGuest failing

          I cannot see VMware Disk Settings in to your XML, Below is the example for the same

           

          <VMwareDiskSettings>

          <DiskInfo>

          <DiskSize>20480</DiskSize>

          <DiskSizeUnit>MB</DiskSizeUnit>

          <Datastore>Datastore1</Datastore>

          </DiskInfo>

          </VMwareDiskSettings>

          • 2. blcli createVirtualGuest failing

            In the blcli help is stated that:

             

            If you want to:

             

            Clone the template/VM as far as the number of disks, BUT use a different datastore for both the .vmx file and the .vmdk files.

            You may need to do this if you are working with a target (Host/Cluster/ResourcePool) that is in a different location from where source template is located.

             

             

            Take these actions:

             

            •  <VMXDatastore> - Specify new datastore. This will be used for .vmx file and .vmdk files.

              •  <DiskInfo> sections - Omit from the VGP file

             

            So, I'm omitting from the VGP file, as this is defined in the Template.

            • 3. Re: blcli createVirtualGuest failing

              I have attached one of the working VGJ.xml, have a look at it hope it will help.

               

              The best way is to export VGP.XML from your existing template and replace the Patforminfo section in to your VGJ.xml which you are using to provision a new VM via blcli

              • 4. blcli createVirtualGuest failing
                Rodrigo Arratia

                Hi Santosh,

                 

                I'm working with Miguel on this issue.

                 

                I used the PlatformInfo Section from the VGP as well, but it doesn't work.

                 

                I made it working if I don't Specify both VMXDatastore and VMwareDiskSettings elements, and then the job runs and creates a clone of the template.

                 

                The problem is that we want to clone the template in another Cluster/Datastore then, based on the blbli_help, we should be using the tag VMXDatastore and set the proper destination datastore.

                 

                We had that working with the deprecated Virtualization CreateVirtualGuestFromPackage, but now we have to specify new Network Connections on the VM's and then we have to use the new Virtualization CreateVirtualGuest.

                 

                Regards,

                 

                Rodrigo.

                • 5. blcli createVirtualGuest failing

                  Have you upgraded you BBSA  to 8.1 ? If so then in 8.1 I believe few blcli have been deprecated i.e. (CreateVirtualGuestFromPackage --> CreateVirtualGuest).

                   

                  I believe you are trying to provision a new VM via blcli using a VGJ.xml, so in XML you can give a new datastoe you want this new VM to be.

                  • 6. blcli createVirtualGuest failing

                    That's exactly the command wer are triggering:

                     

                    blcli -v defaultprofile -r BLAdmins Virtualization createVirtualGuest //server/input.xml

                     

                    and it's failing with element 'VMXDatastore'.

                    • 7. blcli createVirtualGuest failing

                      Have you tried specifying both the VMXDatastore and the VMwareDiskSettings tags?

                      What is the exact build you're on?

                      • 8. blcli createVirtualGuest failing
                        Rodrigo Arratia

                        Hi Umar,

                         

                        I tried specifying both and works. But Per the documentatio it would be possible to omit the DiskInfo tags for the disks already existing on the template and then build some more disks on top.

                         

                        Maybe it has a special syntax??

                         

                        Regards,

                        • 9. blcli createVirtualGuest failing

                          Aah. I guess the documentation isn't very clear here.

                           

                          The way the Virtual Guest Job works is that you need to provide the 'complete' PlatformInfo tag from the XML you get when you fire the 'getVirtualGuestPackage' BLCLI. A partly provided PlatformInfo will not work correctly. Of course, if you want, you can make additional modifications within the Virtual Guest Job XML.

                           

                          Now, regarding the documentation, its stating that the DiskSettings and NetworkSettings should be omitted from the 'VGP' XML. i.e. the XML used to create the VGP and not the VGJ. This is because for creation of the VGP, BBSA already sources all the information from the referenced Template itself. If one happens to provide Disk and Network settings, it would create extra ones.

                           

                          I think you have got confused between the XML required to create a VGP (createVirtualGuestPackage) and the XML that one gets post creating a VGP (getVirtualGuestPackage). The documetation is pointing to the first.

                           

                          I hope that clears the confusion. If you need further help in automating, please feel free to reach out.

                          1 of 1 people found this helpful
                          • 10. blcli createVirtualGuest failing
                            Rodrigo Arratia

                            Hi Umar,

                             

                            I think the documentation is not clear there when it says "Omit DiskInfo from the VGP".

                             

                            When I have been using the full XML but changing the values it has worked perfectly.

                             

                            Thanks so much.

                             

                            Rodrigo.

                            • 11. blcli createVirtualGuest failing

                              So, is this resolved? Please mark the answers appropriately to help others facing similar problems.