8 Replies Latest reply on Mar 6, 2020 10:36 AM by msaxbury

    vRA 7.6 Add Drive letter mount path without using Guest Agent

    msaxbury Novice

      When using the guest agent, I was able to set a registry setting in my template, that caused my drives to be initialized and ready for use post provisioning workflows completed.

       

      I have since been told and read, but can't find it, that the Guest Agent is going away (deprecated) in 7.6+ or 8.0. If so, what is the recommended way to configure a new drive letter mount path in vRA from on the storage tab without the Guest Agent installed in the Template, so that the drives are added to the VM? I understand I might need a post provision script to initialize them.

        • 1. Re: vRA 7.6 Add Drive letter mount path without using Guest Agent
          daphnissov Guru
          vExpertCommunity Warriors

          The guest agent is still available in all 7.x versions but was replaced in 8.0 with cloud-init. You will need to handle any mounts and drive manipulation therefore with a cloud-init config in your blueprint.

          • 2. Re: vRA 7.6 Add Drive letter mount path without using Guest Agent
            msaxbury Novice

            The question more specifically stated was how do you complete adding new drives from a request in 7.6, if you are NOT going to have the agent installed in the template? i don't want to just use a post provisioning in guest script.

            The Guest Agent works off vmtools, right? So, if I can know what commands vRA passess to the Guest Agent I can parse the payload and use vmtools in my workflow to make the same command.

            • 3. Re: vRA 7.6 Add Drive letter mount path without using Guest Agent
              daphnissov Guru
              vExpertCommunity Warriors

              The Guest Agent works off vmtools, right?

              No, it doesn't. It relies upon network communication from the IaaS layer to the deployed machine and talks to a specific Windows service (binary) via a socket. From there, it invokes one or more JS files with the required inputs and based on the task it is asked to perform. Another way you could possibly do this (although requires much more work) is to do something through vRO, but then that is likely going to mean you have to use XaaS for your request.

              • 4. Re: vRA 7.6 Add Drive letter mount path without using Guest Agent
                msaxbury Novice

                It appears the drive data from the form is being sent to vRO, whether the guest agent is installed or not. When I had my guest agent installed, I set this registry value and the drives were automatically configured and initialized with no other work.

                 

                HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\mountmgr\NoAutoMount with REG_DWORD value set to 0.

                 

                How does vRO engage the Guest Agent installed in the template to do something with the additional drive information when the additional drive information is provided on the form? 

                • 5. Re: vRA 7.6 Add Drive letter mount path without using Guest Agent
                  daphnissov Guru
                  Community WarriorsvExpert

                  vRO isn't what drives the guest agent. The agent checks in with the IaaS Manager to see if there is a work item for it to perform. It then gets this pushed to it and through a series of JS scripts it performs the actions. When using the guest agent, you do not need to disable that registry value because the agent should handle all the necessary steps.

                  • 6. Re: vRA 7.6 Add Drive letter mount path without using Guest Agent
                    msaxbury Novice

                    Setting NoAutoMount to 0, turns "ON" auto mount so that drives will be automatically formatted, processed, and initialized and the result is it shows up in Explorer and is accessible to scripts to write to. IF you don't set that value to 0, The disk is allocated the space, and the drive letter is assigned, however it is not made available to the OS or apps.

                     

                    So, it sounds like the IaaS Manager contains the drive data and a request to create those drives, and the Guest Agent checks in, and run commands via JS scripts to create the drives; and since the auto mount registry value is set to allow auto mounting, Windows initializes the drives and makes them avail to the OS and other apps so it can be automatically written to beyond that point.

                     

                    IF the NoAutoMount registry item is NOT set to 0, the drives will not be accessible at the OS level and requires a script to do the diskpart initialization so they can be written to and accessed by apps.

                    • 7. Re: vRA 7.6 Add Drive letter mount path without using Guest Agent
                      daphnissov Guru
                      Community WarriorsvExpert

                      When installing the guest agent, I have never seen nor heard of a requirement to manually change this value in the registry. All the functionality is carried out by the agent itself aside from presenting the actual virtual disk itself. So I'm not sure if you felt you needed to change this option just because, or if you found it wasn't working otherwise, or read/were told it was necessary as of 7.6, but it has never been an issue in any of the versions I have deployed.

                      • 8. Re: vRA 7.6 Add Drive letter mount path without using Guest Agent
                        msaxbury Novice

                        In early 7.*, (probably 7.3-7.5), I had to set the value to 0 because post provisioning when Chef runs to install an application that writes files to the new drives, it failed because the new drives were not accessible. The drives were NOT initialized and ready for use despite having the Guest Agent active in the VM and filling out the drive letter and size on the vRA form. If I remove this setting, I have to either script the formatting and initialization or manually do it once the vm is provisioned. Windows OS is configured NOT to automate the processing of newly added drives in this manner, so I don't know how the Guest Agent bypasses that without this setting. I have not tried it in 7.6.