diff --git a/jobs/pipelines/swarm-testrail-report.groovy b/jobs/pipelines/swarm-testrail-report.groovy
index 059eef7..3849e16 100644
--- a/jobs/pipelines/swarm-testrail-report.groovy
+++ b/jobs/pipelines/swarm-testrail-report.groovy
@@ -57,12 +57,15 @@
             def tempest_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"report_*.xml\"", returnStdout: true)
             // k8s_conformance_report_name =~ conformance_result.xml
             def k8s_conformance_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"conformance_result.xml\"", returnStdout: true)
+            // k8s_conformance_report_name =~ conformance_virtlet_result.xml
+            def k8s_conformance_virtlet_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"conformance_virtlet_result.xml\"", returnStdout: true)
             // stacklight_report_name =~ "stacklight_report.xml" or "report.xml"
             def stacklight_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"*report.xml\"", returnStdout: true)
             common.printMsg(deployment_report_name ? "Found deployment report: ${deployment_report_name}" : "Deployment report not found", deployment_report_name ? "blue" : "red")
             common.printMsg(tcpqa_report_name ? "Found tcp-qa report: ${tcpqa_report_name}" : "tcp-qa report not found", tcpqa_report_name ? "blue" : "red")
             common.printMsg(tempest_report_name ? "Found tempest report: ${tempest_report_name}" : "tempest report not found", tempest_report_name ? "blue" : "red")
             common.printMsg(k8s_conformance_report_name ? "Found k8s conformance report: ${k8s_conformance_report_name}" : "k8s conformance report not found", k8s_conformance_report_name ? "blue" : "red")
+            common.printMsg(k8s_conformance_virtlet_report_name ? "Found k8s conformance virtlet report: ${k8s_conformance_virtlet_report_name}" : "k8s conformance virtlet report not found", k8s_conformance_virtlet_report_name ? "blue" : "red")
             common.printMsg(stacklight_report_name ? "Found stacklight-pytest report: ${stacklight_report_name}" : "stacklight-pytest report not found", stacklight_report_name ? "blue" : "red")
 
 
@@ -150,6 +153,28 @@
                 }
             }
 
+            if ('k8s' in stacks && k8s_conformance_virtlet_report_name) {
+                stage("K8s conformance virtlet report") {
+                    testSuiteName = "[k8s] Virtlet"
+                    methodname = "{methodname}"
+                    testrail_name_template = "{title}"
+                    reporter_extra_options = [
+                      "--send-duplicates",
+                      "--testrail-add-missing-cases",
+                      "--testrail-case-custom-fields {\\\"custom_qa_team\\\":\\\"9\\\"}",
+                      "--testrail-case-section-name \'Conformance\'",
+                    ]
+                    report_result = shared.upload_results_to_testrail(k8s_conformance_virtlet_report_name, testSuiteName, methodname, testrail_name_template, reporter_extra_options)
+                    common.printMsg(report_result, "blue")
+                    report_url = report_result.split("\n").each {
+                        if (it.contains("[TestRun URL]")) {
+                            common.printMsg("Found report URL: " + it.trim().split().last(), "blue")
+                            description += "\n<a href=" + it.trim().split().last() + ">${testSuiteName}</a>"
+                        }
+                    }
+                }
+            }
+
             if ('stacklight' in stacks && stacklight_report_name) {
                 stage("stacklight-pytest report") {
                     testSuiteName = "LMA2.0_Automated"
diff --git a/tcp_tests/managers/execute_commands.py b/tcp_tests/managers/execute_commands.py
index 5abc60c..6dcf615 100644
--- a/tcp_tests/managers/execute_commands.py
+++ b/tcp_tests/managers/execute_commands.py
@@ -239,7 +239,8 @@
 
         result = {}
         with self.__underlay.local() as local:
-            result = local.execute('cd {0} && find . -type f -name "{1}"'
+            result = local.execute('cd {0} && find . -maxdepth 1 -type f'
+                                   ' -name "{1}"'
                                    .format(local_path, local_filename))
             LOG.info("Found files to upload:\n{0}".format(result))
 
@@ -283,7 +284,7 @@
 
         with self.__underlay.remote(node_name=node_name) as remote:
 
-            result = remote.execute('find {0} -type f -name {1}'
+            result = remote.execute('find {0} -maxdepth 1 -type f -name {1}'
                                     .format(remote_path, remote_filename))
             LOG.info("Found files to download:\n{0}".format(result))
 
diff --git a/tcp_tests/managers/k8smanager.py b/tcp_tests/managers/k8smanager.py
index 7ca518e..5e8ea56 100644
--- a/tcp_tests/managers/k8smanager.py
+++ b/tcp_tests/managers/k8smanager.py
@@ -230,28 +230,29 @@
                raise_on_err=raise_on_err, verbose=True)
 
     def run_virtlet_conformance(self, timeout=60 * 120,
-                                log_file='virtlet_conformance.log'):
+                                log_file='virtlet_conformance.log',
+                                report_name="report.xml"):
         if self.__config.k8s.run_extended_virtlet_conformance:
             ci_image = "cloud-images.ubuntu.com/xenial/current/" \
                        "xenial-server-cloudimg-amd64-disk1.img"
             cmd = ("set -o pipefail; "
                    "docker run --net=host {0} /virtlet-e2e-tests "
-                   "-include-cloud-init-tests -junitOutput report.xml "
+                   "-include-cloud-init-tests -junitOutput {3} "
                    "-image {2} -sshuser ubuntu -memoryLimit 1024 "
                    "-alsologtostderr -cluster-url http://127.0.0.1:8080 "
                    "-ginkgo.focus '\[Conformance\]' "
                    "| tee {1}".format(
                     self.__config.k8s_deploy.kubernetes_virtlet_image,
-                    log_file, ci_image))
+                    log_file, ci_image, report_name))
         else:
             cmd = ("set -o pipefail; "
                    "docker run --net=host {0} /virtlet-e2e-tests "
-                   "-junitOutput report.xml "
+                   "-junitOutput {2} "
                    "-alsologtostderr -cluster-url http://127.0.0.1:8080 "
                    "-ginkgo.focus '\[Conformance\]' "
                    "| tee {1}".format(
                     self.__config.k8s_deploy.kubernetes_virtlet_image,
-                    log_file))
+                    log_file, report_name))
         LOG.info("Executing: {}".format(cmd))
         with self.__underlay.remote(
                 node_name=self.controller_name) as remote:
diff --git a/tcp_tests/tests/system/test_3rdparty_suites.py b/tcp_tests/tests/system/test_3rdparty_suites.py
index d5b012f..78583af 100644
--- a/tcp_tests/tests/system/test_3rdparty_suites.py
+++ b/tcp_tests/tests/system/test_3rdparty_suites.py
@@ -83,11 +83,16 @@
         k8s_actions.run_conformance()
 
     @pytest.mark.grab_versions
+    @pytest.mark.extract(container_system='docker',
+                         extract_from='mirantis/virtlet',
+                         files_to_extract=['conformance_virtlet_result.xml'])
     @pytest.mark.grab_k8s_results(name=['virtlet_conformance.log',
-                                        'report.xml'])
+                                        'conformance_virtlet_result.xml'])
     @pytest.mark.parametrize("_", [settings.ENV_NAME])
     @pytest.mark.k8s_conformance_virtlet
     def test_run_k8s_conformance_virtlet(self, show_step, config, k8s_actions,
                                          k8s_logs, _):
         """Test run of k8s virtlet conformance tests"""
-        k8s_actions.run_virtlet_conformance()
+        config.k8s.run_extended_virtlet_conformance = True
+        k8s_actions.run_virtlet_conformance(
+            report_name="conformance_virtlet_result.xml")
