<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I configure VTune Profiler when both host and target are containers? in Analyzers</title>
    <link>https://community.intel.com/t5/Analyzers/How-do-I-configure-VTune-Profiler-when-both-host-and-target-are/m-p/1300596#M21009</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for posting in Analyzers Forum.&lt;/P&gt;
&lt;P&gt;You can try using docker image of Intel Base Toolkit in which VTune is already available so that you don’t need to install it separately. Please follow the below steps to successfully profile a Target container from a Host container :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1)&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Pull oneapi-basekit image&lt;/P&gt;
&lt;P&gt;$ docker pull intel/oneapi-basekit&lt;/P&gt;
&lt;P&gt;2)&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Create a bridge network for containers&lt;/P&gt;
&lt;P&gt;$ docker network create -d bridge test&lt;/P&gt;
&lt;P&gt;3)&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Run the Host container&lt;/P&gt;
&lt;P&gt;$ docker run -p 22:23 --rm -ti --name Host --network test intel/oneapi-basekit bash&lt;/P&gt;
&lt;P&gt;4)&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;On another terminal. Run Target container&lt;/P&gt;
&lt;P&gt;$ docker run -p 22:24 --rm -ti --name Target --network test intel/oneapi-basekit &amp;nbsp;bash&lt;/P&gt;
&lt;P&gt;Note : you can install xrdp inside the container.&lt;/P&gt;
&lt;P&gt;5)&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Install ssh and enable it on both containers&lt;/P&gt;
&lt;P&gt;$ apt-get install ssh&lt;/P&gt;
&lt;P&gt;$ service ssh start&lt;/P&gt;
&lt;P&gt;$ service ssh status&lt;/P&gt;
&lt;P&gt;You will see that “ssh is running”&lt;/P&gt;
&lt;P&gt;Note : If the installation fails . Try $ apt-get update&lt;/P&gt;
&lt;P&gt;6)&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Enable password less ssh connection between containers&lt;/P&gt;
&lt;P&gt;In the Host container , Run the following command to generate public rsa key for connection :&lt;/P&gt;
&lt;P&gt;$ &amp;nbsp;ssh-keygen -t rsa&lt;/P&gt;
&lt;P&gt;Follow the instructions and the key file will be created in the path you provided.&lt;/P&gt;
&lt;P&gt;In the Target container, create the following directory:&lt;/P&gt;
&lt;P&gt;mkdir ~/.ssh&lt;/P&gt;
&lt;P&gt;Paste the contents of the public key you created into a file named authorized_keys inside ~/.ssh&lt;/P&gt;
&lt;P&gt;7)&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Now try ssh from&amp;nbsp;Host into&amp;nbsp;Target&lt;/P&gt;
&lt;P&gt;$ ssh root@Target&lt;/P&gt;
&lt;P&gt;&lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;If step 7 is successful then you can try the vtune command to profile the Target container from Host container.&lt;/P&gt;
&lt;P&gt;$ source /opt/intel/oneapi/setvars.sh and try profiling.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer the below links for more information:&lt;/P&gt;
&lt;P&gt;Oneapi-basekit image : &lt;A href="https://hub.docker.com/r/intel/oneapi-basekit" target="_blank" rel="noopener noreferrer"&gt;https://hub.docker.com/r/intel/oneapi-basekit&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Ssh enabling between containers :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hub.docker.com/r/intel/oneapi-basekit" target="_blank" rel="noopener noreferrer"&gt;https://hub.docker.com/r/intel/oneapi-basekit&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://phoenixnap.com/kb/how-to-ssh-into-docker-container" target="_blank" rel="noopener noreferrer"&gt;https://phoenixnap.com/kb/how-to-ssh-into-docker-container&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;password less connection :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/63345232/login-without-password-from-one-docker-container-into-another" target="_blank" rel="noopener noreferrer"&gt;https://stackoverflow.com/questions/63345232/login-without-password-from-one-docker-container-into-another&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://kcaps.medium.com/passwordless-ssh-between-docker-containers-feb68133dfce" target="_blank" rel="noopener noreferrer"&gt;https://kcaps.medium.com/passwordless-ssh-between-docker-containers-feb68133dfce&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Collect data from remote target :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/command-line-interface/running-command-line-analysis/configuring-analysis-options-from-the-command-line/collecting-data-on-remote-linux-systems-from-the-command-line.html" target="_blank" rel="noopener noreferrer"&gt;https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/command-line-interface/running-command-line-analysis/configuring-analysis-options-from-the-command-line/collecting-data-on-remote-linux-systems-from-the-command-line.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/vtune-cookbook/top/configuration-recipes/profiling-remote-target-through-proxy.html" target="_blank" rel="noopener noreferrer"&gt;https://software.intel.com/content/www/us/en/develop/documentation/vtune-cookbook/top/configuration-recipes/profiling-remote-target-through-proxy.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps. Get back to us in case of any issues.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Raeesa&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jul 2021 05:22:49 GMT</pubDate>
    <dc:creator>RaeesaM_Intel</dc:creator>
    <dc:date>2021-07-23T05:22:49Z</dc:date>
    <item>
      <title>How do I configure VTune Profiler when both host and target are containers?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-configure-VTune-Profiler-when-both-host-and-target-are/m-p/1300257#M21001</link>
      <description>&lt;P&gt;Sorry for the double post, I made a mistake where I should have posted.&lt;BR /&gt;&lt;BR /&gt;I would like to install VTune Profiler on the host container (including xrdp) and profile the target container.&lt;BR /&gt;I don't see any such examples below, so please let me know.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/vtune-cookbook/top/configuration-recipes/profiling-in-docker-container.html" target="_blank" rel="noopener"&gt;https://software.intel.com/content/www/us/en/develop/documentation/vtune-cookbook/top/configuration-recipes/profiling-in-docker-container.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I installed Vtune on the host using the following procedure.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE class="code highlight" lang="plaintext"&gt;&lt;SPAN class="line"&gt;host container $ wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB -O - | sudo apt-key add -&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;host container $ sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"&lt;/SPAN&gt;
&lt;SPAN class="line"&gt;host container $ sudo apt install intel-basekit&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;I'm not sure how to set the target.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 10:37:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-configure-VTune-Profiler-when-both-host-and-target-are/m-p/1300257#M21001</guid>
      <dc:creator>saosudo</dc:creator>
      <dc:date>2021-07-21T10:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I configure VTune Profiler when both host and target are containers?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-configure-VTune-Profiler-when-both-host-and-target-are/m-p/1300596#M21009</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for posting in Analyzers Forum.&lt;/P&gt;
&lt;P&gt;You can try using docker image of Intel Base Toolkit in which VTune is already available so that you don’t need to install it separately. Please follow the below steps to successfully profile a Target container from a Host container :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1)&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Pull oneapi-basekit image&lt;/P&gt;
&lt;P&gt;$ docker pull intel/oneapi-basekit&lt;/P&gt;
&lt;P&gt;2)&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Create a bridge network for containers&lt;/P&gt;
&lt;P&gt;$ docker network create -d bridge test&lt;/P&gt;
&lt;P&gt;3)&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Run the Host container&lt;/P&gt;
&lt;P&gt;$ docker run -p 22:23 --rm -ti --name Host --network test intel/oneapi-basekit bash&lt;/P&gt;
&lt;P&gt;4)&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;On another terminal. Run Target container&lt;/P&gt;
&lt;P&gt;$ docker run -p 22:24 --rm -ti --name Target --network test intel/oneapi-basekit &amp;nbsp;bash&lt;/P&gt;
&lt;P&gt;Note : you can install xrdp inside the container.&lt;/P&gt;
&lt;P&gt;5)&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Install ssh and enable it on both containers&lt;/P&gt;
&lt;P&gt;$ apt-get install ssh&lt;/P&gt;
&lt;P&gt;$ service ssh start&lt;/P&gt;
&lt;P&gt;$ service ssh status&lt;/P&gt;
&lt;P&gt;You will see that “ssh is running”&lt;/P&gt;
&lt;P&gt;Note : If the installation fails . Try $ apt-get update&lt;/P&gt;
&lt;P&gt;6)&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Enable password less ssh connection between containers&lt;/P&gt;
&lt;P&gt;In the Host container , Run the following command to generate public rsa key for connection :&lt;/P&gt;
&lt;P&gt;$ &amp;nbsp;ssh-keygen -t rsa&lt;/P&gt;
&lt;P&gt;Follow the instructions and the key file will be created in the path you provided.&lt;/P&gt;
&lt;P&gt;In the Target container, create the following directory:&lt;/P&gt;
&lt;P&gt;mkdir ~/.ssh&lt;/P&gt;
&lt;P&gt;Paste the contents of the public key you created into a file named authorized_keys inside ~/.ssh&lt;/P&gt;
&lt;P&gt;7)&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Now try ssh from&amp;nbsp;Host into&amp;nbsp;Target&lt;/P&gt;
&lt;P&gt;$ ssh root@Target&lt;/P&gt;
&lt;P&gt;&lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;If step 7 is successful then you can try the vtune command to profile the Target container from Host container.&lt;/P&gt;
&lt;P&gt;$ source /opt/intel/oneapi/setvars.sh and try profiling.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer the below links for more information:&lt;/P&gt;
&lt;P&gt;Oneapi-basekit image : &lt;A href="https://hub.docker.com/r/intel/oneapi-basekit" target="_blank" rel="noopener noreferrer"&gt;https://hub.docker.com/r/intel/oneapi-basekit&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Ssh enabling between containers :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hub.docker.com/r/intel/oneapi-basekit" target="_blank" rel="noopener noreferrer"&gt;https://hub.docker.com/r/intel/oneapi-basekit&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://phoenixnap.com/kb/how-to-ssh-into-docker-container" target="_blank" rel="noopener noreferrer"&gt;https://phoenixnap.com/kb/how-to-ssh-into-docker-container&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;password less connection :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/63345232/login-without-password-from-one-docker-container-into-another" target="_blank" rel="noopener noreferrer"&gt;https://stackoverflow.com/questions/63345232/login-without-password-from-one-docker-container-into-another&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://kcaps.medium.com/passwordless-ssh-between-docker-containers-feb68133dfce" target="_blank" rel="noopener noreferrer"&gt;https://kcaps.medium.com/passwordless-ssh-between-docker-containers-feb68133dfce&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Collect data from remote target :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/command-line-interface/running-command-line-analysis/configuring-analysis-options-from-the-command-line/collecting-data-on-remote-linux-systems-from-the-command-line.html" target="_blank" rel="noopener noreferrer"&gt;https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/command-line-interface/running-command-line-analysis/configuring-analysis-options-from-the-command-line/collecting-data-on-remote-linux-systems-from-the-command-line.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/vtune-cookbook/top/configuration-recipes/profiling-remote-target-through-proxy.html" target="_blank" rel="noopener noreferrer"&gt;https://software.intel.com/content/www/us/en/develop/documentation/vtune-cookbook/top/configuration-recipes/profiling-remote-target-through-proxy.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps. Get back to us in case of any issues.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Raeesa&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 05:22:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-configure-VTune-Profiler-when-both-host-and-target-are/m-p/1300596#M21009</guid>
      <dc:creator>RaeesaM_Intel</dc:creator>
      <dc:date>2021-07-23T05:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I configure VTune Profiler when both host and target are containers?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-configure-VTune-Profiler-when-both-host-and-target-are/m-p/1301162#M21022</link>
      <description>&lt;P&gt;Thank you for your answer.&lt;BR /&gt;Sorry, but I have an additional question.&lt;BR /&gt;How should I set up the container if I want to create &lt;STRONG&gt;target&lt;/STRONG&gt; on the&lt;STRONG&gt; host network&lt;/STRONG&gt; and &lt;STRONG&gt;host&lt;/STRONG&gt; on the &lt;STRONG&gt;bridge network&lt;/STRONG&gt;?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 01:30:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-configure-VTune-Profiler-when-both-host-and-target-are/m-p/1301162#M21022</guid>
      <dc:creator>saosudo</dc:creator>
      <dc:date>2021-07-26T01:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I configure VTune Profiler when both host and target are containers?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-configure-VTune-Profiler-when-both-host-and-target-are/m-p/1301207#M21023</link>
      <description>&lt;P&gt;I have almost solved the problem and will describe how to set it up.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;It was difficult to set up a new container, so I installed intel-basekit in an existing container.&lt;BR /&gt;I installed intel-basekit on both host and target. Then I configured the ssh connection settings.&lt;/P&gt;
&lt;P&gt;The setup of ssh connection between target and host is the same as Raeesa-san's steps 5) to 7).&lt;/P&gt;
&lt;P&gt;Finally, it was just a matter of configuring the ssh destination as usual.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Example:&lt;BR /&gt;IP address of docker bridge 0 (target): 172.17.0.1&lt;BR /&gt;SSH Port number set in /etc/ssh/sshd_config (target): 10122&lt;/P&gt;
&lt;P&gt;I configured the VTune gui (from host) as follows&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Remote Linux(SSH)&lt;BR /&gt;SSH destination&lt;/STRONG&gt;&lt;BR /&gt;user@172.17.0.1:10122&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 06:12:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-configure-VTune-Profiler-when-both-host-and-target-are/m-p/1301207#M21023</guid>
      <dc:creator>saosudo</dc:creator>
      <dc:date>2021-07-26T06:12:47Z</dc:date>
    </item>
    <item>
      <title>Re:How do I configure VTune Profiler when both host and target are containers?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-configure-VTune-Profiler-when-both-host-and-target-are/m-p/1301292#M21025</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Glad that the solution provided helped and thank you for accepting it as solution. We are discontinuing monitoring this thread. Please raise a new thread incase if you face any more issues. We would be happy to help you.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Raeesa&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Jul 2021 10:48:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-configure-VTune-Profiler-when-both-host-and-target-are/m-p/1301292#M21025</guid>
      <dc:creator>RaeesaM_Intel</dc:creator>
      <dc:date>2021-07-26T10:48:18Z</dc:date>
    </item>
  </channel>
</rss>

