Hi there,
I’m currently trying to provision a vmware vm programmtically as described in the Automation book. Link
I created my args and executed the command as described but I always get the following error:
RuntimeError: Provision failed for the following reasons:
‘Network/Virtual Network’ is required
I don’t know what to do about this error. My args list looks like this, specifics are redacted but I think that a certain parameter value is missing.
arg1 = version
args = [‘1.1’]
arg2 = templateFields
args << {‘name’ => ‘template-name’,
‘request_type’ => ‘template’}arg3 = vmFields
args << {‘vm_name’ => ‘vm_name’,
‘number_of_vms’ => ‘1’,
‘placement_cluster_name’ => ‘cluster-name’,
‘vlan’ => “vlan-name”,
‘network’ => “dvs-name”,
‘is_dvs’ => ‘true’,
‘portgroupName’ => ‘pg-name’,
‘vm_memory’ => ‘1024’,
‘sysprep_computer_name’ => ‘vm-name’,
‘ip_addr’ => ‘ip-addr’,
‘provision_type’ => ‘vmware’,
‘network_adapters’ => ‘1’}arg4 = requester
args << {‘owner_email’ => ‘email@company.com’,
‘owner_first_name’ => ‘first’,
‘owner_last_name’ => ‘last’}arg5 = tags
args << nil
arg6 = additionalValues (ws_values)
args << {‘network’ => ‘dvs-name’ }
arg7 = emsCustomAttributes
args << nil
arg8 = miqCustomAttributes
args << nil
Any help is appreciated.