vmware_vmkernel - Create a VMware VMkernel Interface

New in version 2.0.

Synopsis

  • Create a VMware VMkernel Interface

Requirements (on host that executes module)

  • python >= 2.6
  • PyVmomi

Options

parameter required default choices comments
enable_ft
no
Enable the VMK interface for Fault Tolerance traffic
enable_mgmt
no
Enable the VMK interface for Management traffic
enable_vmotion
no
Enable the VMK interface for vMotion traffic
enable_vsan
no
Enable the VMK interface for VSAN traffic
hostname
yes
The hostname or IP address of the vSphere vCenter.
ip_address
yes
The IP Address for the VMK interface
mtu
no
The MTU for the VMK interface
password
yes
The password of the vSphere vCenter.
aliases: pass, pwd
portgroup_name
yes
The name of the portgroup for the VMK interface
subnet_mask
yes
The Subnet Mask for the VMK interface
username
yes
The username of the vSphere vCenter.
aliases: user, admin
validate_certs
no True
  • True
  • False
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
vland_id
yes
The VLAN ID for the VMK interface
vswitch_name
yes
The name of the vswitch where to add the VMK interface

Examples

# Example command from Ansible Playbook

-  name: Add Management vmkernel port (vmk1)
   local_action:
      module: vmware_vmkernel
      hostname: esxi_hostname
      username: esxi_username
      password: esxi_password
      vswitch_name: vswitch_name
      portgroup_name: portgroup_name
      vlan_id: vlan_id
      ip_address: ip_address
      subnet_mask: subnet_mask
      enable_mgmt: True

Notes

Note

  • Tested on vSphere 5.5

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/vmware_vmkernel_module.html