Automatic set VLAN (SOLVED)

I trying to provisioning a virtual machin with the minimal interaction from the user, but at this time I can’t do to the mangeIQ set automatically a VLAN.

That’s possible?

MangeIQ master.20140805122641_6faf9a3
VMware vCenter 5.5
12x VLANs

The miq_provision object in automate supports both set_vlan and set_dvs methods. You need to pass the name of the device you want to use.

1 Like

I’m find for miq_provision, but I can’t found it.

You know where are?

I tried to find this information on google and the documentation, but no successful.

You can find it in the docs at:
The doc is and the info starts around page 48.

1 Like

I understand the set_vlan, but set_dvs i can’t find more information about that!

In this document, I found for set_vlan, but nothing for set_dvs!
I’m find more information at the documents about that.

Tks bascar and gmccullough, you are very helpful!

I am not sure I understood you last post. The document does have set_dvs. I will include it here:

set_dvs(portgroup, switch = portgroup) #Set the name of the Distributed Virtual Switch
An options name can also
be passed.
Example: miq_provision.set_dvs(‘default’)

Some examples I found:

1 Like

I solved this using another way.

I just edited my workflow, changed “:display: :edit” to “:display: :hide”, and added “:default: <vlan_name>”

This way, on the dialog processes was not show the box to select vlan, because the vlan was set on the workflow.

If anyone wants to set this as an option in the dialog then you will want to specify 2 options


For me I had a vlan called dev_unix_129 when we introduced DVS we kept the portgroup name the same and this sat in a dvs called dev_server as you cant have the same portgroup name in multiple dvs the dvs name is actually not needed when passing the variables however I did notice during the workflow that my vlan changed when using dvs and the following was needed to automate it


Now going forward I just use the above in my environmental flow dialog method so when I select Development it will populate the 2 options above etc etc Hope this helps.