[Solved] Can not set ip address to vm in VM Provisioning Automation

ip_addr, netmask, gateway are not set in VM provisioning. I get these values from a Service or Provision Dialog and process, but the VM is not configured. No IP Address is set. No errors appears in Automation Log. Do you know why this is happening?

What’s your provider type, and what’s the operating system of the VM that you’re hoping to configure? Are you using a VMware customization specification, or cloud-init script for example?


VMWare, VM OS is Centos(vmware tools installed). I test:

  • Default Provision Dialog (there is no way to enable VMWare customization specification.
  • Set :sysprep_custom_spec => true, in automation.
    In both cases the result is the same: ip_addr is not set.


How are you trying to set the ip_addr? I assume you are trying to set it such that it gets injected with the cloudinit?

Blue skies,

If I recall correctly, you need to set the custom spec that you are trying to use. If you check the ManageIQ Domain and look at /Infrastructure/VM/Provisioning/StateMachines/Methods/vmware_CustomizeRequest you can see the method set_customspec. set_customspec is looking for the variable sysprep_custom_spec.

Make sure perl package is also installed on your template. It is a requirement for VMware Tools.

I get it, but there is no documentation about sysprep_custom_spec. Can you give me an example or reference?

In this example, I check to see which platform the template is using and then choose the corresponding custom spec and then set it on the task object.

if @template.platform == "linux"
  customization_spec = "Linux-Spec-Name"
elsif @template.platform == "windows"
  customization_spec = "Windows-Spec-Name"
@task.set_customization_spec(customization_spec, true)

“Linux-Spec-Name” and “Windows-Spec-Name”, where i can find the values i can pass as argument? Thanks for your help.

The customisation specs need to have been created in the vSphere console, then CloudForms will see them.

Thanks everyone. I made it. You both had the answer @pemcg @jnovotni.