community.vmware.vmware_host_sriov – Manage SR-IOV settings on host¶
Note
This plugin is part of the community.vmware collection (version 1.7.0).
To install it use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_host_sriov
.
New in version 1.0.0: of community.vmware
Synopsis¶
This module can be used to configure, enable or disable SR-IOV functions on ESXi host.
Module does not reboot the host after changes, but puts it in output “rebootRequired” state.
User can specify an ESXi hostname or Cluster name. In case of cluster name, all ESXi hosts are updated.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.7
PyVmomi
Parameters¶
Examples¶
- name: enable SR-IOV on vmnic0 with 8 functions
community.vmware.vmware_host_sriov:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi1 }}"
vmnic: vmnic0
sriov_on: true
num_virt_func: 8
- name: enable SR-IOV on already enabled interface vmnic0
community.vmware.vmware_host_sriov:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi1 }}"
vmnic: vmnic0
sriov_on: true
num_virt_func: 8
- name: enable SR-IOV on vmnic0 with big number of functions
community.vmware.vmware_host_sriov:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi1 }}"
vmnic: vmnic0
sriov_on: true
num_virt_func: 100
ignore_errors: true
- name: disable SR-IOV on vmnic0
community.vmware.vmware_host_sriov:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
esxi_hostname: "{{ esxi1 }}"
vmnic: vmnic0
sriov_on: false
num_virt_func: 0
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Viktor Tsymbalyuk (@victron)