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.
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.
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?
FWIW,
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
ets.Commands.VirtualDevice.SetNetworkAdapter
C:\> $PG = Get-VirtualPortGroup -Name WAN
C:\> $PG | fl
Name : WAN
VirtualSwitchId : key-vim.host.VirtualSwitch-vSwitch0
VirtualSwitchUid : /VIServer=root@192.168.133.141:443/VMHost=HostSystem-ha-host/VirtualSwitch=key-vim.host.VirtualSwitch-vSwitch0/
VirtualSwitch : vSwitch0
Key : key-vim.host.PortGroup-WAN
Port : {host}
VLanId : 0
VirtualSwitchName : vSwitch0
VMHostId : HostSystem-ha-host
VMHostUid : /VIServer=root@192.168.133.141:443/VMHost=HostSystem-ha-host/
Uid : /VIServer=root@192.168.133.141:443/VMHost=HostSystem-ha-host/VirtualSwitch=key-vim.host.VirtualSwitch-vSwitch0/Vi
rtualPortGroup=key-vim.host.PortGroup-WAN/
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 : 192.168.133.141
VMHostUid : /VIServer=root@192.168.133.141:443/VMHost=HostSystem-ha-host/
Uid : /VIServer=root@192.168.133.141:443/VMHost=HostSystem-ha-host/VirtualSwitch=key-vim.host.VirtualSwitch-vSwitch0/
ExtensionData : VMware.Vim.HostVirtualSwitch
Client : VMware.VimAutomation.ViCore.Impl.V1.VimClient
[root@lab:~] esxcfg-vswitch --check vSwitch0
1
[root@lab:~] esxcfg-vswitch --check-pg=WAN
1
Then i created the porgroup via PowerCLI -instead of the GUI-, and it worked.
I dont know what's going on.
I know this is an old log but there are people who want to know how to fix this.
https://communities.vmware.com/thread/402867
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
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.
vance4c Bravo! Thanks for providing your workaround.
I'm using v. 7. and none of this works. I can't imagine anyone using this in a production environment. Scary as hell.
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.
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.
"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.
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.
Just want to say thanks for posting this - this was about the only helpful post here.
You can resolv fast.
You only need to add a new network adapter and make save of this.
After that you can modify the old network adapter and reconect them and save (and eliminate the temporal network adapter).