def create_vm_parameters(nic_id, is_nic_primary, location, vm_info, params):
    """Create the VM parameters structure.
    """
    vm_params = params['vmParams']
    vm_params['location'] = location
    vm_params['network_profile']['network_interfaces'][0]['id'] = nic_id
    vm_params['network_profile']['network_interfaces'][0]['primary'] = is_nic_primary
    return vm_params