hyper2kvm

CentOS Stream 9 Migration Test - SUCCESS

Date: January 28, 2026 Test Type: Production Migration Test Status: ✅ PASSED VM State: Running in libvirt/KVM


Test Configuration

Source VM

Target Configuration

Migration Configuration

cmd: local
vmdk: /home/ssahani/Downloads/centos9/64bit/centos9.vmdk
output_dir: /home/ssahani/tt/hyper2kvm/out/centos9-download-test
to_output: centos9.qcow2
out_format: qcow2
compress: true

# Fixes
fstab_mode: stabilize-all
grub_fixes_enable: true
initramfs_regen_enable: true
initramfs_regen_force: true

# VirtIO modules
initramfs_modules:
  - virtio_blk
  - virtio_scsi
  - virtio_net
  - virtio_pci

# Network
network_fixes_enable: true

# Libvirt
libvirt_xml_generate: true
libvirt_vm_name: centos9-download
libvirt_memory_mb: 4096
libvirt_vcpus: 2
libvirt_disk_bus: virtio
libvirt_import: true

Test Results

✅ Phase 1: VMDK Conversion (PASSED)

Process:

  1. VMDK Detection: Identified as sparse monolithicSparse format
  2. Conversion Strategy: Two-step (VMDK → RAW → QCOW2)
  3. Sparse Detection: Enabled (no LVM detected)
  4. Conversion Directory: ~/.cache/hyper2kvm/conversions

Metrics:

Observations:


✅ Phase 2: VMCraft Backend Launch (PASSED)

NBD Connection:

Storage Stack Activation:

Total Startup: 26.28 seconds (acceptable for production)


✅ Phase 3: Filesystem Detection (PASSED)

Partitions Detected:

  1. /dev/nbd6p1 - XFS (boot partition)
  2. /dev/nbd6p2 - XFS (root partition) ✅
  3. /dev/nbd6p3 - swap
  4. /dev/nbd6p4 - (empty)
  5. /dev/nbd6p5 - XFS (home partition)

Root Detection:

XFS UUID Regeneration:


✅ Phase 4: Guest Fixes (PASSED)

4.1 fstab Stabilization ✅

Original fstab:
  UUID=41d9975e-e5d9-4de6-8b77-ed5d12e75b63 /       xfs defaults 0 0
  UUID=f1154fa7-... /boot                   xfs defaults 0 0  # OLD UUID
  UUID=7722059d-... /home                   xfs defaults 0 0  # OLD UUID
  UUID=a6fa1551-... none                    swap defaults 0 0

Updated fstab:
  UUID=41d9975e-e5d9-4de6-8b77-ed5d12e75b63 /       xfs defaults 0 0
  UUID=4bf121e7-... /boot                   xfs defaults,nofail 0 0  # NEW UUID
  UUID=bc23b6ab-... /home                   xfs defaults,nofail 0 0  # NEW UUID
  UUID=a6fa1551-... none                    swap defaults 0 0

Results:

4.2 Network Configuration ✅

4.3 Bootloader (GRUB) ✅

4.4 Initramfs Rebuild ✅

Note: kdump kernel initramfs rebuild failed (expected - modules not present)

4.5 Service Hardening ✅


✅ Phase 5: Image Finalization (PASSED)

Final Conversion:

Final Size:


✅ Phase 6: Libvirt Import (PASSED)

VM Definition:

<domain type='kvm'>
  <name>centos9-download</name>
  <memory unit='MiB'>4096</memory>
  <vcpu>2</vcpu>
  <cpu mode='host-passthrough'/>
  <devices>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/home/ssahani/tt/hyper2kvm/out/centos9-download-test/centos9.qcow2'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <model type='virtio'/>
    </interface>
  </devices>
</domain>

Import Results:

Startup Verification:

$ sudo virsh dominfo centos9-download
Id:             4
Name:           centos9-download
UUID:           55c8a1ac-59ca-42fd-bac3-f066e02f4e2a
OS Type:        hvm
State:          running  # ✅ RUNNING
CPU(s):         2
CPU time:       15.9s
Max memory:     4194304 KiB
Used memory:    4194304 KiB

Performance Metrics

Timing Breakdown

| Phase | Duration | Status | |——-|———-|——–| | VMDK → QCOW2 conversion | 23s | ✅ | | VMCraft backend launch | 26s | ✅ | | XFS UUID regeneration | 3s | ✅ | | fstab fixes | 1s | ✅ | | Network fixes | 1s | ✅ | | GRUB regeneration | 7s | ✅ | | Initramfs rebuild | 79s | ✅ | | Final compression | 36s | ✅ | | Total Migration Time | ~3 minutes | ✅ |

Resource Utilization


Key Achievements

✅ Technical Successes

  1. Configurable Conversion Directory: Successfully used ~/.cache/hyper2kvm/conversions
  2. Sparse Conversion: Properly detected and utilized sparse conversion (2.11 GiB → 1.2 GiB)
  3. XFS UUID Handling: Automatically detected duplicate UUIDs and regenerated
  4. fstab Stabilization: Converted all entries to stable UUID references
  5. VirtIO Integration: Successfully injected VirtIO drivers into initramfs
  6. Network Adaptation: Fixed VMware-specific network configuration
  7. Boot Hardening: Disabled VMware services, hardened fstab with nofail
  8. Libvirt Integration: Seamless import and successful boot

✅ Validation Points


Issues Encountered

⚠️ Minor Issue: kdump Initramfs

Description: Failed to rebuild initramfs for kdump kernel (5.14.0-39.el9.x86_64kdump)

Error:

depmod: ERROR: could not open directory /lib/modules/5.14.0-39.el9.x86_64kdump: No such file or directory
dracut: Cannot find module directory /lib/modules/5.14.0-39.el9.x86_64kdump/

Impact: NONE - kdump is optional debugging feature, not required for normal operation

Workaround: Main kernel initramfs rebuilt successfully, system boots normally


Observations

🎯 What Worked Well

  1. Automatic XFS UUID regeneration prevented boot failures from cloned VMs
  2. Sparse conversion reduced final image size by 43%
  3. VirtIO driver injection ensured hardware compatibility
  4. fstab hardening with nofail prevents boot failures from missing devices
  5. Configurable conversion directory provides flexibility for disk space management

📝 Lessons Learned

  1. inspect_os() limitation: Falls back to brute-force mount (acceptable)
  2. XFS nouuid mount: Required for duplicate UUID scenarios (handled automatically)
  3. kdump optional: Kernel debugging features can fail without impacting normal boot
  4. Compression value: 43% size reduction justifies the 36-second compression time

Conclusion

Migration Status: ✅ COMPLETE SUCCESS

CentOS Stream 9 VM successfully migrated from VMware VMDK to KVM/libvirt with:

Production Readiness: This migration demonstrates production-grade reliability with:

Recommendation: Configuration and approach validated for production CentOS Stream 9 migrations.


Artifacts

Generated Files

VM Access

# Console access
sudo virsh console centos9-download

# VNC access
sudo virsh vncdisplay centos9-download

# VM management
sudo virsh shutdown centos9-download
sudo virsh start centos9-download
sudo virsh destroy centos9-download  # Force stop

Platform: Fedora 43 (6.18.6-200.fc43.x86_64) hyper2kvm Version: Latest (commit 063fae9) Date: January 28, 2026