Setting vlan on VMWare provisioned VM


#1

When we provision a VM and set the vlan to be different than the one in the chosen template, the provision request fails to complete due to the fact that the original vlan in the template is not available in the target cluster whereas the vlan chosen by the user is.

We’re not using customization specifications and wondering if this is my problem. Are customization specs required to be able to set the vlan appropriately? If not, any ideas why the vlan is not being changed prior to an attempt to power on the VM?


Vm provisioning using vmware template doesn't give multiple NIC
#2

Just to respond to my own request, the issue is related to the need to also set vds settings. We removed this from the template and everything worked without having to modify customization specs.


#3

argh, should’ve said dvs.


#4

Hi, there are method available you can call in StateMachine to set the dvs like set_network_adatper documented here: https://access.redhat.com/documentation/en-US/CloudForms/3.1/html/Management_Engine_5.3_Methods_Available_for_Automation/sect-Request_Task_miq_request_task.html#sect-VM_Provision_Task_miq_provision

here is an example (prov is the provision tack)

prov.set_network_adapter(0, {:network => dvs_net1, :is_dvs => true} )