Converting HyperV to ESXi

Discussion in 'VMware, VirtualBox, Citrix' started by matkisson, Jan 2, 2019.

  1. matkisson

    matkisson New Member

    Apr 11, 2017
    Likes Received:
    This really is just an FYI post incase anyone searches for an issue like this.

    I recently decided to migrate my HyperV infrasture to my ESXi (6.7) server to consolidate my server rack. Including rewiring my entire network. The VM in question is a Plex media server running on RHEL 7.6 on 2012 HyperV. All setting were default when I created the VM, nothing special. I tried to use the VMware converter software but when I booted the VM on the ESX/vSphere server, the VM would fail to detect a bootable VHD and boot the the EFI firmware. After multiple attempts, changing a few options in the HyperV config each time, I decided to think outside the box. I managed to get the VM to boot but it would fail to detect LVMs, despite following the RH solution (Kernel panic on boot following "dracut Warning: LVM rootvg/rootlv not found" - Red Hat Customer Portal).

    At this point I was convinced that the conversion was unable to account for some settings.

    The final solution:

    Convert the HyperV VM to a VMware Workstation export.
    Remove all drives from the VM
    Add the VMDK as an IDE hard drive.
    *For compatability, set the proper guest operating system (RHEL 7 64-bit)
    Upgrade VM compatability to Workstation 14/ESXi 6.7
    Connect VMware Workstation to the ESXi/vSphere server and upload the VM
    On the ESXi/vSphere server, remove the NICs currently on the VM (they are incompatible) and add a new NIC (VMXNET3 preferably)
    Power on the VM and expect some services to fail.
    Determine the interface name and use NMTUI to add and configure the connection.

    This took almost 3 hours for me to figure out but hopefully it helps someone.
    mathiastro likes this.
  2. msg7086

    msg7086 Member

    May 2, 2017
    Likes Received:
    For migrating Linux servers like this, I'd prefer to bring up rescue CD on both VM, and do a full drive rsync. After files are copied, chroot into the new root and update grub and fstab. It shouldn't take 3 hours. Besides, that's a free file defragmentation.
  3. Stephan

    Stephan IT Professional

    Apr 21, 2017
    Likes Received:
    Not sure if rsync copies ACLs or xattrs... Linux has gotten more complicated since the advent of capabilities. Here is my tar-only solution (root and one UEFI boot):

    tar --one-file-system --numeric-owner --acls --xattrs --xattrs-include='*' --warning=no-file-ignored --totals -czpSf data.tgz /boot /
    (started in /mnt/othervolume)

    And back: tar --xattrs --xattrs-include='*' --acls -xvzpf data.tgz -C /root/1

    provided your new root+boot is mounted in /root/1/ and /root/1/boot already. If you use PARTUUIDs in /etc/fstab, make sure to run blkid and change the IDs to the new ones. I am only using systemd-boot any more on UEFI systems, so no grub necessary.
  4. EffrafaxOfWug

    EffrafaxOfWug Radioactive Member

    Feb 12, 2015
    Likes Received:
    -A to include ACLs, -X to include xattrs. I usually always use -aHAX where you might ordinarily just use -a.

    Be warned that since you're using -x/--one-file-system only the root partition would be included, any sub-partitions for /var or /home or whatever would also need to be done.
Similar Threads: Converting HyperV
Forum Title Date
VMware, VirtualBox, Citrix VMware vSphere Hypervisor (ESXi) and vCenter Server 6.7U1 released Oct 16, 2018
VMware, VirtualBox, Citrix NO CPU Utilization after hypervisor.cpuid.v0=FALSE May 21, 2018
VMware, VirtualBox, Citrix Hypervisor Choice Sep 12, 2015
VMware, VirtualBox, Citrix Home Virtualization Storage / Trying out different hypervisors Sep 3, 2015
VMware, VirtualBox, Citrix ESXi (or any other Hypervisor) and SMB3 Multichannel Aug 6, 2014

Share This Page