Hi there,
I am currently deploying new VMK interfaces to multiple ESXi hosts to use them for backup/restore.
These VMKs only need to have an IPv6 address, no IPv4.
If I create them using new-vmhostnetworkadapter, the IPv4 address is set to 0.0.0.0, but I want it to be completely disabled.
In the web client, there is an option to "No IPv4 settings", which is what I want to do with PowerCLI, but no luck so far.
Does anyone know, how to set this option for a single VMK interface?
ESXi version is 6.5.
Thanks!
Ok, got it.
You (obviously) only see that option when you have IPv6 enabled.
Try like this
$vmkName = 'vmk1'
$esxcli = Get-EsxCli -VMHost $esxName -V2
$sIPv4 = @{
interfacename = $vmkName
type = 'none'
}
$esxcli.network.ip.interface.ipv4.set.Invoke($sIPv4)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Where do you see that option "No IPv4 settings"?
I only see the option 'DHCP' or 'Static' for IPv4
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
When you edit the settings of a vmk interface in the HTML5 Web Client, there is an option to set "No IPv4 settings".
Same option is available in the old flash Web Client.
Ok, got it.
You (obviously) only see that option when you have IPv6 enabled.
Try like this
$vmkName = 'vmk1'
$esxcli = Get-EsxCli -VMHost $esxName -V2
$sIPv4 = @{
interfacename = $vmkName
type = 'none'
}
$esxcli.network.ip.interface.ipv4.set.Invoke($sIPv4)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I knew you would solve this!
Thanks a lot LucD, I owe you
[root@esxi-01:~] esxcli network ip interface ipv4 get
Name IPv4 Address IPv4 Netmask IPv4 Broadcast Address Type Gateway DHCP DNS
---- ------------ ------------ -------------- ------------ ------- --------
vmk0 0.0.0.0 0.0.0.0 0.0.0.0 NONE 0.0.0.0 false
The only method I know of is to remove the vmk and recreate it.
Something like I did in Re: Powrcli to change vmkernel interface name - VMware Technology Network VMTN
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference