VMware Cloud Community
mrnick1234567
Enthusiast
Enthusiast

vmkernel listed as disabled

Hi,

I am in a situation where vmk1 on my esxi4.1 host is somehow disabled. The enabled column in esxcfg-vmknic -l says "false"...

# esxcfg-vmknic  -l                             
Interface  Port Group/DVPort   IP Family IP  Address Netmask           Broadcast    MAC  Address      MTU     TSO MSS    Enabled  Type

vmk0       289                        IPv4         10.65.xx.xx  255.255.224.0  10.65.xx.xx    xx:xx:xx:xx:xx:xx  1500    65535          true         STATIC

vmk1       511                         IPv4         10.65.xx.xx  255.255.224.0  10.65.xx.xx    xx:xx:xx:xx:xx:xx  1500    0                 false        STATIC

It's also gone from the vCentre GUI. I tried various forms of esxcfg-vmknic -e but i'm not clear on the syntax and get the message "invalid port group".

How do I enable it again?

Thanks

Nick

11 Replies
rickardnobel
Champion
Champion

Try this command:

esxcfg-vmknic -e 511

My VMware blog: www.rickardnobel.se
Reply
0 Kudos
mrnick1234567
Enthusiast
Enthusiast

Thanks Rickard, I've tried that and I get:

'Invalid portgroup: 511"

Any ideas?

Reply
0 Kudos
rickardnobel
Champion
Champion

Are you using ordinary vSwitches or Distributed vSwitches?

My VMware blog: www.rickardnobel.se
Reply
0 Kudos
mrnick1234567
Enthusiast
Enthusiast

Distributed vswitches.

Reply
0 Kudos
cnetbuild
Contributor
Contributor

When you do a esxcfg-vswitch -l  is that port ID listed?

Reply
0 Kudos
aka_MAC
Contributor
Contributor

Hi!

Have the same problem. No, it's not listed.

Reply
0 Kudos
MKguy
Virtuoso
Virtuoso

Can you try a delete operation or using the --dvs-name and --dvport-id parameter?

I.e. run esxcfg-vmknic -e vmk1 --dvs-name MyDVS --dvport-id 511

Maybe you need to specify the --portgroup parameter with the dvPortgroup name your vmk is connected to too/instead.

--dvport-id
    -v
          Setting DVPort ID of the connection point (valid for vSphere 4.0 and later). Requires --dvs-name parameter.
   --dvs-name
    -s
          Setting DVSwitch name of the connection point (valid for vSphere 4.0 and later). Requires --dvport-id parameter
--portgroup
    -p
          Setting portgroup as connection point
-- http://alpacapowered.wordpress.com
Reply
0 Kudos
aka_MAC
Contributor
Contributor

If using -s and -v options instead the portgroup it says:


Valid portgroup/DVPort parameters required.

Specified DVPort ID is not listed in esxcfg-vswitch -l

but is shown in esxcfg-vmknic -l

Reply
0 Kudos
MKguy
Virtuoso
Virtuoso

I tried to reproduce your issue and used esxcli instead of esxcfg-vmknic, but it shouldn't really make a difference. Anyways, it seems like disabling the vmknic on the host-side breaks the actual dvPort on the dvSwitch-side, creating a kind of hen/egg issue:

# esxcli network ip interface list

vmk2
   Name: vmk2
   MAC Address: 00:50:56:44:2e:2d
   Enabled: true
   Portset: DvsPortset-1
   Portgroup: N/A
   VDS Name: DVSwitch_1
   VDS UUID: eb 87 02 50 9c 24 6d 6d-c2 60 55 8c 58 ef f3 69
   VDS Port: 5757
   VDS Connection: 1498871745
   MTU: 1500
   TSO MSS: 65535
   Port ID: 67108872


# esxcli network ip interface set --enabled 0 --interface-name vmk2


# esxcli network ip interface list


vmk2
   Name: vmk2
   MAC Address: 00:50:56:44:2e:2d
   Enabled: false
   Portset: DvsPortset-1
   Portgroup: N/A
   VDS Name: DVSwitch_1
   VDS UUID: eb 87 02 50 9c 24 6d 6d-c2 60 55 8c 58 ef f3 69
   VDS Port: 5757
   VDS Connection: 1498871745
   MTU: 0
   TSO MSS: 0
   Port ID: 0

Re-enable does NOT work:

# esxcli network ip interface set --enabled 1 --interface-name vmk2
Sysinfo error on operation returned status : Not found. Please see the VMkernel log for detailed error information


vmkernel log contains:

2013-01-23T11:06:08.991Z cpu15:39357)WARNING: Tcpip_Vmk: 851: Could not open a port to 5757: Not found
2013-01-23T11:06:08.991Z cpu15:39357)WARNING: Tcpip_Vmk: 788: Unable to attach vmk2 to 5757 [error = 0xbad0003]
2013-01-23T11:06:56.652Z cpu0:37226)WARNING: Tcpip_Vmk: 851: Could not open a port to 5757: Not found
2013-01-23T11:06:56.652Z cpu0:37226)WARNING: Tcpip_Vmk: 788: Unable to attach vmk2 to 5757 [error = 0xbad0003]
2013-01-23T11:08:03.423Z cpu0:39374)WARNING: Tcpip_Vmk: 851: Could not open a port to 5757: Not found
2013-01-23T11:08:03.423Z cpu0:39374)WARNING: Tcpip_Vmk: 788: Unable to attach vmk2 to 5757 [error = 0xbad0003]

Note how disabling it set the Port ID to 0. Weird. Also, net-dvs | grep 5757 -A50 listed detailed info on the dvPort where my vmk2 was attached before, but now it doesn't.

I had to remove the stale vmkernel port and manually create a new one:

# esxcli network ip interface remove --interface-name vmk2
-- http://alpacapowered.wordpress.com
Reply
0 Kudos
aka_MAC
Contributor
Contributor

Thanks to reply. The problem is that I use ESXi 4.1 and there is no such namespace in ESXCLI to manipulate vmkernel interfaces. And esxcfg-vmknic doesn't allow operations on vmkernel providing it's name - only portID, which actually doesn't exist, so that leads to error.

Reply
0 Kudos
kashifkarar01
Enthusiast
Enthusiast

Hey guys,

We had the exact problem. Got it resolved.

Issue was we had VMK0 and VMK1 with dvSwitch port group configured.

Found the portgroup ID in my case it was 412

Then deleted the vmk0

Solved using the following steps:

1. Look for dvportgroup

esxcfg-vmknic -l

note downthe port number

2. Delete existing VMK0 nic

esxcfg-vmknic -d -s DVSwitch_name -p DVPort

3. Recreate the vmk* nic by using the command below with the DVPort number

esxcfg-vmknic -a -s DVSwitch_name -p DVPort -i IPAddress -n NetMask

No network down time for VMs Smiley Happy