Some applications have licensing requirements which are bound to the MAC address of the installation VM. When this is the case a vCommander® Completion Workflow must be run to update the MAC address to the desired value, following the procedure detailed below. This is because vCommander dynamically assigns MAC addresses. This solution is not compatible for use with fenced VMs, as a change to the MAC will impact communications with the deployed vRouter.


Requirements


 

Creating the Completion Workflow


This solution requires that the script to set the MAC address be available on the vCommander server, where it will be called by the workflow.

  1. Download the Set MAC script package to the vCommander application server.
  2. Extract the script to C:\Scripts\networks\.
  3. Edit the script to provide the address the vCenter to which the VMs will be deployed and location of your encrypted credentials file.

Next, create a Completion Workflow which uses this file in a script step.
  1. Browse to Configuration > Service Request Configuration and switch to the Completion Workflow tab.
  2. Click Add.
  3. Provide a Name and choose to Apply this workflow: after a VM is deployed. Click Next.

  4. On the Steps page, click Add and choose Wait for Event. Configure as follows then click Next:

    • Step Name: Wait for 10s
    • Step Execution: Always Execute (or conditional as appropriate)
    • Wait For: Time to Elapse
    • Wait Time: 10 seconds
  5. Click Add and choose Perform Power Action. Configure as follows then click Next:

    • Step Name: Perform Power Action
    • Step Execution: Execute when conditions are met
    • Action: Stop
    • Click Edit and enter the condition #{target.state} -ne “Not Running” and click OK.

  6. Click Add and choose Execute Script. Configure as follows then click Next:

    • Step Name: Execute Script
    • Step Execution: Always Execute
    • Timeout: 300 seconds
    • Script Output: Capture script output as comment
    • When Step Fails: Mark workflow step as failed: do not proceed
    • Command Line: 
      c:\windows\system32\WindowsPowershell\v1.0\powershell.exe & c:\Scripts\networks\Set_MacAddress.ps1 #{target.remoteId} "00:50:56:33:d7:1d"

       Replace the MAC address listed in the command line above with the one you want to use.

  7. Click Add and choose Perform Power Action. Configure as follows then click Next:

    • Step Name: Perform Power Action (1)
    • Step Execution: Always Execute
    • Action: Start
  8. Complete the wizard as appropriate and click Finish.


See Also