VMware Cloud Community
vPauleAKQ
Enthusiast
Enthusiast

new-networkadapter on ESXi 6.5 Build 15256549 creates vmxnet instead of vmxnet3

I am distributing my templates by a powershell script, converting the initial template, moving it to all the other vCenter servers, than adding a vmnic to it and converting it back to a template in the end.

One of the vCenters has a cluster with some older hardware, where we have to use ESXi 6.5 instead of 6.7.

When I clone the template VM to that cluster and add the network adapter with the following command, it adds a vmxnet adapter instead of a vmxnet3 one.

As soon as I migrate that VM to another cluster with ESXi 6.7 and add the adapter, it works as expected and adds a vmxnet3 one.

New-NetworkAdapter -NetworkName $target.portgroup -VM $targetvm_name -Type Vmxnet3 -StartConnected

working ESXi host: VMware ESXi, 6.7.0, 15160138

not working ESXi host: VMware ESXi, 6.5.0, 15256549

Any ideas?

I helped myself by using the other cluster, but as that's a stretched cluster with mirrored storage, I would like to use the older one with the cheaper storage.

PowerCLI Version

----------------

   VMware PowerCLI 11.5.0 build 14912921

---------------

Component Versions

---------------

   VMware Common PowerCLI Component 11.5 build 14898112

   VMware Cis Core PowerCLI Component PowerCLI Component 11.5 build 14898113

   VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 11.5 build 14899560

   VMware VimAutomation Vds Commands PowerCLI Component PowerCLI Component 11.2 build 12483615

   VMware VimAutomation Cloud PowerCLI Component PowerCLI Component 11.0 build 10379994

Powershell Version

Name                           Value

----                           -----

PSVersion                      5.1.17134.858

PSEdition                      Desktop

PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}

BuildVersion                   10.0.17134.858

CLRVersion                     4.0.30319.42000

WSManStackVersion              3.0

PSRemotingProtocolVersion      2.3

SerializationVersion           1.1.0.1

Tags (3)
0 Kudos
5 Replies
LucD
Leadership
Leadership

Out of curiosity, in the 6.5 environment, does the Set-NetworkAdapter cmdlet allow you to change the type to vmxnet3 afterwards?

Also, what is the configured OS for the template/VM?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
vPauleAKQ
Enthusiast
Enthusiast

I tried this in the 6.5 environment, no success

get-vm vmxnettest | Get-NetworkAdapter |Set-NetworkAdapter -type vmxnet3

Set-NetworkAdapter : 3/27/2020 8:33:41 AM       Set-NetworkAdapter              "Nullable object must have a value"

In Line:1 Character:41

+ ... -vm vmxnettest | Get-NetworkAdapter |Set-NetworkAdapter -type vmxnet3

+                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Set-NetworkAdapter], VimException

    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.VirtualDevice.SetNetworkAdapter

VM info:

  • Guest OS:Microsoft Windows Server 2016 or later (64-bit)
  • Compatibility:ESXi 6.5 and later (VM version 13)
0 Kudos
LucD
Leadership
Leadership

What does the Get-NetworkAdaper place on the pipeline?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
vPauleAKQ
Enthusiast
Enthusiast

get-vm vmxnettest | Get-NetworkAdapter

Name                 Type       NetworkName  MacAddress         WakeOnLan

                                                                  Enabled

----                 ----       -----------  ----------         ---------

Network adapter 1    Vmxnet    anonymousNet... 00:50:56:88:xx:xx      False

Network adapter 2    Vmxnet    anonymousNet... 00:50:56:88:yy:yy      False

0 Kudos
LucD
Leadership
Leadership

I did some further testing, yes I did install 6.5, but I'm afraid I can't replicate what you are seeing.

Just to make sure I understood your complete process (and some questions).

- On 6.7 you convert the template to a VM

- That VM has 1 or more vmxnet3 vNICs?

- Which HW version does that VM have?

- Do you at this point remove all the vNICs?

- You clone the VM to a 6.5 cluster

- When you try to add a vNIC of type vmxnet3 it becomes a vmxnet vNIC


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos