Hello,
I am trying to create VMkernels with TCP/IP stack 'vmotion' but I do not see anywhere it is feasible.
Does anybody know?
Thanks
Fred
Where are you trying to do this? It is most certainly feasible in the vSphere Web Client as well as the ESXi embedded host client for 6.5.
I am trying to do this from PowerCLI, my env. is vSphere 6.0
You need to сonnect to the host via SSH.
How to Configure Multiple TCP/IP Stacks in vSphere 6 -- Virtualization Review
You can do this with PowerCLI, but only for VSS, not VDS.
See Re: Create VMK with vmotion TCP Stack
And you don't need to use SSH for this (would look silly in a PowerCLI community me thinks)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
oh yeah, did not notice that the issue was published in VMware PowerCLI
thank you guys
thank you LucD
sorry for the delay
So I gather that script worked for you?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD,
Thanks a lot for helping, much appreciated
That script only works with VSS and I need a solution that works with VDS. My goal is to automate the creation of VMkernel mapped to VMotion TCP/IP stack (because I need a specific gateway) like this :
Do you see a way to do it?
Regards,
FRed
Took me some trial and error, but the following seems to work (for me in vSphere 6.5).
$esxName = 'MyEsx'
$switchName = 'MyVDS'
$portgroupName = 'MyVDSPortgroup'
$ipAddr = '192.168.1.1'
$ipMask = '255.255.255.0'
$esx = Get-VMHost -Name $esxName
$vds = Get-VirtualSwitch -Name $switchName -VMHost $esx -Distributed
$pg = Get-VirtualPortGroup -Name $portgroupName -VirtualSwitch $vds
$netSys = Get-View -Id $esx.ExtensionData.ConfigManager.NetworkSystem
$nic = New-Object VMware.Vim.HostVirtualNicSpec
$port = New-Object VMware.Vim.DistributedVirtualSwitchPortConnection
$port.SwitchUuid = $vds.Key
$port.PortgroupKey = $pg.Key
$nic.DistributedVirtualPort = $port
$ip = New-Object VMware.Vim.HostIpConfig
$ip.IpAddress = $ipAddr
$ip.SubnetMask = $ipMask
$nic.Ip = $ip
$nic.NetStackInstanceKey = [VMware.Vim.HostNetStackInstanceSystemStackKey]::vmotion
$netSys.AddVirtualNic('',$nic)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD you rock!
That script works like a charm!
Thanks a million
Fred