sábado, 2 de mayo de 2020

How to migrate VirtualBox VM to Oracle Cloud (Windows Server 2019 Standard)

In this article I will explain the steps that we have to follow in order to migrate an Oracle VirtualBox VM with Microsoft Windows Server 2019 Standard to Oracle Cloud as an Instance.

I have created a file inside the VM that will be useful as a mark so that when the VM is migrated we will be able to confirm that in fact, it's the correct machine.  The file is called "Deiby Gomez" with the Text "This is a Deiby's File":


In the official Documentation provided by Oracle. It says that only the following OS are supported in  OCI, so before to continue, be sure that you are planning to migrate a supported one:



Preparing the VM

Oracle documentation also have some prerequisites we have to cumply before to migrate a Windows VM to OCI, here the list:



I verified all the prerequisites in my VM and the only one pending is to install virtio drives. First we have to download the installer from Oracle Software Delivery Cloud site.


In the "All Categories" list, select "Release":

Type "Oracle Linux 7.6" in the search box and click in the button "Search". Then select "REL: Oracle Linux 7.6.0.0.0" to add it to your cart. Click in "Checkout" to proceed. 



In the "Platforms/Languages" list, select "x86 64 bit". Click in the butotn "Continue":


Accept the license agreement and then click in the button "Continue". 

Select only the option "Oracle VirtIO Drivers Version for Microsoft Windows 1.1.4":


Click in the button "Download".

Transfer the file to your VM:



Execute the file "Setup.exe":



The installer will be initiated: 




Click in the button "Next":



Click in the option "Custom" and then in button "Next":




Click in "Install":





When the installation completes, it will ask to be rebooted, click in "Yes" and let it reboot. 



Exporting the VM from VirtualBox

Select the VM in VirtualBox:


Click in "File" menu and then "Export Appliance":


Click in "Next"


Specify the Directory where the export file will be stored, be sure that you select the option "Oracle Public Cloud Format 1.0":


Click in "Export":


Wait until the export completes:




Importing the VM into OCI:


Follow the steps in the article How to create an Instance Custom Template in Oracle Cloud using VMware VMDK Files.
If you want to upload the file with parallelism you can follow the steps in the article Using Multipart Upload with CLI to send a file to Oracle Object Storage


Creating the Instance from the Template:

When you have the export file in a Bucket, you will see a similar page than the fillowing one:



Click in "Compute" -> "Custom Images":




Click in the button "Import Image":




Specify all the values that are required, be sure that you  select the right OS, in this case "Windows" and then under "Operating System version", I selected "Server 2019 Standard". Then select the export file we have in our Object Storage Bucket called "WinServer2019"  under "Object name".





Select the format "VMDK" for the image type, and "Paravirtualized Mode" for the launch mode.




The image template will start to be created:



Creating the Instance:


Once the Instance custom template completes you will see a page similar to the next one. Here click in the button "Create Instance":




Specify all the values that are required. Be sure to select the Image Custom Template we just created previously, in this article we called it "WinServer2019Template". Then Click in the button "Create".




The Instance will start to be created:



Wait until it's completed:



Testing Connectivity:


The basic test is a Ping, I will  use the Public IP:


NOTE: If your instance does not respond in the public IP, check this article OCI Instance with Windows does not respond in the public IP.


Create a Console Connection following the steps in the article How to connect with VNC to Oracle OCI Instance


I will check the file I created at the beginning of the article just to confirm that my VM was not stolen in the middle of the process :) 




No hay comentarios:

Publicar un comentario

Oracle ACE Director Award - Deiby Gómez

Thanks #OracleACE Program for this awesome certificate recognizing the work I have done in the community for the last year. Looking forwa...