3 Replies Latest reply on Aug 8, 2018 7:45 AM by georgemason

    "vDS dvs port cannot be found" when deleting a port mirroring session

    adri_costin Lurker

      Hi,

      I have the following scenario:

      - create a distributed port mirroring session

      - add one source port and one destination port

      - delete the vm marked as destination together with the portgroup it belongs to

      Then when I try to edit/delete the mirroring session, I get the following error:

      "The object or item referred could not be found. vDS dvs port 160 cannot be found".

      Is there any workaround for deleting the port mirroring session (without deleting the distributed switch)?

      Thanks,

      Adriana

        • 1. Re: "vDS dvs port cannot be found" when deleting a port mirroring session
          sixthofbeethoven Lurker

          I had the same problem and solved it:

           

          PROBLEM: Cannot disable, edit, remove any port mirroring sessions.  Received error, similar to:

          "The object or item referred could not be found. vDS dvs port 463 cannot be found".

           

          CAUSE:  Although I had three port mirroring sessions configured, only one of the port mirroring sessions contained a source or destination "port 463" in it's configuration.  This caused problem with any/all other port mirroring sessions.

           

          SOLUTION:  Find the one port-mirroring session that contains the port number from the error ("port 463 cannot be found") and edit the source/destination by deleting the offending port number.  Once the offending port number has been removed from the one specific port mirroring session, you will be able to edit/delete all the other port mirroring sessions.

          • 2. Re: "vDS dvs port cannot be found" when deleting a port mirroring session
            georgemason Novice

            I have exactly this problem, but am not able to use the solution listed.

             

            I have two mirroring sessions setup, both of which are attempting to use port #41 which appears not to be present. I am unable to remove the port from either of the mirror sessions, or indeed make any other changes to port mirroring (for example I tried to delete the mirror sessions but that also fails with the same error). I am also unable to add a new mirror session, the same error is displayed.

             

            Has anyone else seen this, and if so what was the solution? I have been looking for command line tools to manage port mirroring but have so far come up with nothing :-/

            • 3. Re: "vDS dvs port cannot be found" when deleting a port mirroring session
              georgemason Novice

              I thought I would update this post with my experience, as we got this solved in the end, and the solution was neither well documented nor obvious.

               

              I ended up logging this out to VMware support as we had exhausted all other options. The fix ended up being some back-end changes in the DB, which removed the deleted port from the VDS config, and resolved the issue.

               

              The steps were as follows:

               

              <disclaimer>

              VMware do not make DB related solutions available in KB articles for a reason - if you choose to follow the steps below, YOU DO SO AT YOUR OWN RISK! I can't offer any sort of guarantee that this will work, and will not wreck your VCSA. In short, I take no responsibility for what you choose to do with this information.

              </disclaimer>

               

              • Snapshot VCSA appliance
              • Run SSH root shell on VCSA, execute the following commands:
                • shell.set --enabled True
                • shell
                • service-control --stop vmware-vpxd
                • /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
                • select * from vpx_dvs_vspan_ports;
              • This yields a list of all the configured port mirrors with the following headings:
              • Make a note of the dvs_id from the list above, on the lines that correspond with the port_identifier_value that is causing you problems - in our case this was dvs_id 81 with port_identifier 41
              • Issue the following commands:
                • /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
                • delete from vpx_dvs_vspan_ports where dvs_id=81 and port_identifier_value='41';     // change these values for your environment
                • \q
                • service-control --start vmware-vpxd
              • Log into VCSA web interface and confirm that failed port mirror is not present and that you are able to make changes
              • Remove snapshot of VCSA VM

               

              After we followed this process we were immediately able to make changes to our DVS port mirroring config and the failed port was no longer present.

               

              Hope this helps someone else!