02/13/2024
read 6 minutes

Migrating your infrastructure from ESXI to 3HСloud

/upload/iblock/ca6/n2cdhpjbhqkb79y001shxxuw1uwqoh57/Sover_opt.jpeg

Nowadays, businesses are realizing the benefits of cloud technologies and using them to improve their IT systems. Migrating virtual machines from an on-premises environment, such as ESXi, to a cloud environment can help achieve the goal.

  1. Preparing For Migration
  2. Installing The Required Set Of Utilities
  3. Image Saving And Converting
  4. Uploading The Image To Your Personal Account
  5. Done!

Preparing For Migration

With Windows and Linux OS, you need to take some steps before migrating virtual machines from ESXi to the cloud.

Our 3HCloud infrastructure supports two boot modes: Legacy and UEFI. The default boot mode is Legacy. It is used while creating a virtual server. To use UEFI boot mode, create a ticket to our technical support to request it.

We use Virtio device type to connect virtual machine disks. In this case, drivers for Virtio devices must be loaded into the OS in advance.

Installing The Required Set Of Utilities

Windows OS

Install virtio-win-guest-tools.exe, it includes a set of drivers and utilities. You can find the latest version here: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/.

Follow the steps below:

  • Launch the virtio-win-guest-tools.exe utility installation.
  • Agree to the license terms and click Install.
  • The utility will be successfully installed in the operating system, and you will be prompted to click Finish and Close when the installation is complete.

Then you should prepare the system for installation on a new hardware architecture. Microsoft provides a utility sysprep for this purpose. Press Windows+R, and in the command box, type sysprep.

In sysprep, do the following:

  • System Cleanup Action: enter System Out-of-Box Experience (OOBE).
  • Do not choose to Generalize.
  • Shutdown Options: Reboot.

After clicking OK, wait for the sysprep utility to complete and shut down the system.

RHEL-based OS (CentOS, AlmaLinux, Rocky)

Check the presence of Virtio drivers in the OS:

lsinitrd /boot/initramfs-<kernel.version>.img | grep -i virtio

<kernel.version> – current kernel version, which can be found with uname -r

If lsinitrd is not available in the OS, install the dracut:

yum install dracut

or for OS versions with package manager support dnf:

dnf install dracut

If Virtio drivers are missing in the .img image file, update the OS:

yum update

or for OS versions with package manager support dnf:

dnf update 

Add virtio modules to initramfs after updating the OS:

dracut --force --no-hostonly

Check that Virtio drivers appear in the image using lsinitrd as shown above.

Install the packages required for migration:

yum install -y acpid cloud-init qemu-guest-agent cloud-utils-growpart

or for OS versions with package manager support dnf:

dnf install -y acpid cloud-init qemu-guest-agent cloud-utils-growpart

Then you need to add the acpid and qemu-guest-agent packages to startup:

systemctl enable acpid qemu-guest-agent

Reboot the virtual machine to continue.

Debian Based OS (Debian, Ubuntu)

As for the RHEL-based OS, check the Virtio drivers:

lsinitrd /boot/initrd-<kernel.version> | grep -i virtio

<kernel.version>  – current kernel version, check with uname -r

If lsinitrd is not available in the OS, install the dracut package:

apt install dracut

Install the packages needed for migration:

apt install -y acpid cloud-init qemu-guest-agent cloud-guest-utils

Add the acpid and qemu-guest-agent packages to startup:

systemctl enable acpid qemu-guest-agent

Shut down the virtual machine and get to the next step.

Image Saving And Converting

In ESXi, select the section Virtual Machines, choose the VM you need, and click Export to save the image in ESXi.

Migrating your infrastructure from ESXI to 3HСloud

NB! To perform the export, the machine should be shut down.


Then, you can initiate the download of a VM file with the extension.vmdk. After clicking Export the image will be downloaded to the local machine.

Migrating your infrastructure from ESXI to 3HСloud

The downloaded .vmdk file is not suitable for upload to 3HCloud environment, convert it to RAW format before proceeding.

Windows OS

We recommend using StarWind V2V Image Converter while working on a local machine with Windows. Launch the app, specify the path to your .vdmk file, and then select Raw image as the new format. After conversion, the .raw file will appear in the same folder as the original .vmdk file.

Migrating your infrastructure from ESXI to 3HСloud

Launch the program and click Next > choose the image of the machine to convert  > specify the Raw image and click Next > wait for the conversion process.

You can upload the image to your 3HCloud personal account when the conversion is complete.

Linux OS

While working on a local machine with Linux OS, you can use the Linux virtual kernel module for conversion.

Installing KVM packages on RHEL-based OS:

$ sudo yum install qemu qemu-kvm libvirt-daemon libvirt-clients bridge-utils virt-manager

Installing KVM packages on Debian-based OS:

$ sudo apt install qemu qemu-kvm libvirt-daemon libvirt-clients bridge-utils virt-manager 

Image conversion:

qemu-img convert -f vmdk -O raw <file_name>.vmdk <file_name>.raw

You can upload the image to your 3HCloud personal account after the conversion is completed.

Uploading The Image To Your Personal Account

You can now upload an image up to 15 GB to your 3HCloud personal account. Read more on our documentation page.

If the image is over 15GB, contact our technical support by sending us a ticket with a link to the image. You can store the image on any third-party resource or in 3HCloud object storage.

After the upload, the image will be available in the Cloud > My images.

Done!

Migrating virtual machines from ESXi to 3HCloud is a key step in optimizing your infrastructure and taking advantage of cloud technologies. Proper preparation and conversion of the image to RAW format will allow you to migrate and get the advantages of 3HCloud for your business.



Interested in more insights and expertise? Subscribe to our newsletter and follow us on social media: LinkedIn, Facebook, Instagram.

News
30 April 202404/30/2024
Product digest quarter 1
5 April 202404/05/2024
read 1 minuteread 1 min
Introducing Our New Location in Kazakhstan
28 March 202403/28/2024
read 1 minuteread 1 min
3HCloud Brings GPU Servers to Miami