<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Leandro Michelino on Medium]]></title>
        <description><![CDATA[Stories by Leandro Michelino on Medium]]></description>
        <link>https://medium.com/@leandromichelino?source=rss-bb8d64f42bfa------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Ny_f4-u-r4-JTSJMmNMXaA.jpeg</url>
            <title>Stories by Leandro Michelino on Medium</title>
            <link>https://medium.com/@leandromichelino?source=rss-bb8d64f42bfa------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 13:02:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@leandromichelino/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Migrating a SQL Server 2014 DB to OCI MySQL Database Service]]></title>
            <link>https://leandromichelino.medium.com/migrating-a-sql-server-2014-db-to-oci-mysql-database-service-181fd34aaacf?source=rss-bb8d64f42bfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/181fd34aaacf</guid>
            <category><![CDATA[sql-server-mysql-service]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[sql-to-mysql]]></category>
            <category><![CDATA[oci-mysql-service]]></category>
            <dc:creator><![CDATA[Leandro Michelino]]></dc:creator>
            <pubDate>Sun, 17 Jan 2021 14:52:23 GMT</pubDate>
            <atom:updated>2021-01-17T14:52:23.247Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*8CW4-O7hNZx_q65COXO4YQ.png" /><figcaption>Check Oracle MySQL Database Service!</figcaption></figure><p>In this tutorial I’m migrating a SQL Server 2014 DB to OCI MySQL Database Service.</p><p><strong>And Why Migrate?</strong></p><p>Well, you can think in some factors like Costs/Performance or just moving all your workloads to OCI and you don’t wanna leave it on a SQL Server installed on top of a Compute VM.</p><p><strong>To our testes here, I’m using a small DB as a template, of course for huge/complex DB, this gonna need more attention to change some configuration/dependences and extra configuration manually. The idea is to show that’s possible to do, basically moving data from on side to other.</strong></p><p><strong>Datatypes Requiring Conversion</strong></p><p>Be aware that you may need to do some mapping when you migrate from SQL Server to MySQL:</p><p><a href="https://dev.mysql.com/doc/workbench/en/wb-migration-database-mssql-typemapping.html">MySQL :: MySQL Workbench Manual :: 10.5.4 Microsoft SQL Server Type Mapping</a></p><p><strong>So, let’s start !</strong></p><p><strong>For this Lab you gonna need:</strong></p><ul><li>SQL Server 2014 (my lab)</li><li><a href="https://dev.mysql.com/downloads/workbench/">MySQL Workbench 8</a></li><li><a href="https://docs.oracle.com/en-us/iaas/mysql-database/doc/getting-started.html">OCI MySQL Database Service</a> (<strong>MySQL Version:</strong> 8.0.22-u4-cloud)</li><li>You must use the “sa” on SQL Server user or equivalent</li><li>On MySQL created a user “oracle” as the “sa” for SQL Server</li><li>Connectivity between the Workbench and both Databases (via VPN or Tunnel SSH)</li></ul><p>Installing the MySQL Workbench is quite simple, just follow the instructions and start it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*xjpTL-_i0FfSWNXfkzNvtw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gwBZmsuVTAh1r0lYS0ASig.jpeg" /><figcaption>The MySQL Workbench is a powerful tool!</figcaption></figure><p>Once you got it installed, let’s configure it:</p><p><strong>1)</strong> Go to Database -&gt; Migration Wizard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*5LSeGvg4rpKdLe4qDWMXLQ.jpeg" /></figure><p><strong>2)</strong> In the main Migration Wizard page, go to “Open ODBC Administrator”, in my case, I had to configure it from scratch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*pn1cFWflrMdp8G3o177juw.jpeg" /></figure><p><strong>3)</strong> Then, under System DSN tab, click em Add…</p><p><a href="https://dev.mysql.com/doc/workbench/en/wb-migration-database-mssql-drivers-windows.html">MySQL :: MySQL Workbench Manual :: 10.5.2.1 Microsoft Windows</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*EBUzkD7qp4Vy3jzTXlnnjw.jpeg" /></figure><p><strong>4)</strong> Give a name of your choice for the connector and complete the other fields, in my lab I’m using a bastion server as “jump server”, <strong>when this tutorial was created, OCI MySQL does not allow external IP’s</strong>, so, you can use a VPN if you like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*3RG8x32CnaTku6GWzNIlsQ.jpeg" /></figure><p><strong>5)</strong> Select the connection parameter which better works for you. In our lab, I’m using the SQL Server authentication via login ID and password:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*Skz-p6Ty5-d4uLJrbGjqYg.jpeg" /><figcaption>In my case, I’m using the <strong>sa</strong> user/password for the SQL Server</figcaption></figure><p><strong>6)</strong> Select the Database that you want to migrate, in our lab, <em>AdventureWorks2014</em>, click Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*qnmKrGBIkMAeVyYBsKxdSg.jpeg" /></figure><p><strong>7) </strong>In this step, if you don’t have to change anything, just keep Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*FCiB4pXGRmEi77Yvy525-g.jpeg" /></figure><p><strong>8)</strong> The ODBC data source creation is completed. You can check the connectivity in the Test Data Source option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*FtIiwaHweUmnWXZHhkkCkA.jpeg" /></figure><p><strong>9)</strong> Click on Test Data Source… Connection working well as expected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*Ri63sV3esToxMl919v36gg.jpeg" /></figure><p>10) So, Back to the main menu, click on <strong>Start Migration</strong> on the bottom page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*foQGas-cP-HC5oLgL4N40g.jpeg" /></figure><p><strong>11)</strong> Select the Database System, Connection Method and DSN driver as below:</p><ul><li>Microsoft SQL Server</li><li>ODBC Data Source</li><li>DSN: the name you created the odbc driver before, <strong>sql2014</strong> in this lab.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*woaq_t4gYH0MoVQlegI8-A.jpeg" /></figure><p><strong>12)</strong> All completed, you can test your configuration clicking on Test Connection, if all good, click Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*yS77_2EbINeqdUfxbenrSQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*7Dd2Es3rHGyWD5lISdZgEQ.jpeg" /></figure><p><strong>13)</strong> Same idea of the previous step, now, let’s configure your access to <strong>MySQL Database on OCI!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*-L-jfW6asycyKyI6wYZCcQ.jpeg" /><figcaption>Complete the fields with you MySQL data information</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O92F42NMTejVVtZCc2rS9Q.jpeg" /><figcaption>The MySQL Database Service running on OCI</figcaption></figure><p><strong>14)</strong> Test your connectivity with your user/password for the MySQL Database</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*Ypy0iqK2wBW2mX8PBY8QzA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*MwJMbEt0ys5lN4rDRtfVyw.jpeg" /></figure><p><strong>15)</strong> So, all sorted, then click Next and you will see this validation page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*KfUUOAo4b3KELj1eidlW8A.jpeg" /></figure><p><strong>16)</strong> In this screen, select your Database to be migrated, you can migrate everything or be selective.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*QV16_8wT3TcKkLxWwQNiRQ.jpeg" /><figcaption>Select the entire DB or just some Schemas to migrate</figcaption></figure><p><strong>17)</strong> Once the analysis is done, click in Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*tu2B-zQiEuSP_w4La35ggg.jpeg" /><figcaption>MySQL Workbench gonna run the conversion checks</figcaption></figure><p><strong>18)</strong> On this Lab, we have Table Objects, View Objects and Routine Objects. We’ll only select the Table Objects because for the rest of the object we should check the corresponding MySQL equivalent code manually. Click Next if it’s okay for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*SxGKJvooyBmrTsrzXReiqQ.jpeg" /><figcaption>As you can see, you can do a selective migration if you want or migrate all.</figcaption></figure><p><strong>19)</strong> In this step, the objects from the Source DB (SQL Server) are converted into MySQL compatible objects. Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*bN1dkRTdfSQD2QABRv6Zzg.jpeg" /></figure><p><strong>20)</strong> The system found 47 warnings, that can be fixed before the migration (<a href="https://dev.mysql.com/doc/workbench/en/wb-migration-database-mssql-typemapping.html">typemappings</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3GHbkd-N9NL7FEHQm2n6hQ.jpeg" /><figcaption>In this case, the MySQL Workbench found 47 warnings, that can be fixed before migrating.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FCR8CGjL-fApLRoIzilZXg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vWuP1tjvFYrZdfd2EH4k4A.jpeg" /></figure><p><strong>21)</strong> So, we can continue by selecting how we want to create the migrated schema in the target. We’ll use the default “Create schema in target RDBMS” option. Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*TfAoqvACF5vLUrfTNCMnDg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*jEDCfnCqrnGNJQ7uGaUBuA.jpeg" /></figure><p><strong>22)</strong> Now we can check the results of the script execution on the Target MySQL DB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*CVgG9MIrDaE4d1EOC3KwFQ.jpeg" /><figcaption>The output for the scripts execution.</figcaption></figure><p><strong>23)</strong> So, let’s look into the MySQL Database on OCI, let’s check it out:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SgvzzLRRq4XvoE0ehXHprA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3exaEICe8Xvy6dH2_YyBYA.jpeg" /><figcaption>The MySQL Database before running the scripts and after.</figcaption></figure><p><strong>24)</strong> Now have the database structure, but we don’t have the data yet. Now, we’ll select how we want to copy the data in the MySQL Server. We’ll use the “Online copy of table data to target RDBMS” option. Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*cVMXTswujynB8hXfKi6HrQ.jpeg" /><figcaption>Here you can select the way that you wanna do the copy process to the MySQL DB</figcaption></figure><p><strong>25)</strong> Data being copied via Bulk Data Transfer service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*nvB6ZgtCIbheKSbpMZuQ9w.jpeg" /><figcaption>Migration progress…</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xd0E9aGrWYkWbnjmrjDvyg.jpeg" /><figcaption>Output results for the migration.</figcaption></figure><p><strong>26)</strong> And if everything goes well, you start to see your Data on the OCI MySQL DB….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uuPBCex_-4KVxopnF75YGw.jpeg" /><figcaption>Now we can run the same select and now we can get some data!</figcaption></figure><p><strong>Well, that’s it! Of course you will have to do all post-migration checks and etc, but, the intention here was to show that is something you can do… To be honest, I’m curious to see how would an application consume the data after migrated.</strong></p><p>Some other following items will need special attention when migrating:</p><ul><li>Assemblies</li><li>Types</li><li>DDL and statement-based triggers (MySQL has row-based triggers)</li><li>Proprietary SQL Server function calls</li><li>Certain cases of dynamic T-SQL</li></ul><p>In the same way, Synonyms and Security Roles will need a workaround as they cannot be directly migrated into MySQL.</p><h3><strong>More information:</strong></h3><ul><li><a href="https://www.oracle.com/mysql/">Quickly Develop and Deploy Cloud Native Applications</a></li><li><a href="https://www.oracle.com/cloud/free/">Access Cloud Services for Free</a></li><li><a href="https://dev.mysql.com/downloads/workbench/">MySQL :: Download MySQL Workbench</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=181fd34aaacf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to migrate an Amazon Linux 2 AMI to OCI]]></title>
            <link>https://leandromichelino.medium.com/how-to-migrate-an-amazon-linux-2-ami-to-oci-afc9c75b64bd?source=rss-bb8d64f42bfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/afc9c75b64bd</guid>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[ami-linux-to-oracle-cloud]]></category>
            <category><![CDATA[aws-migration]]></category>
            <category><![CDATA[aws-to-oracle-cloud]]></category>
            <dc:creator><![CDATA[Leandro Michelino]]></dc:creator>
            <pubDate>Mon, 11 Jan 2021 07:52:41 GMT</pubDate>
            <atom:updated>2021-01-17T14:52:05.471Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u2kVrvHeoIdEtRYeENyd4Q.jpeg" /><figcaption>My AMI AWS Linux 2 running on OCI !</figcaption></figure><p>Let’s say you have an Amazon Linux 2 AMI instance, which at this moment, it’s <strong><em>not officially supported by Oracle</em></strong>, and you want to migrate it to OCI, can I do that ? how do I do that?</p><p>The answer is, well, technically you can… Let’s check it out.</p><p>We need to do some preparations to get there, so, let’s start installing the tools that we will need. In my lab, I’m using a Linux VM running on OCI to install the tools and migrate the AMI AWS Linux. <strong>This tutorial also works for other Linux flavours such as Ubuntu/RedHat.</strong></p><pre>curl “https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip&quot; -o “awscliv2.zip”</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q0RXUFas-IRVfPFdYjip4w.jpeg" /></figure><pre><strong>unzip awscliv2.zip</strong></pre><pre><strong>sudo ./aws/install</strong></pre><p>Now make sure you have created all <strong>IAM Policies</strong> for your S3 bucket to allows us to start the export migration process. <strong>I’m assuming you already have your AWS environment set in place, so, I’m not covering it here.</strong></p><p>Now let’s configure our <strong>AWS CLi</strong>, do:</p><pre><strong>aws configure</strong></pre><p>So, complete the setup with your AWS User account:</p><p>[opc@ocimanagement ~]$ aws configure</p><pre>AWS Access Key ID [None]: <strong>AKIA3******************A42</strong><br>AWS Secret Access Key [None]: <strong>F6RRIXi***************SX1Y</strong><br>Default region name [None]: <strong>eu-west-2</strong><br>Default output format [None]: <strong>json</strong></pre><p>We also need the rclone tool, so, let’s install the rclone tool and configure it:</p><p>You can find it in: <a href="https://rclone.org/downloads/,">https://rclone.org/downloads/</a> in this lab, I’m using:</p><pre>curl <a href="https://rclone.org/install.sh">https://rclone.org/install.sh</a> | sudo bash</pre><p>So, once installed, go to:</p><pre><strong>vi .config/rclone/rclone.conf</strong></pre><p>and edit like this (changing the fields with your own credentials):</p><p>cat .config/rclone/rclone.conf</p><pre>[aws]<br>type = s3<br>provider = AWS<br>env_auth = true<br>access_key_id = AKIA3T6*************<br>secret_access_key = F6RRI*****************h<br>region = eu-west-2<br>location_constraint = eu-west-2<br>acl = bucket-owner-full-control</pre><pre>[oci]<br>type = s3<br>provider = Other<br>env_auth = True<br>access_key_id = 6246dd109*********************7<br>secret_access_key = 3LhprvX*********************v9T8=<br>region = uk-london-1<br>endpoint = <a href="https://idmldytingzx.compat.objectstorage.uk-london-1.oraclecloud.com/">https://ocicpaasmigration.compat.objectstorage.uk-london-1.oraclecloud.com</a><br>location_constraint = uk-london-1<br>acl = bucket-owner-full-control</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*Ij-x924u4Db8mmVoGECcTw.jpeg" /><figcaption>rclone configuration file.</figcaption></figure><p><strong>! I’m not covering in this tutorial how to create users/groups and the buckets on AWS !</strong></p><h3>On OCI -&gt;</h3><p>Now you need to create a Customer Secret Key for that: <a href="https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm#To4">https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm#To4</a></p><p>So, when you create your Access Key, OCI generates an OTP (One Time Password) for it, so, make sure you don’t lose it, there’s not way to recover it.</p><p>Paste this password to the secret_access_key field onto rclone.conf file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8ks04CFkuIBa0O0r.jpeg" /></figure><p>Copy and save it, in case you loose this password, you gonna recreate the Access Key entirely again</p><p>So, now copy you Access Key and paste onto rclone.conf file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Se5NbMB_v3fQdU--uIVSmQ.jpeg" /><figcaption>Copy the Access Key and paste it to your rclone.conf file.</figcaption></figure><p>To make it work well on OCI, we must install some packages on the AMI AWS Linux VM:</p><pre>yum install libvirt qemu-kvm virt-install virt-viewer</pre><p>After the drivers installation, you must do:</p><ul><li>Rebuild the initramfs with the Virtio Drivers.<br> Make a Copy of the initramfs image prior to rebuild as the below command will over-write it.</li></ul><pre><strong>dracut -v -f --add-drivers &quot;virtio virtio_pci virtio_scsi virtio_ring&quot; /boot/initramfs-$(uname -r).img $(uname -r)</strong></pre><ul><li>Verify Virtio Drivers are included on new initramfs for current kernel.</li></ul><pre>[[root@ip-172–31–44–75 /]# <strong>lsinitrd /boot/initramfs-$(uname -r).img | grep -i virtio</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B2Tyz_c9l3z8uMcQQtP-5A.jpeg" /></figure><p>So, because the AWS and OCI use different Hypervisors and/also Hardware we need to do some preparation for the network configuration, this is very important, otherwise your VM <strong>will not start properly.</strong></p><p>Delete/move this file in case it exist:</p><pre>sudo rm /etc/netplan/50-cloud-init.yaml</pre><p>Create a new file with this content: /etc/netplan/config.yaml</p><p>cat /etc/netplan/config.yaml</p><pre>/etc/netplan/config.yaml<br>network:<br>version: 2<br>ethernets:<br>ens3:<br>dhcp4: true</pre><p>Create this second file with this content: /etc/cloud/cloud.cfg.d/01_network.cfg</p><p>cat /etc/cloud/cloud.cfg.d/01_network.cfg</p><pre>/etc/cloud/cloud.cfg.d/01_network.cfg<br>network:<br>version: 2<br>ethernets:<br>ens*:<br>dhcp4: true</pre><p>Once you have done all this configuration, it’s time to start the VM Export job, so, let’s run the export command (make sure you have created your bucket on S3, in my lab is <em>ocimigration</em>):</p><pre><strong>aws ec2 create-instance-export-task --instance-id i-0a9c832bfc380343f --target-environment vmware --export-to-s3-task DiskImageFormat=vmdk,ContainerFormat=ova,S3Bucket=ocimigration</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hIXqazM4oMJXYeJ2hPADJA.jpeg" /><figcaption>Export VM job started successfully</figcaption></figure><p>If your configuration at <em>aws config</em> <em>file</em> and your <em>S3 Policies</em> are correct, you should see this output:</p><pre>{<br>“ExportTask”: {<br>“ExportTaskId”: “export-i-03bcd81f87d67b68a”,<br>“ExportToS3Task”: {<br>“ContainerFormat”: “ova”,<br>“DiskImageFormat”: “vmdk”,<br>“S3Bucket”: “ocimigration”,<br>“S3Key”: “export-i-03bcd81f87d67b68a.ova”<br>},<br>“InstanceExportDetails”: {<br>“InstanceId”: “i-0a9c832bfc380343f”,<br>“TargetEnvironment”: “vmware”<br>},<br>“State”: “active”<br>}<br>}</pre><p>When the Job “State” change to “completed” from “active”, you are ready to Download the OVA file to your local CLi (your laptop or in a Linux VM on Cloud).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*ZRCgU0v4gmnuWuobOw_Xow.jpeg" /><figcaption>You can check the VM Export job status</figcaption></figure><p><strong>! Not covering in this topic how to configure OCI CLi !</strong></p><p><a href="https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#Quickstart">Quickstart</a></p><p><strong>Now import the file to OCI Object Storage:</strong></p><p>To create to create a bucket you can follow this guide:<br> <a href="https://oracle-base.com/articles/vm/oracle-cloud-infrastructure-oci-create-an-object-storage-bucket#:~:text=Create%20Bucket,-Log%20into%20the&amp;text=Use%20the%20top%2Dleft%20menu,the%20%22Create%20Bucket%22%20button">Oracle Cloud Infrastructure (OCI) : Create an Object Storage Bucket</a>.</p><pre>[opc@ocimanagement ~]$ <strong>oci os object put -bn bucket-image --file export-i-03bcd81f87d67b68a.ova</strong></pre><p>You gonna se this output:</p><p>Upload ID: bcdd8afb-691a-f0bc-10f2–6197023b3cfd<br>Split file into 7 parts for upload.<br>Uploading object [####################################] 100%<br>{<br>“etag”: “e1fb68ab-5bc7–41a1-b335-f0f1f5068f2d”,<br>“last-modified”: “Sat, 09 Jan 2021 21:22:14 GMT”,<br>“opc-multipart-md5”: “zfteVcUJVtAMGfj/2MiHcA==-7”<br>}</p><p><strong>Yes, upload it as .ova file</strong>, on OCI it will be converted automatically behind scenes when you create a Custom Image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_mm2DlBLydV_PmsdfUuaAA.jpeg" /><figcaption>Check if your .ova file were uploaded correctly.</figcaption></figure><p>Once it is uploaded, it’s time to create a Custom Image from the file on the Object Storage, go to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*eWsh_NtmY6Jr5JT1AqLufQ.jpeg" /></figure><p>The go to Import Image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MaB4mYisibysckY01sP9pQ.jpeg" /></figure><p>You will have to fill up some fields for the Custom Image:</p><ul><li>Name</li><li>Operating System</li><li>Bucket</li><li>Select the Object Name (.ova file)</li><li>Image type leave as VMDK</li></ul><p>So, one you complete all the fields required, please go for Import Image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CqLPp9k0VMglMlGllmsxGA.jpeg" /><figcaption>custom image available description/compatibility</figcaption></figure><p>Once the process is completed, time to create our AMI AWS Linux VM on OCI!</p><p>Complete the requirement for Compute Creation as you need:</p><ul><li>Name</li><li>Compartment</li><li>Shape</li><li>VCN &amp; Subnet Configuration</li><li>New bundle of SSH Keys.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OL5kOnQDdhAUCoTvHiGIYQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t6tfOZF9BMPT3m8LH0GrLQ.jpeg" /></figure><p>Once you have it all configured, click on Create Instance and wait for the VM come up &amp; running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u2kVrvHeoIdEtRYeENyd4Q.jpeg" /></figure><p>So, that’s it guys :</p><p><strong>Now we have our AMI AWS Linux 2 up &amp; running on OCI, enjoy!</strong></p><p>I didn’t cover in this tutorial how to install other OCI Management drivers, which can be found here:</p><p><a href="https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/enablingmonitoring.htm">Enabling Monitoring for Compute Instances</a></p><p><strong>Please note</strong>, according AWS Exporting instances and volumes is subject to the following limitations:</p><blockquote>You must export your instances and volumes to one of the following image formats that your virtualization environment supports:</blockquote><blockquote>Open Virtual Appliance (OVA), which is compatible with VMware vSphere versions 4, 5, and 6.</blockquote><blockquote>Virtual Hard Disk (VHD), which is compatible with Citrix Xen and Microsoft Hyper-V virtualization products.</blockquote><blockquote>Stream-optimized ESX Virtual Machine Disk (VMDK), which is compatible with VMware ESX and VMware vSphere versions 4, 5, and 6.</blockquote><blockquote>You can’t export an instance if it contains third-party software provided by AWS. For example, VM Export cannot export Windows or SQL Server instances, or any instance created from an image in the AWS Marketplace.</blockquote><blockquote>You can’t export an instance with encrypted EBS snapshots in the block device mapping.</blockquote><blockquote>You can’t export an instance with instance store volumes in the block device mapping.</blockquote><blockquote>You can only export EBS volumes that are specified in the block device mapping, not EBS volumes attached after instance launch.</blockquote><blockquote>You can’t export an instance launched from an imported image if you deleted the AMI or the EBS snapshot for the AMI. To work around the issue, create an AMI from the instance and export the AMI.</blockquote><blockquote>You can’t export an instance that has more than one virtual disk.</blockquote><blockquote>You can’t export an instance that has more than one network interface.</blockquote><blockquote>You can’t export an instance from Amazon EC2 if you’ve shared it from another AWS account.</blockquote><blockquote>By default, you can’t have more than 5 conversion tasks per Region in progress at the same time. This limit is adjustable up to 20.</blockquote><blockquote>VMs with volumes larger than 1 TiB are not supported.</blockquote><blockquote>You can export a volume to either an unencrypted S3 bucket or to a bucket encrypted using SSE-S3. You cannot export to an S3 bucket encrypted using SSE-KMS.</blockquote><p>REFERENCE: <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html">https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html</a></p><p>Enjoy Oracle Cloud Free Services!</p><p><a href="https://www.oracle.com/cloud/free/?&amp;source=:ow:o:p:nav:0916BCButton&amp;intcmp=:ow:o:p:nav:0916BCButton">https://www.oracle.com/cloud/free</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afc9c75b64bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to migrate an Azure Windows Instance to OCI using Azure export]]></title>
            <link>https://leandromichelino.medium.com/how-to-migrate-an-azure-windows-instance-to-oci-using-azure-export-9b9a349a9d21?source=rss-bb8d64f42bfa------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b9a349a9d21</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[migration]]></category>
            <category><![CDATA[azure-migration-to-oci]]></category>
            <dc:creator><![CDATA[Leandro Michelino]]></dc:creator>
            <pubDate>Sat, 09 Jan 2021 14:52:40 GMT</pubDate>
            <atom:updated>2025-01-16T19:39:23.152Z</atom:updated>
            <content:encoded><![CDATA[<p>You have some Windows VM’s running on Microsoft Azure and you want to move it to Oracle Cloud. So, in this lab, I’m going to show you how to move a Windows Server 2012 R2 Server to OCI with a few steps. Be aware that using this method, you must shutdown your VM for a while during the disk export process and the Disks cannot be bigger than 400GB to be imported on OCI. <strong>Also, you can use this VirtIO Drivers to migrate from other Cloud Vendors such as AWS/GCP.</strong></p><p>So, let’s start it!</p><p><strong>On Azure -&gt;</strong></p><p>First step on the Windows VM, we must install a driver which will allow the Windows to recognise The Oracle VirtIO Drivers for Microsoft Windows are paravirtualized (PV) drivers for Microsoft Windows guests that are running on Oracle Linux KVM. The Oracle VirtIO Drivers for Microsoft Windows improve performance for network and block (disk) devices on Microsoft Windows guests and resolve common issues.</p><p>Can be downloaded here: <a href="https://docs.oracle.com/en/operating-systems/oracle-linux/kvm-virtio/kvm-virtio-WhatsNew.html">https://blogs.oracle.com/linux/announcing-oracle-virtio-drivers-115-for-microsoft-windows</a></p><p>1- Download &amp; Upload the Zip file into your Windows VM.<br>2- Install and Reboot the VM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Y26JKdzx7jKNtzVVGqbrQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s0kpTKa51W9kBWWTvPv8bA.jpeg" /></figure><p>Now go you Windows VM and do the following:</p><p>3- Stop you Window VM on Azure</p><p>4- Go to the VM Disks session:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*23knOGruDX4FnOH6MQuKYQ.jpeg" /><figcaption>You can Export more than one Disk at time if you have many disks attached.</figcaption></figure><p>5- Select the Disk(s) that you want to migrate and then go to Disk Export session:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qQNp9QNPh7WcAGktYY0Krg.jpeg" /><figcaption><em>There you are going to create an export URL for you disk, select the amount of time you think it is gonna take for the export process.</em></figcaption></figure><p>6- Now we can download the VHD disk to you laptop or other place that you wish, next step we gonna convert it to qcow2 format for OCI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0v6MuqpoMuxhLAR4G_jFDg.jpeg" /><figcaption>The File can be downloaded via wget, browser or third party software as you wish.</figcaption></figure><p>8- Once it’s downloaded, we need to convert it from VHD to qcow2 (OCI format) using the <strong><em>qemu</em></strong> tool.</p><p>It can be downloaded here: <a href="https://www.qemu.org/download/#linux">https://www.qemu.org/download/#linux</a></p><p>9- Now, let’s convert the disk from VHD to QCOW2. So, now run:</p><pre><em>qemu-img convert -f vpc -O qcow2 azuretooci.vhd azuretooci.qcow2</em></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*YpUaR85XUmVoxCEB7EH5vw.jpeg" /><figcaption>My vhd file is <em>azuretooci.vhd, change the command line to your respective file name</em></figcaption></figure><p>Now we have our disk converted to qcow2 from vhd, so, the next step is upload it to OCI Object Storage Bucket.</p><p>How do we do that?</p><p>First of all, install the rclone tool, <a href="https://rclone.org/downloads/,">https://rclone.org/downloads/</a></p><p>In my lab, I’m using:</p><pre>curl https://rclone.org/install.sh | sudo bash</pre><p>So, once installed, go to the rclone configuration file and edit as below with your credentials (you can check in the OCI session below how to get your OCI credentials):</p><pre>vi .config/rclone/rclone.conf</pre><pre> [azuretooci]<br> type = s3<br> provider = Other<br> env_auth = True<br> access_key_id = 6246dd108e976d901e*****************<br> secret_access_key = 3LhprvX0MDzAvQB/**************<br> region = uk-london-1<br> endpoint = <a href="https://ocipaasmigration.compat.objectstorage.uk-london-1.oraclecloud.com/">https://ocipaasmigration.compat.objectstorage.uk-london-1.oraclecloud.com</a><br> location_constraint = uk-london-1<br> acl = bucket-owner-full-control</pre><h3>OCI -&gt;</h3><p>Now you need to create a Customer Secret Key for that: <a href="https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm#To4">https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm#To4</a></p><p>So, when you create your Access Key, OCI generates an OTP (One Time Password) for it, so, make sure you don’t lose it, there’s not way to recover it.</p><p>Paste this password to the secret_access_key field onto rclone.conf file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xNb92kOhJlHu5fEwzENOqw.jpeg" /><figcaption>Copy and save it, in case you loose this password, you gonna recreate the Access Key entirely again</figcaption></figure><p>So, now copy you Access Key and paste onto rclone.conf file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RJnwqyF2dwihuirROhIOVA.jpeg" /><figcaption>Copy the Access Key and paste it to your rclone.conf file.</figcaption></figure><p><strong>So… we do we do now? Let’s import it to a Compute VM finally!</strong></p><p>Confirm if your qcow2 file has being correctly uploaded:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8OkA5HGb9M7IbvbVEn0M6g.jpeg" /></figure><p>Now you have to go to Compute console and Custom Images:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*eWsh_NtmY6Jr5JT1AqLufQ.jpeg" /></figure><p>Then, select the Name for your Custom Image, also, provide the OS Type and Version:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rz3W0zKdSFaA0QE63yYxAQ.jpeg" /></figure><p>Select the option to Import from an Object Storage bucket:</p><p>1- Select the Bucket in the correct compartment<br> 2- Select the object name (file name)<br> 3- Image Type, in this case: QCOW2<br> 4- Mark Paravirtualized Mode, if not marked as default.<br> 5- Finally, Import Image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dzSKYI8DCqld3PMvKBJK2g.jpeg" /></figure><p>Await for the Import process finish:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WY7-MPVlzyyzVEt1yEId-g.jpeg" /><figcaption>It normally, takes a few minutes to complete.</figcaption></figure><p>Once it is finished, it’s time for to create our Windows Instance on OCI !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aTVVIdew9hPdhWACTd4tgA.jpeg" /><figcaption>Click on Create Instance</figcaption></figure><p>In this section, we need to complete the normal steps:</p><ul><li>Name of the VM</li><li>Compartment</li><li>Availability Domain</li><li>Leave the Image as is.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RJ678zsQt97hHm7DRcVtQA.jpeg" /></figure><p>Continuing the VM setup:</p><p>5- Select the VCN (Virtual Cloud Network)<br> 6- Select the Subnet Public (or Private) depending your configuration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o0poNGTzpnFdA5dWNgN7Fg.jpeg" /></figure><p>In this lab, I’m using a Public subnet, so, I’m connecting via Public IP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zzhPPEg51N1kmk4uEg-sZw.jpeg" /></figure><p>Once you finish the VM setup configuration, click in Create Instance:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PWEoXRDpqySl9e6FYdmeQw.jpeg" /></figure><p>Once the Instance Creation is done, you are ready to connect to your New Instance via RDP</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7DyorXd3KaKRWO9K_UwQ6w.jpeg" /></figure><p>Well done! Your Azure VM it’s now running on OCI !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XuTljss4t9Nn_S2ncrSCFg.jpeg" /></figure><p>I didn’t cover in this tutorial how to install other OCI Management drivers, which can be found here:</p><p><a href="https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/enablingmonitoring.htm#ExistingEnabling">Enabling Monitoring for Compute Instances</a></p><h3>More Information:</h3><ul><li><a href="https://www.oracle.com/cloud/free/?&amp;source=:ow:o:p:nav:0916BCButton&amp;intcmp=:ow:o:p:nav:0916BCButton">https://www.oracle.com/cloud/free</a></li><li><a href="https://azure.microsoft.com/en-gb/free/">https://azure.microsoft.com/en-gb/free/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b9a349a9d21" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>