VMware Converter: CentOS 7 P2V Fails to Boot with 'Operating System Not Found'
search cancel

VMware Converter: CentOS 7 P2V Fails to Boot with 'Operating System Not Found'

book

Article ID: 412471

calendar_today

Updated On:

Products

Converter VMware vCenter Server

Issue/Introduction

After performing a Physical to Virtual (P2V) conversion of a CentOS 7 Linux machine using VMware Converter, the resulting virtual machine fails to boot, displaying an "Operating System not found" error. This typically occurs when the source physical machine used a GPT partition table with both BIOS and EFI boot components, but VMware Converter incorrectly converted the target virtual disk to an MBR (DOS-labeled) partition scheme, creating an incompatible boot environment for the chosen VM firmware.

  • The physical machine powered on has the below partition:
  • The converted virtual machine displays an "Operating System not found" or similar boot error message.
  • Upon inspection of the VM's disk (e.g., using fdisk -l from a rescue environment), the disk is found to have an MBR (DOS) partition label instead of GPT.
  • The VM's boot options might default to EFI, despite the disk's MBR format.
  • VMware Converter worker logs may show entries similar to these during the conversion process:
    2025-09-16T04:55:46.475+02:00 warning vmware-converter-worker[05652] [Originator@6876 sub=Default] [MoveActiveDiskIfNeeded] GetFirstBootDisk failed, mntapi error: 176 

    2025-09-16T04:55:46.553+02:00 warning vmware-converter-worker[05652] [Originator@6876 sub=Default] Partition:Invalid sector magic number.

    2025-09-16T04:55:46.585+02:00 warning vmware-converter-worker[05652] [Originator@6876 sub=Default] Partition:Invalid sector magic number.

Environment

vCenter Converter Standalone 6.6

Cause

The primary cause is a mismatch between the source physical machine's complex boot configuration (GPT with both BIOS and EFI capabilities) and the VMware Converter's handling during the P2V process.

While Converter might detect the firmware as EFI, it erroneously converts the disk to an MBR (DOS-labeled) partition scheme with a single partition, which is incompatible with an EFI boot environment. The converted disk lacks the necessary EFI System Partition (ESP) for UEFI booting, and the MBR itself does not contain a properly installed GRUB bootloader for a BIOS-based boot.

This results in a VM configured with EFI firmware attempting to boot from an MBR disk without a proper EFI bootloader, or an MBR disk that is missing the GRUB bootloader in its Master Boot Record that a BIOS-based VM expects. The resolution involves forcing the VM to use BIOS firmware and reinstalling GRUB to the MBR of the converted virtual disk.

Resolution

The solution involves changing the virtual machine's firmware type to BIOS and then reinstalling GRUB2 into the Master Boot Record (MBR) of the converted disk.

1. Change Virtual Machine Firmware to BIOS:

Before attempting to boot or repair, ensure the VM is configured to use BIOS firmware instead of EFI.

  • Power off the converted virtual machine.
  • In vCenter or on the ESXi host client, right-click the VM > Edit Settings.
  • Navigate to the VM Options tab.
  • Expand Boot Options.
  • Under Firmware, select BIOS (Recommended).
  • Click OK to save the changes.

2. Reinstall GRUB2 to the Master Boot Record (MBR):

This procedure uses a CentOS 7 rescue environment to chroot into the converted operating system and reinstall GRUB.

  • a. Attach CentOS 7 Installation Media:

    • Attach the CentOS 7 ISO image (matching the converted OS version) to the VM's CD/DVD drive.
    • Configure the VM's boot order to boot from the CD/DVD drive first.
  • b. Boot into Rescue Mode:

    • Start the VM.
    • At the GRUB boot menu, select Troubleshooting > Rescue a CentOS system.
    • Follow the prompts. When asked if you want to mount your system, choose "Skip" or "Continue" (if it offers to mount to /mnt/sysimage, accept it). You'll eventually be dropped to a shell prompt. If it automatically mounts to /mnt/sysimage, you will directly chroot /mnt/sysimage later.
  • c. Manually Mount and Chroot (if not automatically mounted):

    • Identify your root partition. Typically, it will be /dev/sda1 in a single-partition MBR setup.
    • Execute the following commands to prepare the chroot environment:
    # Mount the root partition
    mount /dev/sda1 /mnt/
    
    # Bind mount essential system directories
    mount --bind /dev /mnt/dev
    mount --bind /proc /mnt/proc
    mount --bind /sys /mnt/sys
    
    # Chroot into your installed system
    chroot /mnt
    
  • d. Install and Configure GRUB2:

    • Once inside the chroot environment, install GRUB2 to the Master Boot Record of the disk (/dev/sda).
    • Generate the GRUB2 configuration file:
    grub2-install /dev/sda
    grub2-mkconfig -o /boot/grub2/grub.cfg
    • Note: If grub2-install reports any errors, ensure /dev/sda is the correct disk device for the VM and that the partitions are correctly detected.
  • e. Exit and Reboot:

    • Exit the chroot environment:
    exit
    • Reboot the VM. Remember to detach the CentOS 7 ISO from the VM's CD/DVD drive before the reboot or change the boot order back to disk first.

After these steps, the virtual machine should now boot correctly from its MBR-partitioned disk using the BIOS firmware

 

Note: Please reach-out to your Linux Admin before proceeding with the above steps.