虚拟化容器,大数据,DBA,中间件,监控。

ESXI P2V Linux Error: Unable to reconfigure the destination virtual machine

21 03月
作者:admin|分类:容器虚拟化
The P2V conversion of Debian OS is not as straight forward as CentOS where you just need to click Next, Next,...Finished!!!...The conversion process is same for both, but the Debian conversion may fail during the final stages of conversion.

Issue

While doing P2V on aDebian/Ubuntu OS, the process fails at 99%.

Under log highlights, you could see the error"Error: Unable to reconfigure the destination virtual machine".

Under the conversion status, you will find the error:


FAILED: Anerror occurred during the conversion: 'GrubInstaller::InstallGrub:/usr/lib/vmware-converter/installGrub.sh failed with return code: 127, andmessage: Installing GRUB1 on (hd0)... /vmware-updateGrub.sh: 59: grub:
not foundError installing GRUB Error running vmware-updateGrub.sh through chroot into/mnt/p2v-src-root '

        If VMware conversionhas failed at 99%, that doesn't mean theconversion has failed completely. The copy of the physical machine will already be in thedestination when the process completes 95%. During the remaining 5%, the destination VM will be reconfigured. So, when the VM fails at 99% the possible point of failure will the reconfiguration of the destination VM.

         Coming to the causeof the failure, it is the incorrect version of grub installed in the destination VM. Debian flavors use grub version 2 while the converter installs grub version 1 in the VM. Since the process failed during the grub installation, the VMware converter fails to update /etc/fstab entry with the new UUID of the hard disk. If youtry to turn on the VM, you will be greeted by the message "error loading operatingsystem"  in a beautiful blackscreen.

Resolution

For resolving this issue you would need the Debian ISO. Download the latest stable version of Debian ISO and follow the below steps:
  • Check the root file system from the source (physical machine) using the command fdisk -l and note the device. (eg: /dev/sda1)
  • PowerOn the destination VM 
  • Boot from the Debian iso
  • Select'Rescue Mode' option from the menu
  • Choosethe option "Reinstall grub bootloader"
  • Give the device which holds the root file system (eg: /dev/sda1)
  • Choose the option "Initiateshell on /dev/sda1"
  • Update the new UUID in /etc/fstab using the below steps as the hard disk device of the machine would be different after the conversion:
    • Getthe new disk UUID using the command blkid
    • Open/etc/fstab and replace the UUID of the old disks with their new UUID
    • Removethe swap file system by commenting swap file system entries in the file andsave the file.
  • Update the file /boot/grub/grub.cfg with the correct UUID's for boot disk and save the file.
  • Disconnect the ISOand reboot the system.
浏览4794 评论0
返回
目录
返回
首页
How to P2V a Linux host in vSphere ESX P2V RedHat Linux Kernel Panic not syncing