Skip to main content

Command Palette

Search for a command to run...

How to Migrate a Linux VM from VMware ESXi 8 to SolusVM2 (KVM) with LVM: Step-by-Step Using QCOW2 and Troubleshooting Dracut/LVM Boot Errors

A Step-by-Step Guide to Moving Linux VMs from VMware ESXi 8 to SolusVM2 (KVM)

Updated
6 min read
How to Migrate a Linux VM from VMware ESXi 8 to SolusVM2 (KVM) with LVM: Step-by-Step Using QCOW2 and Troubleshooting Dracut/LVM Boot Errors

Migrating a Linux VM from ESXi 8 to SolusVM2 (KVM) can involve a few tricky steps, especially if your guest system uses LVM for storage. This blog post demonstrates the full migration workflow using demo filenames, and covers how to resolve common boot issues like dracut-initqueue timeouts related to missing LVM volumes.


1. Understanding the ESXi VM Disk Files

In your ESXi VM folder, you’ll typically see files such as:

  • demo-vm_1.vmdk (small descriptor file)

  • demo-vm_1-flat.vmdk (large disk data file)

For migration, you only need the matching descriptor and flat file for the active disk.


2. Preparing the Migration

Step 1: Copy VMDK Files to a Linux Machine

First, transfer the disk files from your ESXi server to a local Linux system using SCP/NFS:

scp root@esxi-host:/vmfs/volumes/.../demo-vm_1.vmdk /tmp/
scp root@esxi-host:/vmfs/volumes/.../demo-vm_1-flat.vmdk /tmp/

The descriptor (demo-vm_1.vmdk) must reference the demo-vm_1-flat.vmdk file and both should be in the same directory for conversion.


Step 2: Convert VMDK to QCOW2 Format

SolusVM2 (KVM) works best with QCOW2 disk images. Use qemu-img to convert:

sudo apt update
sudo apt install qemu-utils
cd /tmp
qemu-img convert -f vmdk -O qcow2 demo-vm_1.vmdk demo-vm_1.qcow2

The resulting demo-vm_1.qcow2 contains your VM’s disk, ready for import.


3. Importing to SolusVM2

Step 3: Upload QCOW2 Image to SolusVM2 Node

Transfer your QCOW2 disk to the KVM node’s image directory:

scp demo-vm_1.qcow2 root@solusvm-kvm-node:/var/lib/libvirt/images/

Step 4: Create the VM in SolusVM2

  • Log in to the SolusVM2 admin panel.

  • Create a new KVM VM, setting CPU, RAM, and Network as needed.

  • For disk, select “use existing image” if available, or create a VM with a blank disk and replace that disk file with your demo-vm_1.qcow2 via SSH.

  • Ensure the disk file ownership is correct (e.g., chown qemu:qemu demo-vm_1.qcow2).


4. Troubleshooting Dracut Initqueue Timeout (LVM Boot Issues)

The Problem

After migration, you may encounter errors like:

dracut-initqueue: timeout, still waiting for following initqueue hooks: /dev/mapper/demo-root /dev/demo-vg/swap

This means the initramfs (dracut) cannot find the root and swap LVM volumes.

Step 5: Recovery Workflow

A. Boot into Rescue Mode

  • If you’re dropped into a dracut:/# shell, you can start recovery directly.

  • Otherwise, boot from a rescue ISO (CentOS, AlmaLinux, Rocky, Fedora, etc.)

B. Check Disk Detection

lsblk
fdisk -l

If the disk isn’t detected, try changing the VM’s disk controller (Virtio, SATA, SCSI) in SolusVM2.

C. Scan and Activate LVM Volumes

vgscan
lvscan
vgchange -ay

If /dev/mapper/demo-root and /dev/demo-vg/swap appear, your volumes are present.

D. Inspect and Fix /etc/fstab and GRUB

Mount your root volume:

mount /dev/demo-vg/root /mnt
cat /mnt/etc/fstab
  • Ensure device names or UUIDs match the actual LVM devices (blkid helps).

  • Update /etc/fstab if needed.

E. Rebuild Initramfs

Chroot into your root volume and rebuild the initramfs for new hardware config:

mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
dracut --force
exit
umount /mnt/{dev,proc,sys}
umount /mnt

F. Update GRUB Bootloader (Optional)

chroot /mnt
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/vda  # or your disk device
exit

G. Reboot and Test

Reboot the VM. If boot fails, repeat the checks above.


5. Tips and Common Pitfalls

  • Disk Not Detected? Change SolusVM2 disk bus to Virtio, SATA, or SCSI.

  • LVM Names Changed? Check with vgs and lvs and update /etc/fstab.

  • UUID Mismatch? Use blkid to verify and fix /etc/fstab.

  • LVM Not Activating? Force scan or review /etc/lvm/lvm.conf.


6. Conclusion

Migrating a Linux VM from ESXi to SolusVM2 using QCOW2 is a reliable process if you prepare disk files properly and understand storage layers. The most common post-migration issue is dracut failing to find your LVM root volume—address this by scanning/activating LVM, rebuilding initramfs, and verifying disk controller compatibility.

CONTACT:

I’m Kumar Bishojit Paul, the Founder and CEO of BIKIRAN. If you need further assistance, please leave a comment. I’m interested in helping you.

Follow these steps for a seamless migration and fast recovery from boot issues!



🏢 About Bikiran

Bikiran is a software development and cloud infrastructure company founded in 2012, headquartered in Khulna, Bangladesh. With 15,000+ clients and over a decade of experience, Bikiran builds and operates a suite of products spanning domain services, cloud hosting, app deployment, workflow automation, and developer tools.

SL Topic Product Description
1 Website Bikiran Main platform — Domain, hosting & cloud services
2 Website Edusoft Education management software for institutions
3 Website n8n Clouds Managed n8n workflow automation hosting
4 Website Timestamp Zone Unix timestamp converter & timezone tool
5 Website PDFpi Online PDF processing & manipulation tool
6 Website Blog Technical articles, guides & tutorials
7 Website Support 24/7 customer support portal
8 Website Probackup Automated database backup for SQL, PostgreSQL & MongoDB
9 Service Domain Domain registration, transfer & DNS management
10 Service Hosting Web, app & email hosting on NVMe SSD
11 Service Email & SMS Bulk email & SMS notification service
12 npm Chronopick Date & time picker React component
13 npm Rich Editor WYSIWYG rich text editor for React
14 npm Button Reusable React button component library
15 npm Electron Boilerplate CLI to scaffold Electron.js project templates
16 NuGet Bkash bKash payment gateway integration for .NET
17 NuGet Bikiran Engine Core .NET engine library for Bikiran services
18 Open Source PDFpi PDF processing tool — open source
19 Open Source Bikiran Engine Core .NET engine — open source
20 Open Source Drive CLI CLI tool to manage Google Drive from terminal
21 Docker Pgsql Docker setup for PostgreSQL
22 Docker n8n Docker setup for n8n automation
23 Docker Pgadmin Docker setup for pgAdmin
24 Social Media LinkedIn Bikiran on LinkedIn
25 Social Media Facebook Bikiran on Facebook
26 Social Media YouTube Bikiran on YouTube
27 Social Media FB n8nClouds n8n Clouds on Facebook

Questions, comments, or troubleshooting tips? Add them below!