5 Replies Latest reply on Jan 24, 2017 3:46 PM by oliver_rafa

    Taking user inputs while deploying VM/vApp

    hemantha201110141 Novice

      Hi,

       

      We would like to build a windows 2008 appliance, with our product installed and configured. Our product need some application variables/parameters which change from deployment to depolyment (like IP, tomcat port, custom timezones, organization name etc. to generate SSL certs ) .

       

      Is there any way can I take these inputs from user (while depolying the VM) and provide them as inputs to my application ?

       

      I have gone through the OVF environemnt variables and configured few custom variables via Studio -> Output -> OVF Properties -> OVF Environment.

       

      Built VM with this settings. When I open the .OVF file, the custom variables I added, appeared at VirtualSystem -> ProductSection as 'Property' elements portion. (i'm expecting them as 'Evironement' elements).

       

      When I try to deploy this VM I expected it will ask for user inputs, but it never asked.

       

      Please suggest me a way to get the application inputs from user, before deploying the VM. I'm using Studio 2.6 and ESXi4.0 as deployment environment.

       

      Thanks in advance.

       

      --Hemanth

        • 1. Re: Taking user inputs while deploying VM/vApp
          asharpe Hot Shot
          VMware Employees

          There is no VAMI for Windows. So, you will have to retrieve the OVF properties yourself and process them. The tool's binary called vmware-rpctool should allow you to see the properties from the guestinfo.ovfEnv area.

          • 2. Re: Taking user inputs while deploying VM/vApp
            asharpe Hot Shot
            VMware Employees

            Sorry, I should be more helpful. Ensure that the VM has VMware Tools in it, and run the following command to retrieve the OVF environment presented to the VM by vCenter:

             

            "C:\Program Files\VMware\VMware Tools\rpctool.exe" "info-get guestinfo.ovfEnv"

             

            You can capture the output and parse out the properties that you are interested in.

            1 person found this helpful
            • 3. Re: Taking user inputs while deploying VM/vApp
              hemantha201110141 Novice

              Thanks for your response.

               

              I added few variables/parameters through vCenter and exported the OVF. Tried to depoloy this OVF in another vCenter. After deployment (and when I tried to power on) it prompted to fill the values for the parameters. I filled them in vCenter and powered on the VM.
              When the VM boots, tried to run the rpctool.exe command that you mentioned above and it says 'No value found'. Reinstalled/upgraded VMware Tools on this VM again, and run the command. No difference. It still says 'No value found'.
              Examined the OVF file, found that the parameters I entered are stored in <ProductSection> section of the OVF XML ( I expected them in <Environment> section) under <VirtualSystem>, like below.
              <ProductSection>
                    <Info>Information about the installed software</Info>
                    <Category>serverip</Category>
                    <Property ovf:key="serverip" ovf:type="string" vmw:qualifiers="AutoIp(&quot;VM Network&quot;)">
                      <Label>serverip</Label>
                    </Property>
                    <Category>servername</Category>
                    <Property ovf:key="servername" ovf:type="string" ovf:userConfigurable="true">
                      <Label>servername</Label>
                    </Property>
                    <Category>tomcatport</Category>
                    <Property ovf:key="tomcatport" ovf:qualifiers="MaxValue(5000)" ovf:type="uint16" ovf:userConfigurable="true">
                      <Label>tomcatport</Label>
                    </Property>
                  </ProductSection>
                </VirtualSystem>
              What went wrong for me ? Why I didn't get the variables through VMware tools ? Please clarify.
              • 4. Re: Taking user inputs while deploying VM/vApp
                asharpe Hot Shot
                VMware Employees

                Hmm. Can you define the properties in Studio and build the VM and try it? Using vCenter export after creating properties *ought* to work, but if you are finding issues with that flow, then Studio isn't involved, and you'd be better off asking the vSphere or OVF community forums.

                • 5. Re: Taking user inputs while deploying VM/vApp
                  oliver_rafa Lurker

                  The right command to see the OVF environment properties:

                   

                  "C:\Program Files\VMware\VMware Tools\vmtoolsd.exe" --cmd "info-get guestinfo.ovfEnv"