VMware Aria Automation Tools

 View Only
Expand all | Collapse all

Create empty VM from Aria Automation Assembler

  • 1.  Create empty VM from Aria Automation Assembler

    Posted Oct 16, 2024 10:44 AM
    Edited by DizzyMurloc Oct 21, 2024 04:18 AM
    Hello everyone,
    I am migrating the service catalog from vRA7 to Aria Automation 8.16.
    One of the vRA7 services creates an empty VM with the following build information:
    - Blueprint type: Server
    - Action: Create
    - Provisioning workflow: BasicVmWorkflow
    I am having problems migrating this service to Aria Automation, because in the cloud template it is not possible to define a Cloud.vSphere.Machine object with the empty image property.
     
    As a possible solution, I have created an empty VM template in vCenter, which is the one I use as image in the cloud template. However, it takes more than 20 minutes to deploy the VM, as it waits for a long time in the CREATE_IN_PROGRESS stage of the Cloud.vSphere.Machine object.
     
    Is there any way to do this in a more efficient way?
     
    Greetings.


  • 2.  RE: Create empty VM from Aria Automation Assembler

    Posted Oct 16, 2024 03:21 PM

    Hi @DizzyMurloc, I believe it is due to version change from 7 to 8.16...

    if we see any of these logs [vra.log, requests.log and error.log], we might get some hints or clues...

    Regards. 




  • 3.  RE: Create empty VM from Aria Automation Assembler
    Best Answer

    Posted Oct 17, 2024 02:42 AM

    Hi @DizzyMurloc

    Try using these properties in your cloud template:

    https://docs.vmware.com/en/vRealize-Automation/8.11/Using-and-Managing-Cloud-Assembly/GUID-7AAE0B88-1D02-4179-B3A3-E679BD8F78B4.html

    We also make use of an empty VM template to achieve this. As far as I know there is no other way.

    Regards




  • 4.  RE: Create empty VM from Aria Automation Assembler

    Posted Oct 18, 2024 02:27 AM

    I deploy Empty VMs within minutes.
    Sounds like your long wait is due to Automation waiting for Tools to report back hostname and IP.
    You can skip this by adding the following to your YAML
          awaitIp: false
          awaitHostName: false


    If you require the new VM, NOT to PowerOn, this can be done using a Subscription (for 'Compute initial power on') and an ABX containing
    -----
    def handler(context, inputs):
        output = inputs
        if inputs["customProperties"]["testPowerOn"] == "no":
            output['initialPowerOn'] = 'false'
        return output
    ----

    Hope this helps

    \\Anders




  • 5.  RE: Create empty VM from Aria Automation Assembler

    Posted Oct 18, 2024 11:13 AM
    Edited by svdb Oct 18, 2024 11:45 AM

    I have tried this but it fails at the point that the VM will start:

    Customization of the guest operating system is not supported due to the given reason: Tools is not installed in the GuestOS. Please install the latest version of open-vm-tools or VMware Tools to enable GuestCustomization.

    The used template doesn't contains an OS, only a mounted DVD to install is from scretch.

    It looks it do the customisation first, but never in my blueprint is that configured.




  • 6.  RE: Create empty VM from Aria Automation Assembler

    Posted Oct 21, 2024 03:30 AM

    You may change something in the CloudTemplate regarding `customizeGuestOs` value (set it to "false"):

    resources:
      vm: 
        type: Cloud.vSphere.Machine
        [ .... ]
        properties:
          name: dummyname
          customizeGuestOs: false

    And I'm not sure if it's possible to speed-up the deployment because all the "allocation" part (choose cluster, resource pool, network, get IP) always takes a long time... 😅




  • 7.  RE: Create empty VM from Aria Automation Assembler

    Posted Oct 21, 2024 03:52 AM

    Did you make the subscription "Blocking"?
    and did you add the CustomProperties "testPowerOn" to the CT?




  • 8.  RE: Create empty VM from Aria Automation Assembler

    Posted Oct 21, 2024 06:30 PM
    Edited by Jason McClellan Oct 22, 2024 09:58 AM

    Hi @svdb 

    1- You have to use vSphere Customizations to make any customization for vSphere VM

    Or

    • Use vRA Cloud Template customization.

    2- For template used, you have to install both VMTools & Cloud-init [For Linux VM] / Cloudbase-init [For Windows VM] & make CD-ROM option "Path-through" (Mandatory)

    ------------------------------
    Tarek Nader
    www.linkedin.com/in/tnader-70853361
    ------------------------------



  • 9.  RE: Create empty VM from Aria Automation Assembler

    Posted Oct 22, 2024 01:16 AM

    @tarek_nader

    thank you for the answer but if you read the question again, it was about an "empty VM", so just the shell, nothing inside, and no customization at all 😉 




  • 10.  RE: Create empty VM from Aria Automation Assembler

    Posted Oct 22, 2024 09:59 AM

    @LuluTchab

    Yes I have read it, as I said you can create dummy empty VM from vSphere, then in from vRA Assembler, in 'Cloud Template customization' you can use this dummy VM template to create a VM with no OS with all customizations [VM's Advanced options / vApp options,...etc] you need.

    I have created something like this before.

    Use case was to provide an empty appliance to be provisioned by vRA, then another team will shutdown & replace it with vendor appliance with the same configurations [DNS, Name, IP,...etc]; I know it's useless; but required from another team so, we have to think out-of-the-box



    ------------------------------
    Tarek Nader
    www.linkedin.com/in/tnader-70853361
    ------------------------------



  • 11.  RE: Create empty VM from Aria Automation Assembler

    Posted Oct 22, 2024 11:04 AM

    I may not understand correctly the purpose of your message above but you're talking for example about using CloudInit to customize the VM but because it's an empty VM, without any OS, I just don't understand 😅




  • 12.  RE: Create empty VM from Aria Automation Assembler

    Posted Oct 21, 2024 04:17 AM
    Edited by DizzyMurloc Oct 21, 2024 04:18 AM

    Hi everyone,

    Deep diving into the logs, i founded this:

    "INFO provisioning [host='provisioning-service-app-57894f66fd-n69vw' thread='vsphere-ip-check-66' user='' org='' trace='' parent='' span=''] c.v.p.c.m.a.v.VSphereAdapterInstanceService.run:1245 - Checking if IP was allocated for compute with link [/resources/compute/18b99fbc-d9e0-44c1-8667-1d0175fbd7dd].

    INFO provisioning [host='provisioning-service-app-57894f66fd-n69vw' thread='vsphere-ip-check-66' user='' org='' trace='' parent='' span=''] c.v.p.c.m.a.vsphere.VSphereComputeUtils.scheduleCheckForIpIfNeeded:284 - IP of [/resources/compute/18b99fbc-d9e0-44c1-8667-1d0175fbd7dd] not available yet. Number of retry attempts remaining is [31]. Re-scheduling task to check IP..."
    So the property awaitIp: false in the cloud template works for me.
    Thanks all for your responses!!

    Regards




  • 13.  RE: Create empty VM from Aria Automation Assembler

    Posted Oct 21, 2024 04:42 AM

    You might also think about setting your network assigment to "dynamic" so it does not even allocate an IP address. If you don't make use of this IP in the guest OS later (Setting it in GuestOS via Script etc) it might be better to not let vRA allocate an IP at all. This depends on your use case.

          networks:
            - name: '${net.name}'
              assignment: dynamic
              network: '${resource.net.id}'



  • 14.  RE: Create empty VM from Aria Automation Assembler

    Posted Oct 21, 2024 05:38 AM

    Glad to help