10 Replies Latest reply on Dec 9, 2012 11:34 PM by RAJ_RAJ

    How to Disable or enable vmnic in esx4.1

    RAJ_RAJ Expert
    vExpert

      I have tried the below command for diabling the vmnic1 after running the command vmnic1 is not avisible , how can i get it back .

       

      vmkchdev -p 000:001:00.1

       

      vmkchdev -l |grep vmnic1

       

      000:001:00.1 14e4:1639 1028:02d4 passthru vmnic1

       

      vmnic0  0000:01:00.00 bnx2        Up   100Mbps   Full   f0:4d:a2:3b:a3:05 1500   Broadcom Corporation Broadcom NetXtreme II BCM5709 1000Base-T
      vmnic2  0000:02:00.00 bnx2        Down 0Mbps     Half   f0:4d:a2:3b:a3:09 1500   Broadcom Corporation Broadcom NetXtreme II BCM5709 1000Base-T
      vmnic3  0000:02:00.01 bnx2        Down 0Mbps     Half   f0:4d:a2:3b:a3:0b 1500   Broadcom Corporation Broadcom NetXtreme II BCM5709 1000Base-T

       

       

      i tired vmkchdev -v 000:001:00.1  and vmkchdev -c 000:001:00.1

       

      but showing this error   :- vmkchdev failed with 0xbad0004

       

       

      Please help

       

      Thanks

      RAJESH RADHAKRISHNAN
      VCA -DCV/WM/Cloud,VCP 5 - DCV/DT/CLOUD, ,VCP6-DCV, EMCISA,EMCSA,MCTS,MCPS,BCFA
      https://ae.linkedin.com/in/rajesh-radhakrishnan-76269335
      Mark my post as "helpful" or "correct" if I've helped resolve or answered your query!
        • 1. Re: How to Disable or enable vmnic in esx4.1
          RAJ_RAJ Expert
          vExpert

          Any ideas .........

          RAJESH RADHAKRISHNAN
          VCA -DCV/WM/Cloud,VCP 5 - DCV/DT/CLOUD, ,VCP6-DCV, EMCISA,EMCSA,MCTS,MCPS,BCFA
          https://ae.linkedin.com/in/rajesh-radhakrishnan-76269335
          Mark my post as "helpful" or "correct" if I've helped resolve or answered your query!
          • 2. Re: How to Disable or enable vmnic in esx4.1
            spravtek Expert

            Did you try

            i tired vmkchdev -v 000:001:00.1

             

            or rather vmkchdev -v 000:001:00.01 ?

             

            Besides that ... I can't check on a test system at the moment ... so ...

            • 3. Re: How to Disable or enable vmnic in esx4.1
              RAJ_RAJ Expert
              vExpert

              Both ahving same out put

               

              vmkchdev failed with 0xbad0004

              RAJESH RADHAKRISHNAN
              VCA -DCV/WM/Cloud,VCP 5 - DCV/DT/CLOUD, ,VCP6-DCV, EMCISA,EMCSA,MCTS,MCPS,BCFA
              https://ae.linkedin.com/in/rajesh-radhakrishnan-76269335
              Mark my post as "helpful" or "correct" if I've helped resolve or answered your query!
              • 4. Re: How to Disable or enable vmnic in esx4.1
                spravtek Expert

                After the vmkchdev -v  did you do a vim-cmd hostsvc/net/refresh  ?

                • 5. Re: How to Disable or enable vmnic in esx4.1
                  RAJ_RAJ Expert
                  vExpert

                  yes ,

                   

                  but vmnic1 is not showing .

                  RAJESH RADHAKRISHNAN
                  VCA -DCV/WM/Cloud,VCP 5 - DCV/DT/CLOUD, ,VCP6-DCV, EMCISA,EMCSA,MCTS,MCPS,BCFA
                  https://ae.linkedin.com/in/rajesh-radhakrishnan-76269335
                  Mark my post as "helpful" or "correct" if I've helped resolve or answered your query!
                  • 6. Re: How to Disable or enable vmnic in esx4.1
                    spravtek Expert

                    I think a reboot is needed to get the functionality back ... Unless you configured it to be persistent?

                    • 7. Re: How to Disable or enable vmnic in esx4.1
                      LuigiC Enthusiast

                      I'm not sure if this applies to 4.1 but ..on 5.0 we can run :

                       

                      # esxcfg-vswitch -l
                      Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks
                      vSwitch0         128         4           128               1500    vmnic0

                        PortGroup Name        VLAN ID  Used Ports  Uplinks
                        VM Network            0        1           vmnic0
                        Management Network    0        1           vmnic0

                      Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks
                      vSwitch1         128         6           128               1500    vmnic2,vmnic3

                        PortGroup Name        VLAN ID  Used Ports  Uplinks
                        VSANET/vMotion        0        1           vmnic2,vmnic3
                        VMkernel for iSCSI/vMotion II  0        1           vmnic3
                        VMkernel for iSCSI/vMotion I  0        1           vmnic2

                       

                      and

                       

                      # esxcfg-vmknic -l
                      Interface  Port Group/DVPort   IP Family IP Address                              Netmask         Broadcast       MAC Address       MTU     TSO MSS   Enabled Type
                      vmk0       Management Network  IPv4      16.87.157.68                            255.255.252.0   16.87.159.255   00:17:a4:77:0c:1c 1500    65535     true    STATIC
                      vmk1       VMkernel for iSCSI/vMotion IIPv4      0.0.0.0                                 0.0.0.0         0.0.0.0         00:50:56:73:5b:81 1500    65535     true    DHCP
                      vmk2       VMkernel for iSCSI/vMotion IIIPv4      169.254.0.1                             255.255.0.0     169.254.255.255 00:50:56:77:f9:e9 1500    65535     true    DHCP

                       

                      and you can disable a vmk ...

                       

                      #  esxcfg-vmknic -h
                      esxcfg-vmknic <options>
                      -a|--add                      Add a VMkernel NIC to the system,
                                                    requires IP parameters and
                                                    connection point(portgroup/dvs-name & dvport-id).
                      -d|--del                      Delete VMkernel NIC on the system
                                                    requires connection point(portgroup/dvs-name & dvport-id).
                      -e|--enable                   Enable the given NIC if disabled.
                      -D|--disable                  Disable the given NIC if enabled.
                      -p|--portgroup                Setting portgroup as connection point.
                      -s|--dvs-name                 Setting DVSwitch name of the connection point.
                                                    This requires --dvport-id option to
                                                    be given in the same command.
                      -v|--dvport-id                Setting DVPort ID of connection point.
                                                    This requires --dvs-name option to
                                                    be given in the same command.
                      -l|--list                     List VMkernel NICs.
                      -i|--ip <IP Spec>             Where <IP Spec> can be one of the following...
                                                    <X.X.X.X>      - to use static IPv4 address specified
                                                    DHCP           - to enable IPv4 DHCP for address.
                                                    <X:X:X::/X>    - to use static IPv6 address
                                                    DHCPV6         - to enable IPv6 DHCP for address.
                                                    AUTOCONF       - to enable IPv6 Router advertised address.
                      -U|--unset-ip <IP Spec>       Where <IP Spec> can be one of the following...
                                                    V4             - to unset IPv4 address.
                                                    <X:X:X::/X>    - to remove the specified IPv6 address
                                                    DHCPV6         - to disable IPv6 DHCP address.
                                                    AUTOCONF       - to disable IPv6 Router advertised flag.
                      -n|--netmask <X.X.X.X>        The IP netmask for this VMkernel NIC.
                                                    Setting the IP netmask requires that the --ip
                                                    option be given in the same command.
                      -P|--peerdns                  Set peer dns. If set the system
                                                    will use the HostName, HostIPAddress
                                                    Domain returned by DHCP. Valid only for DHCP
                      -m|--mtu MTU                  MTU for the interface being created.
                                                    vmknic being created.
                                                    Valid MTU values are 1280-9000
                      -6|--enable-ipv6 <true|false> Enable or disable IPv6 for next boot.
                      -r|--restore                  Restore VMkernel TCP/IP interfaces from
                                                    Configuration file (FOR INTERNAL USE ONLY).
                      -h|--help                     Show this message.

                      Examples:

                        To add a vmknic to a portgroup
                            esxcfg-vmknic -a -i DHCP -p pgName
                            or
                            esxcfg-vmknic -a -i x.x.x.x -n 255.255.255.0 pgName

                        To delete a vmknic from a portgroup
                            esxcfg-vmknic -d -p pgName
                            or
                            esxcfg-vmknic -d pgName

                       

                       

                      hope that helps ..

                      • 8. Re: How to Disable or enable vmnic in esx4.1
                        RAJ_RAJ Expert
                        vExpert

                        Not working this one.

                        RAJESH RADHAKRISHNAN
                        VCA -DCV/WM/Cloud,VCP 5 - DCV/DT/CLOUD, ,VCP6-DCV, EMCISA,EMCSA,MCTS,MCPS,BCFA
                        https://ae.linkedin.com/in/rajesh-radhakrishnan-76269335
                        Mark my post as "helpful" or "correct" if I've helped resolve or answered your query!
                        • 9. Re: How to Disable or enable vmnic in esx4.1
                          Champion

                          Hello IT. Did you switch it off and on again?

                          • 10. Re: How to Disable or enable vmnic in esx4.1
                            RAJ_RAJ Expert
                            vExpert

                            After a hard reboot , it started working .

                            RAJESH RADHAKRISHNAN
                            VCA -DCV/WM/Cloud,VCP 5 - DCV/DT/CLOUD, ,VCP6-DCV, EMCISA,EMCSA,MCTS,MCPS,BCFA
                            https://ae.linkedin.com/in/rajesh-radhakrishnan-76269335
                            Mark my post as "helpful" or "correct" if I've helped resolve or answered your query!