11 Replies Latest reply on Sep 14, 2020 10:55 PM by scott28tt

    network portgroup problem

    illethrias Lurker

      Hi I have recently created small virtual network, with 4 VM, several vSwitches and portgroups on ESXi 6.0, for a few days everything works just fine, suddenly I've got this message: This VM is attached to a network portgroup port_group2 that doesn't exist. Edit this VM and attach it to a different network.


      in networking I can see this port group, when I run  esxcfg-vswitch --check-pg=port_group2

      I get 1.

      I haven't change any settings.


      Does anybody encounter similar problem?

      Does anybody have any idea where can be problem?


      Thanks in advance for any tips.

        • 1. Re: network portgroup problem
          gerardlt Lurker

          Probably a bit late to help you, but I ran into the same problem after adding a VMKernel NIC to the portgroup in question.


          Despite the message, the VM that was apparently 'broken' was still able to use the network interface through that portgroup. I shut the VM down to increase its RAM, but noticed the web interface didn't report the increased size either. After I removed the VMKernel NIC from the group, the correct RAM size was reported, although as far as the GUI was concerned I needed to re-associate the portgroup with the Virtual NIC.


          This type of bug doesn't seem very unusual from the javascript GUI - it's not the first time I've seen the properties of a VM get mangled and it almost always crashes and has to be reloaded when I power-on a VM.


          For infrastructure that I'm relying on, this kind of thing makes me very nervous.

          • 2. Re: network portgroup problem
            eoncable Lurker

            I had the same issue.. .added a vmKernel .. and a port group that is visible is listed as non-existent.


            Anyone have a clue what is going on?

            • 3. Re: network portgroup problem
              mkolus Novice



              Fresh instalation of ESXi 6.5 u1 inside VMware Workstation Pro 12.5.7 build-5813279. I've created several switches attached to vnics for a lab. I've deleted the default "VM Network" portgroup and created another named "WAN". The vmkernel port is shown under the WAN portgroup and works without problem.


              Then, i tried to assign WAN as a portgroup for a vnic on a VM, and it wasn't available. I tried to assign it using PowerCLI with the same results:


              C:\> Set-NetworkAdapter -NetworkAdapter $NA -NetworkName $PG

              Set-NetworkAdapter : 25-Sep-17 18:17:29 Set-NetworkAdapter The network "WAN" doesn't exist on the host.

              At line:1 char:1

              + Set-NetworkAdapter -NetworkAdapter $NA -NetworkName $PG

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

                  + CategoryInfo          : ResourceUnavailable: (WAN:String) [Set-NetworkAdapter], ViError

                  + FullyQualifiedErrorId : Client20_VmHostServiceImpl_TryGetHostNetworkByName_NonexistentNetwork,VMware.VimAutomation.ViCore.Cmdl




              C:\> $PG = Get-VirtualPortGroup -Name WAN

              C:\> $PG | fl

              Name              : WAN

              VirtualSwitchId   : key-vim.host.VirtualSwitch-vSwitch0

              VirtualSwitchUid  : /VIServer=root@

              VirtualSwitch     : vSwitch0

              Key               : key-vim.host.PortGroup-WAN

              Port              : {host}

              VLanId            : 0

              VirtualSwitchName : vSwitch0

              VMHostId          : HostSystem-ha-host

              VMHostUid         : /VIServer=root@

              Uid               : /VIServer=root@


              ExtensionData     : VMware.Vim.HostPortGroup

              Client            : VMware.VimAutomation.ViCore.Impl.V1.VimClient


              C:\> Get-VirtualSwitch -Name vSwitch0 | fl

              Id                : key-vim.host.VirtualSwitch-vSwitch0

              Key               : key-vim.host.VirtualSwitch-vSwitch0

              Name              : vSwitch0

              NumPorts          : 1536

              NumPortsAvailable : 1516

              Nic               : {vmnic0}

              Mtu               : 1500

              VMHostId          : HostSystem-ha-host

              VMHost            :

              VMHostUid         : /VIServer=root@

              Uid               : /VIServer=root@

              ExtensionData     : VMware.Vim.HostVirtualSwitch

              Client            : VMware.VimAutomation.ViCore.Impl.V1.VimClient


              [root@lab:~] esxcfg-vswitch --check vSwitch0


              [root@lab:~] esxcfg-vswitch  --check-pg=WAN



              Then i created the porgroup via PowerCLI -instead of the GUI-, and it worked.


              I dont know what's going on.

              • 4. Re: network portgroup problem
                CHoswoot Lurker

                I know this is an old log but there are people who want to know how to fix this.


                The fix is to delete all old snapshots of all your VMs or Templates and make sure all VMs are on your new portgroups.

                Same problem on ESXi 6.5, vSphere 6.5

                • 5. Re: network portgroup problem
                  vance4c Lurker

                  I was having the same problem. As soon as I added the vmkernel nic to the port group I lost the connection to the VM. The solution I finally found was have multiple port groups for the same vswitch. One portgroup for the vmkernel and another portgroup for the VM clients all on the same vswitch.


                  1 person found this helpful
                  • 6. Re: network portgroup problem
                    jhunter Lurker

                    vance4c Bravo! Thanks for providing your workaround.

                    • 7. Re: network portgroup problem
                      gangelo1 Novice

                      I'm using v. 7.  and none of this works. I can't imagine anyone using this in a production environment. Scary as hell.

                      • 8. Re: network portgroup problem
                        scott28tt Guru
                        Community WarriorsVMware EmployeesUser Moderators

                        A port group can EITHER be used by the VMkernel OR VMs, but not both.


                        vSwitches support multiple port groups.


                        So if you want VMs AND the VMkernel to share a physical NIC, add multiple port groups to the vSwitch which uses the NIC.


                        This is basic vSphere networking.

                        • 9. Re: network portgroup problem
                          Trinergy Novice

                          Just add a2nd NIC to each VM, make sure it is connected to the correct network/portgrp, save, then delete that 2nd NIC, the original NIC will "automagically" attach to the correct net.

                          1 person found this helpful
                          • 10. Re: network portgroup problem
                            Hall_M_IT Lurker

                            "Just add a2nd NIC to each VM, make sure it is connected to the correct network/portgrp, save, then delete that 2nd NIC, the original NIC will "automagically" attach to the correct net."
                            This work around solve the problem for me (ESXi 6.7)


                            But it is a joke such a work around is required
                            when you power on the vm migrated from a diffrent server you get a popup "port group xxx" does not exist you get a popup to fix the problem and it does not save the change
                            only when you do the bove work around will it work.

                            • 11. Re: network portgroup problem
                              scott28tt Guru
                              Community WarriorsUser ModeratorsVMware Employees

                              When using ”standard” vSwitches and migrating VMs between hosts (either hot or cold migrations), there must be a port group on the destination host named the same as the port group that the VM was using on the source host.


                              That is another example of basic vSphere networking and administration.