{"id":114,"date":"2024-03-26T12:34:43","date_gmt":"2024-03-26T10:34:43","guid":{"rendered":"https:\/\/tel-zur.net\/blog\/?p=114"},"modified":"2024-03-26T16:15:38","modified_gmt":"2024-03-26T14:15:38","slug":"how-to-convert-a-virtualbox-image-to-an-aws-ami","status":"publish","type":"post","link":"https:\/\/tel-zur.net\/blog\/2024\/03\/26\/how-to-convert-a-virtualbox-image-to-an-aws-ami\/","title":{"rendered":"How to convert a VirtualBox image to an AWS AMI?"},"content":{"rendered":"\n<p class=\"has-small-font-size\">Guy Tel-Zur, March 26, 2024<\/p>\n\n\n\n<p>During the pandemic, when isolation took place, I was challenged how to keep my students practicing parallel processing programming in my &#8220;<a href=\"https:\/\/tel-zur.net\/teaching\/bgu\/pp\/schedule.html\" target=\"_blank\" rel=\"noreferrer noopener\">Introduction to Parallel Processing<\/a>&#8221; course. The students couldn&#8217;t meet at the computer lab and so I developed a <a href=\"https:\/\/www.virtualbox.org\/\" data-type=\"link\" data-id=\"https:\/\/www.virtualbox.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">VirtualBox<\/a> image with all the tools I needed for my course (a Linux machine with a compiler, <a href=\"https:\/\/www.mpi-forum.org\/docs\/\" data-type=\"link\" data-id=\"https:\/\/www.mpi-forum.org\/docs\/\" target=\"_blank\" rel=\"noreferrer noopener\">MPI<\/a>, <a href=\"https:\/\/htcondor.org\/\" data-type=\"link\" data-id=\"https:\/\/htcondor.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">HTCondor<\/a>, and profiling tools such as <a href=\"https:\/\/www.cs.uoregon.edu\/research\/tau\/home.php\" data-type=\"link\" data-id=\"https:\/\/www.cs.uoregon.edu\/research\/tau\/home.php\" target=\"_blank\" rel=\"noreferrer noopener\">TAU<\/a> and <a href=\"https:\/\/scalasca.org\/\" data-type=\"link\" data-id=\"https:\/\/scalasca.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Scalasca<\/a>). This idea of a parallel processing full stack virtual machine (VM) is not unique or new, for example, there is an excellent tool from the <a href=\"https:\/\/e4s-project.github.io\/index.html\" data-type=\"link\" data-id=\"https:\/\/e4s-project.github.io\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\">E4S<\/a> project. However, I preferred to create my own image that is customized to my syllabus. The VM allowed the students to import a ready to use infrastructure into their private computers with zero effort. The VM settings is shown in the next figure:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"691\" src=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/vboxsettings-1024x691.png\" alt=\"\" class=\"wp-image-117\" srcset=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/vboxsettings-1024x691.png 1024w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/vboxsettings-300x203.png 300w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/vboxsettings-768x519.png 768w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/vboxsettings.png 1050w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The VM desktop, which is based on CentOS 8 is shown here:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"507\" src=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_desktop-1024x507.png\" alt=\"\" class=\"wp-image-118\" srcset=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_desktop-1024x507.png 1024w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_desktop-300x149.png 300w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_desktop-768x380.png 768w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_desktop-1536x761.png 1536w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_desktop-1568x777.png 1568w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_desktop.png 1904w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Since then, I kept using and upgrading this tool as an easy alternative to the full scale educational departmental cluster. Of course, this isn&#8217;t a tool for breaking performance records but it is quiet convenient for educational purposes. However there are some limitations: First, the VM can not work on too old computers. The minimum requirements are at least 4GB RAM, 2 cores and a few tens of GB storage. Another significant limitation is that it isn&#8217;t possible to test the scaling of the codes as one increases the number of parallel tasks (because it was limited to only 2 cores). Therefore, important terms like speedup and efficiency could not be demonstrated. Nevertheless, I decided to preserve this concept of a full stack single machine which is easy to use as a complimentary tool, but I wanted to also migrate it to the cloud so that anyone would be able to test the instance also with many cores! Transferring the VM to the cloud turned out to be a challenging task and I decided to summarize it here in order to ease your life in case that you also would want to convert a VirtualBox image (as an ova file) to an Amazon Web Services (AWS) machine image (AMI). Hopefully, after reading this post you will be able to complete that task in a fraction of the time I spent resolving all the challenges. <\/p>\n\n\n\n<p>Step 1: Export the VM to an <em>OVA<\/em> (Open Virtualization Format) file. This part is easy, just click on &#8220;File&#8221; &#8211;&gt; &#8220;Export Appliance&#8221;. It is a good practice to remove the <em>.bash_history<\/em> file before exporting the VM so that you will clear the history of the commands you used prior to the that moment.<\/p>\n\n\n\n<p>Step 2: Assuming that you already have an account on AWS and that you installed AWS command line tools and credentials then create a S3 bucket and copy your ova file into that bucket:<\/p>\n\n\n<pre class=\"wp-block-code synano\" data-theme=\"default\"><code class=\"language-auto\">aws s3 cp .\/HPC_VM_2024.3.ova s3:\/\/gtz-vm-bucket\/<\/code><\/pre>\n\n\n<p>This may take a few minutes, be patient. <\/p>\n\n\n\n<p>Step 3: Security matters. You are asked to create a policy and a role to handle the image:<\/p>\n\n\n<pre class=\"wp-block-code synano\" data-theme=\"default\"><code class=\"language-auto\">aws iam create-role --role-name vmimport --assume-role-policy-document file:\/\/trust-policy.json<\/code><\/pre>\n\n\n<p>Where the policy JSON file is:<\/p>\n\n\n<pre class=\"wp-block-code synano\" data-theme=\"default\"><code class=\"language-auto\">$ more .\/trust-policy.json \n{\n   &quot;Version&quot;: &quot;2012-10-17&quot;,\n   &quot;Statement&quot;: [\n      {\n         &quot;Effect&quot;: &quot;Allow&quot;,\n         &quot;Principal&quot;: { &quot;Service&quot;: &quot;vmie.amazonaws.com&quot; },\n         &quot;Action&quot;: &quot;sts:AssumeRole&quot;,\n         &quot;Condition&quot;: {\n            &quot;StringEquals&quot;:{\n               &quot;sts:Externalid&quot;: &quot;vmimport&quot;\n            }\n         }\n      }\n   ]\n}<\/code><\/pre>\n\n\n<p>You can read more about this step <a href=\"https:\/\/www.christopherbale.com\/converting-and-importing-a-virtual-box-vm-into-a-aws-ec2-ami\/\">here<\/a>. You also need to define a role in another JSON file:<\/p>\n\n\n<pre class=\"wp-block-code synano\" data-theme=\"default\"><code class=\"language-auto\">{\n   &quot;Version&quot;:&quot;2012-10-17&quot;,\n   &quot;Statement&quot;:[\n      {\n         &quot;Effect&quot;:&quot;Allow&quot;,\n         &quot;Action&quot;:[\n            &quot;s3:GetBucketLocation&quot;,\n            &quot;s3:GetObject&quot;,\n            &quot;s3:ListBucket&quot; \n         ],\n         &quot;Resource&quot;:[\n            &quot;arn:aws:s3:::aria-images&quot;,\n\t\t\t&quot;arn:aws:s3:::aria-images\/*&quot;\n         ]\n      },\n      {\n         &quot;Effect&quot;:&quot;Allow&quot;,\n         &quot;Action&quot;:[\n            &quot;ec2:ModifySnapshotAttribute&quot;,\n            &quot;ec2:CopySnapshot&quot;,\n            &quot;ec2:RegisterImage&quot;,\n            &quot;ec2:Describe*&quot;\n         ],\n         &quot;Resource&quot;:&quot;*&quot;\n      }\n   ]<\/code><\/pre>\n\n\n<p>and the command to set it is:<\/p>\n\n\n<pre class=\"wp-block-code synano\" data-theme=\"default\"><code class=\"language-auto\">aws iam put-role-policy --role-name vmimport --policy-name vmimport --policy-document file:\/\/role-policy.json<\/code><\/pre>\n\n\n<p>Step 4: Now it is time to convert the ova in S3 into an AMI using this command:<\/p>\n\n\n<pre class=\"wp-block-code synano\" data-theme=\"default\"><code class=\"language-auto\">aws ec2 import-image --description &quot;HPC_VM_2024.3&quot; --disk-containers &quot;file:\/\/.\/containers.json&quot;<\/code><\/pre>\n\n\n<p>A few seconds after hitting &#8216;enter&#8217; you will see, as a response with your new AMI name. Look for &#8220;import-ami-XXXXXXXXX&#8221;. A typical response looks like this:<\/p>\n\n\n<pre class=\"wp-block-code synano\" data-theme=\"default\"><code class=\"language-auto\">{\n    &quot;Description&quot;: &quot;HPC_VM_2024.3&quot;,\n    &quot;ImportTaskId&quot;: &quot;&lt;strong&gt;import-ami-01478e05448530ae4&lt;\/strong&gt;&quot;,\n    &quot;Progress&quot;: &quot;1&quot;,\n    &quot;SnapshotDetails&quot;: [\n        {\n            &quot;Description&quot;: &quot;Guy Tel-Zur - Parallel Processing Education&quot;,\n            &quot;DiskImageSize&quot;: 0.0,\n            &quot;Format&quot;: &quot;OVA&quot;,\n            &quot;UserBucket&quot;: {\n                &quot;S3Bucket&quot;: &quot;gtz-vm-bucket&quot;,\n                &quot;S3Key&quot;: &quot;HPC_VM_2024.3.ova&quot;\n            }\n        }\n    ],\n    &quot;Status&quot;: &quot;active&quot;,\n    &quot;StatusMessage&quot;: &quot;&lt;strong&gt;pending&lt;\/strong&gt;&quot;\n}<\/code><\/pre>\n\n\n<p>The content of <em>containers.json<\/em> is:<\/p>\n\n\n<pre class=\"wp-block-code synano\" data-theme=\"default\"><code class=\"language-auto\">[\n  {\n    &quot;Description&quot;: &quot;My Parallel Processing OVA&quot;,\n    &quot;Format&quot;: &quot;ova&quot;,\n    &quot;UserBucket&quot;: {\n        &quot;S3Bucket&quot;: &quot;gtz-vm-bucket&quot;,\n        &quot;S3Key&quot;: &quot;HPC_VM_2024.3.ova&quot;\n    }\n}]<\/code><\/pre>\n\n\n<p>Replace the Description, S3Bucket, and S3Key fields with your preferences. <\/p>\n\n\n\n<p>Step 5: Checking the progress. At this step you can execute this status checking command:<\/p>\n\n\n<pre class=\"wp-block-code synano\" data-theme=\"default\"><code class=\"language-auto\">$ &lt;strong&gt;aws ec2 describe-import-image-tasks --import-task-ids import-ami-01478e05448530ae4&lt;\/strong&gt;\n{\n    &quot;ImportImageTasks&quot;: [\n        {\n            &quot;Description&quot;: &quot;HPC_VM_2024.2&quot;,\n            &quot;ImportTaskId&quot;: &quot;import-ami-01478e05448530ae4&quot;,\n            &quot;Progress&quot;: &quot;19&quot;,\n            &quot;SnapshotDetails&quot;: [\n                {\n                    &quot;DiskImageSize&quot;: 20736632320.0,\n                    &quot;Format&quot;: &quot;VMDK&quot;,\n                    &quot;Status&quot;: &quot;active&quot;,\n                    &quot;UserBucket&quot;: {\n                        &quot;S3Bucket&quot;: &quot;gtz-vm-bucket&quot;,\n                        &quot;S3Key&quot;: &quot;HPC_VM_2024.2.ova&quot;\n                    }\n                }\n            ],\n            &quot;Status&quot;: &quot;active&quot;,\n            &quot;StatusMessage&quot;: &quot;&lt;strong&gt;converting&lt;\/strong&gt;&quot;,<\/code><\/pre>\n\n\n<p>and see that &#8220;pending&#8221; was changed to &#8220;converting&#8221; which is a good sign.<\/p>\n\n\n\n<p><em>But then came problems&#8230;<\/em><\/p>\n\n\n\n<p>The image was not correctly prepared for the conversion into an AMI and I got the following error message:<\/p>\n\n\n<pre class=\"wp-block-code synano\" data-theme=\"default\"><code class=\"language-auto\">$ aws ec2 describe-import-image-tasks --import-task-ids import-ami-01478e05448530ae4\n{\n    &quot;ImportImageTasks&quot;: [\n        {\n            &quot;Description&quot;: &quot;HPC_VM_2024.2&quot;,\n            &quot;ImportTaskId&quot;: &quot;import-ami-01478e05448530ae4&quot;,\n            &quot;SnapshotDetails&quot;: [\n                {\n                    &quot;DeviceName&quot;: &quot;\/dev\/sde&quot;,\n                    &quot;DiskImageSize&quot;: 20736632320.0,\n                    &quot;Format&quot;: &quot;VMDK&quot;,\n                    &quot;Status&quot;: &quot;completed&quot;,\n                    &quot;UserBucket&quot;: {\n                        &quot;S3Bucket&quot;: &quot;gtz-vm-bucket&quot;,\n                        &quot;S3Key&quot;: &quot;HPC_VM_2024.2.ova&quot;\n                    }\n                }\n            ],\n            &lt;strong&gt;&quot;Status&quot;: &quot;deleted&quot;,\n            &quot;StatusMessage&quot;: &quot;ClientError: BLSC-style GRUB found, but unable to detect default kernel&quot;&lt;\/strong&gt;,\n            &quot;Tags&quot;: []\n        }\n    ]<\/code><\/pre>\n\n\n<p>The way to resolve this error is to return to VirtualBox, boot the image and make modifications as root. By default, the GRUB_ENABLE_BLSC is set to <em>true<\/em> in the <em>\/etc\/default\/grub<\/em> file. When this variable is set to true, GRUB2 uses <em>blscfg<\/em> files and entries in the <em>grub.cfg<\/em> file. To resolve the ClientError: BLSC-style GRUB error on import or export, set the GRUB_ENABLE_BLSC parameter to <strong><em>false<\/em><\/strong> in the <em>\/etc\/default\/grub<\/em> file so: open <em>\/etc\/default\/grub<\/em> file with a text editor, such as nano and modify GRUB_ENABLE_BLSC parameter to false. Then, run the following command to rebuild the grub config file: <\/p>\n\n\n<pre class=\"wp-block-code synano\" data-theme=\"default\"><code class=\"language-auto\">grub2-mkconfig -o \/boot\/grub2\/grub.cfg<\/code><\/pre>\n\n\n<p>To read more about this issue click <a href=\"https:\/\/repost.aws\/zh-Hans\/knowledge-center\/ami-resolve-import-export-blsc-error\">here<\/a>. Now, shut down the VM and repeat steps 1..5 (this is time consuming and tedious). <\/p>\n\n\n\n<p>Then, I had another &#8220;surprise&#8221;. Because I upgraded the image over the years the VM had several kernels but sadly the one that is supported by AWS wasn&#8217;t installed. In my case I got this error message:<\/p>\n\n\n<pre class=\"wp-block-code synano\" data-theme=\"default\"><code class=\"language-auto\">&quot;StatusMessage&quot;: &quot;ClientError: Unsupported kernel version 5.4.156-1.el8.elrepo.x86_64&quot;,<\/code><\/pre>\n\n\n<p>It turns out the AWS supports only a specific kernel for each Linux distribution, check <a href=\"https:\/\/docs.aws.amazon.com\/vm-import\/latest\/userguide\/prerequisites.html#vmimport-operating-systems\">here<\/a>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"651\" src=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/aws_kernels-1024x651.png\" alt=\"\" class=\"wp-image-126\" srcset=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/aws_kernels-1024x651.png 1024w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/aws_kernels-300x191.png 300w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/aws_kernels-768x489.png 768w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/aws_kernels.png 1039w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>So I had to downgrade the kernel to 4.18.0 and make this kernel as the default when booting the image. Then, I had to repeat, once again, steps 1..5. Unfortunately, that wasn&#8217;t enough! The conversion process failed again and this time due to the presence of the other kernels. I had to completely remove all the other kernels and to be left only with the 4.18.0 kernel. Even the rescue kernel disturbed the conversion process:<\/p>\n\n\n<pre class=\"wp-block-code synano\" data-theme=\"default\"><code class=\"language-auto\">&quot;StatusMessage&quot;: &quot;ClientError: Unsupported kernel version 0-rescue-c02fbb5c652549588dbb069f20f31872&quot;,<\/code><\/pre>\n\n\n<p>So I had to go back again to the VirtualBox image and to erase all the other kernels and repeat steps 1..5 \ud83d\ude41 \ud83d\ude41 <\/p>\n\n\n\n<p>This time it want well until the end!!!<\/p>\n\n\n<pre class=\"wp-block-code synano\" data-theme=\"default\"><code class=\"language-auto\">{\n    &quot;ImportImageTasks&quot;: [\n        {\n            &quot;Architecture&quot;: &quot;x86_64&quot;,\n            &quot;Description&quot;: &quot;HPC_VM_2024.3&quot;,\n            &quot;ImportTaskId&quot;: &quot;import-ami-079a7bf1190f50bbf&quot;,\n            &quot;LicenseType&quot;: &quot;BYOL&quot;,\n            &quot;Platform&quot;: &quot;Linux&quot;,\n            &quot;Progress&quot;: &quot;27&quot;,\n            &quot;SnapshotDetails&quot;: [\n                {\n                    &quot;DeviceName&quot;: &quot;\/dev\/sda1&quot;,\n                    &quot;DiskImageSize&quot;: 20776996864.0,\n                    &quot;Format&quot;: &quot;VMDK&quot;,\n                    &quot;Status&quot;: &quot;&lt;strong&gt;completed&lt;\/strong&gt;&quot;,\n                    &quot;UserBucket&quot;: {\n                        &quot;S3Bucket&quot;: &quot;gtz-vm-bucket&quot;,\n                        &quot;S3Key&quot;: &quot;HPC_VM_2024.3.ova&quot;\n                    }\n                }\n            ],\n            &quot;Status&quot;: &quot;&lt;strong&gt;active&lt;\/strong&gt;&quot;,<\/code><\/pre>\n\n\n<p>Congratulations! Now we can go to AWS dashboard and find our new AMI in the EC2 panel:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"507\" src=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/my_ami_dashboard-1024x507.png\" alt=\"\" class=\"wp-image-129\" srcset=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/my_ami_dashboard-1024x507.png 1024w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/my_ami_dashboard-300x149.png 300w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/my_ami_dashboard-768x380.png 768w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/my_ami_dashboard-1536x761.png 1536w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/my_ami_dashboard-1568x776.png 1568w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/my_ami_dashboard.png 1648w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In order to test the AMI click on &#8220;Launch instance from AMI&#8221;. The first instance I tried was a t2.micro just for testing the connection. A simple <em>ssh<\/em> connection from the terminal was successful using the the generated key pair: <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1009\" height=\"603\" src=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_ssh_terminal.png\" alt=\"\" class=\"wp-image-130\" srcset=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_ssh_terminal.png 1009w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_ssh_terminal-300x179.png 300w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_ssh_terminal-768x459.png 768w\" sizes=\"auto, (max-width: 1009px) 100vw, 1009px\" \/><\/figure>\n\n\n\n<p>Then, I wanted to test the image in its full glory, so I created another instance, this time with 8 cores (t2.2xlarge). <strong>This node will exceed the performance of the VirtualBox image and this was the motivation for the whole exercise:<\/strong> <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"525\" src=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_xlarge-1024x525.png\" alt=\"\" class=\"wp-image-131\" srcset=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_xlarge-1024x525.png 1024w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_xlarge-300x154.png 300w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_xlarge-768x394.png 768w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_xlarge-1536x787.png 1536w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_xlarge-1568x803.png 1568w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_xlarge.png 1655w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Indeed now there are 8 happy cores running:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_8_cores.png\" alt=\"\" class=\"wp-image-133\" srcset=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_8_cores.png 1024w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_8_cores-300x225.png 300w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_8_cores-768x576.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now it is time for a few parallel computing tests. For that, I used the famous <a href=\"https:\/\/tel-zur.net\/teaching\/bgu\/pp\/cpi.c\" target=\"_blank\" rel=\"noreferrer noopener\">cpi.c<\/a> program. In the following 3 figures results from TAU, Jumpshot, and Scalasca profiling tools correspondingly are  shown:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"546\" src=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/paraprof-1024x546.png\" alt=\"\" class=\"wp-image-132\" srcset=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/paraprof-1024x546.png 1024w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/paraprof-300x160.png 300w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/paraprof-768x409.png 768w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/paraprof-1536x819.png 1536w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/paraprof-1568x836.png 1568w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/paraprof.png 1914w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"557\" src=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_jumpshot-1024x557.png\" alt=\"\" class=\"wp-image-134\" srcset=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_jumpshot-1024x557.png 1024w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_jumpshot-300x163.png 300w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_jumpshot-768x418.png 768w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_jumpshot-1536x835.png 1536w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_jumpshot-1568x853.png 1568w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_jumpshot.png 1907w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"547\" src=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_scalasca-1024x547.png\" alt=\"\" class=\"wp-image-135\" srcset=\"https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_scalasca-1024x547.png 1024w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_scalasca-300x160.png 300w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_scalasca-768x411.png 768w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_scalasca-1536x821.png 1536w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_scalasca-1568x838.png 1568w, https:\/\/tel-zur.net\/blog\/wp-content\/uploads\/2024\/03\/hpc_vm_scalasca.png 1912w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Mission achieved! That&#8217;s it for now. For further reading check this <a href=\"https:\/\/docs.aws.amazon.com\/pdfs\/vm-import\/latest\/userguide\/vm-import-ug.pdf#vmimport-image-import\" data-type=\"link\" data-id=\"https:\/\/docs.aws.amazon.com\/pdfs\/vm-import\/latest\/userguide\/vm-import-ug.pdf#vmimport-image-import\" target=\"_blank\" rel=\"noreferrer noopener\">link<\/a>. <\/p>\n\n\n\n<p>If you enjoyed this article you are invited to leave a comment below. You can also subscribe to my <a href=\"https:\/\/www.youtube.com\/@tel-zur_computing\">YouTube channel <\/a>(@tel-zur_computing) or connect with me on <a href=\"https:\/\/twitter.com\/telzur\">X<\/a> and on <a href=\"https:\/\/www.linkedin.com\/in\/telzur\/\">Linkedin<\/a>. <\/p>\n\n\n\n<p>Good luck!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Guy Tel-Zur, March 26, 2024 During the pandemic, when isolation took place, I was challenged how to keep my students practicing parallel processing programming in my &#8220;Introduction to Parallel Processing&#8221; course. The students couldn&#8217;t meet at the computer lab and so I developed a VirtualBox image with all the tools I needed for my course &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/tel-zur.net\/blog\/2024\/03\/26\/how-to-convert-a-virtualbox-image-to-an-aws-ami\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to convert a VirtualBox image to an AWS AMI?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-114","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"_links":{"self":[{"href":"https:\/\/tel-zur.net\/blog\/wp-json\/wp\/v2\/posts\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tel-zur.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tel-zur.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tel-zur.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tel-zur.net\/blog\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":27,"href":"https:\/\/tel-zur.net\/blog\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"predecessor-version":[{"id":152,"href":"https:\/\/tel-zur.net\/blog\/wp-json\/wp\/v2\/posts\/114\/revisions\/152"}],"wp:attachment":[{"href":"https:\/\/tel-zur.net\/blog\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tel-zur.net\/blog\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tel-zur.net\/blog\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}