Learn how to easily migrate a physical GNU/Linux machine from your on-premises server to a Jotelulu server.
With the growing demand for ever more computing power, greater flexibility and increasingly strict requirements with regard to security and regulations, you may find yourself needing to migrate your on-premises servers to a cloud service provider like Jotelulu.
And if you have never carried out a migration like this before, this can be a real headache, even for experienced IT technicians.
Here at Jotelulu, we are fully aware of this, so we have worked hard to make sure that your transition from a traditional model to a hybrid or 100% cloud model is as quick and pain-free as possible.
In this tutorial, we are going to explain how to migrate a virtual machine from a physical on-premises GNU/Linux server (although this process is also valid from any environment, including the cloud), and move it into the Jotelulu cloud.
How to migrate an on-premises GNU/Linux server to Jotelulu
Before you get started
To successfully complete this tutorial and migrate your on-premises GNU/Linux server to Jotelulu, you will need:
- To be registered on the platform and have logged in.
- To have a physical Linux server that you wish to migrate.
Part 1 – Start the migration process on the Jotelulu platform
To get started, load the Jotelulu platform and go to the Partner Area, click on Migration in the left-hand menu and click on “New Migration” (1).
NOTE: This page may look different if you have already performed previous migrations. In which case, they will be listed here.
Launch a new migration from the Jotelulu platform
You will now be guided through the process to prepare the system for the migration of your server to Jotelulu.
First, you need to select the type of server to migrate. Since we are migrating a server, you should select “Servers” (2) from the options shown.
Select the “Servers” option
Next, you need to specify whether your server is physical or virtual (3), which in this case will be “Virtual”.
Then, you will need to choose the format in which the server will be imported. Select “VHD – Disk Conversion” (4).
Similarly, you will need to select the way that the VHD will be uploaded to Jotelulu. Here, you should select FTP (5).
Next, you need to provide some details about the disk you are going to import (6):
- Name of imported file: which for this tutorial will have the extension “.raw”.
- Partition: whether it is a system disk (as it will be in this case) or a data disk.
- Disk display name: so that the imported file receives a specific name once it has been transferred to Jotelulu. This will be how you identify the file on the platform later.
To save your settings, click on “Create” (7).
Then, click on “Next” (8).
Part 1 – Select the location and format of the on-premises data
At this point, you will need to choose the organisation, subscription and availability zone (9) that you want to deploy the virtual machine on.
This will depend on how many organisations and subscriptions you have registered. If you do not have any subscriptions, you will be able to create a new one.
If you just have a single subscription, this will be your only choice. With respect to the availability zone, you can work in exactly the same way as with the other available services.
The last part of this process asks “Do you want to deploy a new server with the imported disks?” (10). If you do not wish to deploy the server, you can simply leave the uploaded image ready for future use. However, usually, the answer to this question will be “Yes”.
Part 1 – Select an organisation, subscription and availability zone
If you click on “Yes”, you will be then asked for a series of details to configure your new Jotelulu server.
First, you will have to give the server a name (11). This name can include spaces.
Next, you will have to select an operating system (12), which in this case will be GNU/Linux Ubuntu 18.4.
Then, you need to select a size for your new server (13), where you will specify the CPU and RAM that you need.
Lastly, you will need to select a network type (14), depending on whether you need a standard network or a VPC.
Once you have done all this, click on “Finish” (15)
Part 1 – Configure your new Jotelulu server
Once you finish this step, you will have configured your migration and a series of internal processes will run to deploy your new Jotelulu server, which will be available in your Servers subscription area.
In the summary of your migration details, you will also see the FTP connection details (16):
- FTP Server
Part 1- FTP server details and server information
At this point, you will need to provide the image to migrate and you will be able to monitor progress on the Jotelulu platform.
When this is complete, you will simply need to set a few final parameters and your VM will be fully up and running.
Part 2 – Copying the image of your GNU/Linux machine to the Jotelulu FTP directory
NOTE: Before performing this step, we recommend reviewing those elements that you might want to remove from the machine in order to keep the exported image as small as possible.
The first thing we need to do is check what disks the virtual machine has. If there are a number of disks, you will have to repeat this process for each one, remembering which disks are used for the system, startup and data. Once you have a clear idea of what disks there are, you should give them names accordingly.
In order to find out what disks are on the virtual machine, you should run the command “fdisk -l”(17).
In the screenshot below, you will see that everything is mounted on “/dev/sda1”, which means that, when cloning, it will be performed with “/dev/sda” as the device.
Part 2 – Check the disks that are on the virtual machine
Once you have a clear idea of the disk, which in this example is “/dev/sda” and is very likely the same as the machine, you need to launch a bit-for-bit copy using the “dd” command.
First, make a bit-for-bit image of the disk, copying it to another machine or another disk on the virtual machine. Once you have done this, we will copy it to the Jotelulu FTP server.
To generate the image, use the following command (18).
dd bs=<block size> if=<disk_to_migrate> | dd bs=<block size> of=<output file> conv=spare status=progress
- dd = Bit-for-bit copy command. It is used for many things, such as disk dumps.
- bs=1024: gives the size of the blocks that are copied each time. This format accelerates the copying process.
- if=/dev/sda: Represents the “input file”, which is the disk that we are cloning.
- of=<output file>: The file that will be generated. It will have the extension “.raw”.
- conv=spare: This is included in order to only copy the occupied disk space and ignore free space.
- status=progress: This is used to display the real-time progress of the file generation process.
In this example, it would be:
dd bs=1024 if=/dev/sda | dd bs=1024 of=/media/backups/ubuntu1804nacho.raw
As always, this will vary depending on your computing power and the size of the volume being cloned, so you’ll have to be patient.
Once this process has finished, we recommend checking that the file has been generated and seeing how much space it occupies. To do this, run the command “ls -lah” on the output folder, or, since in this example there was nothing in the destination disk, you could run “df -lh” (19).
Part 2 – Generate an image of the virtual machine
To copy the generated image to the Jotelulu FTP server, you will have to access the FTP directory using an FTP client program and then either upload the classic way or copy using the command line interface.
To upload using commands, you need to first establish a connection and then upload the file using FTP commands.
Below is the sequence of commands to use:
sftp -P 22 <FTP_USER>@<FTP_SERVER> (20)
put <IMAGE_FILE_LOCATION> (21)
- -P 22: Is used to connect using port 22.
- <FTP_USER>: Is the username that was provided at the end of the migration setup process.
- <FTP_SERVER>: Is the server that was provided at the end of the migration setup process.
- put: Is the command used in FTP to upload a file to the FTP server.
- <IMAGE_FILE_LOCATION>: Is the local file path where the image file is stored.
Part 2 – Connect to the FTP server and upload the image file
You have now finished this part of the process. After a short time, you will see a message on the Jotelulu platform asking you to configure some final parameters to have your virtual machine up and running.
Conclusions and next steps:
Migrating virtual machines between clouds tends to be complex. That is why, here at Jotelulu, we try to design our processes and tools to make everything as simple and comfortable as possible for our users.
PoAs a result, migrating an on-premises GNU/Linux server to Jotelulu is a very simple process, and the platform will guide you step by step. However, if you do have any problems, for whatever reason, please don’t hesitate to get in contact with us so that we can help you.
- Migration Tool Quick Start Guide
- How to Migrate a Server from VMWare to Jotelulu.
- How to Migrate a GNU/Linux Server from AWS to Jotelulu.
- How to Migrate an On-premises Windows Server to Jotelulu.
- How to Migrate a Virtual Machine from MS Azure to Jotelulu.
- How to Migrate a Server from Hyper-V to Jotelulu.
Welcome to Jotelulu!