vim_host_network

Standard vSwitch + port group + VMkernel via SOAP HostNetworkSystem.

Three related surfaces all on host.configManager.networkSystem:

  • vSwitchesAddVirtualSwitch / UpdateVirtualSwitch / RemoveVirtualSwitch

  • Port groupsAddPortGroup / UpdatePortGroup / RemovePortGroup

  • VMkernel adaptersAddVirtualNic / UpdateVirtualNic / RemoveVirtualNic

VMkernel traffic types (nicType) include: management, vmotion, vsan, faultToleranceLogging, vSphereReplication, provisioning, vSphereProvisioning, vSphereBackupNFC. Multiple types can be set on a single vmkernel.

saltext.vcf.clients.vim_host_network.vswitch_list(opts, host, profile=None)[source]

List standard vSwitches on host.

saltext.vcf.clients.vim_host_network.vswitch_add(opts, host, name, *, num_ports=128, mtu=1500, pnic_devices=None, profile=None)[source]

Create a standard vSwitch. pnic_devices (e.g. ["vmnic0"]) attach physical uplinks; omit for an internal-only vSwitch.

saltext.vcf.clients.vim_host_network.vswitch_update(opts, host, name, *, num_ports=None, mtu=None, pnic_devices=None, profile=None)[source]

Update a vSwitch. Reads the existing spec, merges non-None fields, writes back.

saltext.vcf.clients.vim_host_network.vmkernel_add(opts, host, portgroup, *, dhcp=False, ip_address=None, subnet_mask=None, mtu=1500, mac_address=None, nic_types=None, profile=None)[source]

Add a VMkernel adapter on portgroup.

Returns the new vmkernel device name (e.g. vmk1).

saltext.vcf.clients.vim_host_network.vmkernel_migrate(opts, host, device, dst_portgroup, profile=None)[source]

Move VMkernel device from its current portgroup to dst_portgroup.

Preserves IP/MTU/MAC by reading the current spec, removing, and re-adding on the destination portgroup. The device name (e.g. vmk2) may change after the migration; the new name is returned.

saltext.vcf.clients.vim_host_network.ipv6_get(opts, host, profile=None)[source]

Return {enabled} for IPv6 on host’s network config.

saltext.vcf.clients.vim_host_network.ipv6_set(opts, host, enabled, profile=None)[source]

Enable or disable IPv6 on host. Reboot required to take effect.

saltext.vcf.clients.vim_host_network.vmkernel_set_traffic_types(opts, host, device, nic_types, profile=None)[source]

Replace the traffic-type bitmap on a VMkernel adapter.

nic_types is a list of strings — management, vmotion, vsan, faultToleranceLogging, vSphereReplication, provisioning, vSphereProvisioning, vSphereBackupNFC.

saltext.vcf.clients.vim_host_network.physical_nic_list(opts, host, profile=None)[source]

List physical NICs (pnics) on host — driver, link state, etc.