Hi All,
(ESXi 6.0. standlone)
I have a Windows Server 2012 VM that Im trying to setup via script.
This VM has 4 Network Adapters: VM Network, Something0, Something1, Application.
The OVA is deployed and then the VM is sysprepped before initial login.
Once logged in, I look at the network adapters in Windows and see 4 adapters, each with a name "Ethernet #". The placement of the Virtual NIC -> Windows NIC seems to be different each time, presumably because of sysprep.
Via script, Im can rename and enable the VMware Virtual Adapters to their specific portgroup and StartConnected,
but Im not sure how to map the corresponding VMware Adapters that I rename with the default "Ethernet #" Windows adapters
Any help would be greatly appreciated
Thank you
Can you show me the full output of this problematic vNIC.
# In the guest OS
Get-NetAdapterHardwareInfo -Name MyProblemAdapter | Select *
# Against the vCenter
Get-VM -Name MyVM | Get-NetAdapter -Name MyProblemvNic | Select *
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
VM Host:
PowerCLI C:\> Get-VM -Name RB-REC-02 | Get-NetworkAdapter -NAme "Network adapter
4" | Select *
MacAddress : 00:0c:29:1b:c5:c8
WakeOnLanEnabled : True
NetworkName : Camera Network
Type : Vmxnet3
ParentId : VirtualMachine-4
Parent : RB-REC-02
Uid : /VIServer=root@192.168.0.110:443/VirtualMachine=VirtualMachi
ne-4/NetworkAdapter=4003/
ConnectionState : Connected, GuestControl, StartConnected
ExtensionData : VMware.Vim.VirtualVmxnet3
Id : VirtualMachine-4/4003
Name : Network adapter 4
Client : VMware.VimAutomation.ViCore.Impl.V1.VimClient
=============================================================
Windows VM:
PS C:\Users\Administrator> Get-NetAdapterHardwareInfo -Name "Ethernet" | Select *
ifAlias : Ethernet
InterfaceAlias : Ethernet
ifDesc : vmxnet3 Ethernet Adapter
Segment : 0
Bus : 4
Device : 0
Function : 0
Slot : 161
PcieLinkWidth : 32
SriovSupport : NoIoMmuSupport
PcieLinkSpeed : 5.0 GT/s
PcieMaxLinkSpeed : 5.0 GT/s
Version : 1.0
DeviceType : PCI Express endpoint
CurrentSpeedAndMode : NA
Caption : MSFT_NetAdapterHardwareInfoSettingData 'vmxnet3 Ethernet Adapter'
Description : vmxnet3 Ethernet Adapter
ElementName : vmxnet3 Ethernet Adapter
InstanceID : {17868FD0-25C5-4F19-A571-694DF64C46F5}
InterfaceDescription : vmxnet3 Ethernet Adapter
Name : Ethernet
Source : 2
SystemName : WIN-H91NBU1AN5T
BusNumber : 4
DeviceNumber : 0
Dma64BitSupported : True
FunctionNumber : 0
LineBasedInterrupts : False
LineBasedInterruptSupported : True
LocationInformationString : PCI bus 4, device 0, function 0
MaxInterruptMessages : 25
MsiEnabled : True
MsiInterruptSupported : True
MsiSupported : True
MsiXEnabled : True
MsiXInterruptSupported : True
MsixMessageAffinityArray : {MSFT_NetAdapter_Group_Affinity, MSFT_NetAdapter_Group_Affinity,
MSFT_NetAdapter_Group_Affinity, MSFT_NetAdapter_Group_Affinity...}
MsiXSupported : True
NoInterrupt : False
NumaNode :
NumMsiMessages : 10
NumMsixTableEntries : 25
PciCurrentSpeedAndMode :
PciDeviceLabelID :
PciDeviceLabelString :
PciDeviceType : 2
PciExpressCurrentLinkSpeedEncoded : 2
PciExpressCurrentLinkWidth : 32
PciExpressCurrentPayloadSize : 128
PciExpressMaxLinkSpeedEncoded : 2
PciExpressMaxLinkWidth : 32
PciExpressMaxPayloadSize : 128
PciExpressMaxReadRequestSize : 128
PciExpressVersion : 1
PciXCurrentSpeedAndMode :
S0WakeupSupported : True
SegmentNumber : 0
SlotNumber : 161
PSComputerName :
CimClass : ROOT/StandardCimv2:MSFT_NetAdapterHardwareInfoSettingData
CimInstanceProperties : {Caption, Description, ElementName, InstanceID...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
When I run your first script on this VM I see the following: (where are those empty fields?)
VM : RB-REC-02
Portgroup : Camera Network
vMAC : 00:0c:29:1b:c5:c8
osMAC :
vNIC : Network adapter 4
osNIC :
vSlot : 1184
osSlot :
Those missing osxxx properties indicate that the PCI slot was not matched.
What slot does the vNIC show?
Get-VM -Name RB-REC-02 | Get-NetworkAdapter -NAme "Network adapter4" |
Select @{N='PCI Slot';E={$_.ExtensionData.SlotInfo.PciSlotNumber}}
Update: Forget that, just noticed the slot (1184) is already there.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Its seems to be way out of range of the other adapters.
PCI Slot
--------
1184
Edit: And in Windows its 161. Mismatched IDs. Would a removal of that Network adapter, insert a new one and run that again work?
You could try that.
But I would need to find out why the mismatch is there.
Are the MAC addresses on both sides at least the same?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yeah, the MAC in VMware and in Wndows is identical
Let me try to remove and readd the offending NEtwork Adapter
*Update*: I removed the Network Adapter 4 and readded.
Im seeing in VMware now that the Slot number is different.
In Windows, the slot number is the same as it previously was, still differs from the VM number. So its still mismatched.
The MAC is the same as it was before as well.
So, does this point to an issue in the VM? Shouldnt a renewed Adapter give different information as
Not sure what is happening here, I'll have to do some testing.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I ran an additional test:
I provisioned a new VM, with Network adapters not assigned.
Removed NEtwork Adapter 4
Sysprepped the system
I brought the system back up fresh, added Network Adapter 4, and ran the scripts.
Same issue.
Could it be something to do with the fact that its a secondary card?
What do you mean by secondary card?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
All of the other ports are on an onboard NIC.
There is a secondary NIC, where the information that we are not seeing, is plugged into that port.
Not sure that it makes a difference. I can manually do this and it works. Its just via the script, its showing mismatched information and subsequently not configuring that last one.
Hi Luc,
Ive been looking at different ways to add/remove the 4th network adapter and still hitting the same issue.
Did you have a chance to test this out?
Why would the information output for VMware adapters but not translate to the Windows adapters?
Thank you again for all of your help (both future and previously)
Yes, I have been testing.
I already see the issue with a 3th vNIC, visible in PowerCLI, but not in the Windows OS.
Must be a limitation somewhere, or I'm overseeing something.
Looking for articles that discuss having more than 2 adapters in a Windows OS.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Cool man, thank you for the quick heads up. Ill continue investigating as well
bump this up.
Any word on if this is possible still with all of the different NICs?
Thank you
bump this up for more info