P2V conversion of an Ubuntu 12.04 virtual machine using VMware vCenter Converter Standalone fails at 97% with the error: Error installing GRUB Command
search cancel

P2V conversion of an Ubuntu 12.04 virtual machine using VMware vCenter Converter Standalone fails at 97% with the error: Error installing GRUB Command

book

Article ID: 340679

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction





Symptoms:
  • Cannot perform a P2V conversion of an Ubuntu 12.04 virtual machine
  • Performing a physical to virtual conversion of an Ubuntu virtual machine fails
  • P2V conversion of an Ubuntu 12.04 virtual machine fails at 97%
  • You see the error:

    FAILED: An error occurred during the conversion: 'GrubInstaller::InstallGrub: /usr/lib/vmware-converter/installGrub.sh failed with return code: 1, and message: Installing GRUB2 on (hd0)... /usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!. /usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. /usr/sbin/grub-setup: error: will not proceed with blocklists. Installing GRUB2 on (hd0) failed. Installing GRUB2 on /dev/sda... /usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!. /usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. /usr/sbin/grub-setup: error: will not proceed with blocklists. Error installing GRUB Command:
  • In the vmware-converter-server-x.log file, you see entries similar to:

    --> Installing GRUB2 on (hd0)...
    --> /usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!.
    --> /usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
    --> /usr/sbin/grub-setup: error: will not proceed with blocklists.
    --> Installing GRUB2 on (hd0) failed.
    --> Installing GRUB2 on /dev/sda...
    --> /usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!.
    --> /usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
    --> /usr/sbin/grub-setup: error: will not proceed with blocklists.
    --> Error installing GRUB
    --> Command: grub-install --no-floppy /dev/sda


Environment

VMware vCenter Converter Standalone 5.1.x

Cause

This issue occurs if the BIOS boot partition required by GUID Partition Table (GPT) is missing.
This issue occurs because the converter had failed to create the BIOS boot partition at the destination helper virtual machine.

Resolution

To resolve this issue, you must create a boot partition.
To create the boot partition:
  1. Mount the original Linux distribution DVD on the virtual machine and boot from DVD.
  2. Select the rescue option from the boot menu.
  3. Identify the disk containing the root file system.
  4. Select the option to initiate a shell.
  5. Fix the BIOS boot partition.

    To fix the BIOS boot partition, run these commands:

    1. root@ubuntu:~# parted /dev/sda
    2. (parted) unit MB
    3. (parted) p free

      You see output similar to:

      Model: Areca ARC-1210-VOL#00 (scsi)
      Disk /dev/sda: 4000000MB
      Sector size (logical/physical): 512B/512B
      Partition Table: gpt
      Number Start End Size File system Name Flags
      1 0.02MB 4000MB 4000MB linux-swap(v1)
      2 4000MB 4300MB 300MB ext3 boot
      3 4300MB 104300MB 100000MB ext3
      104300MB 4000000MB 3895700MB Free Space

    4. (parted) mkpart primary 104300 104400
    5. (parted) p

      You see output similar to:

      Model: Areca ARC-1210-VOL#00 (scsi)
      Disk /dev/sda: 4000000MB
      Sector size (logical/physical): 512B/512B
      Partition Table: gpt
      Number Start End Size File system Name Flags
      1 0.02MB 4000MB 4000MB linux-swap(v1)
      2 4000MB 4300MB 300MB ext3 boot
      3 4300MB 104300MB 100000MB ext3
      4 104301MB 104400MB 99.6MB primary

    6. (parted)set 4 bios_grub on

      Note: This command enables the partition as a BIOS boot partition.

    7. (parted) q

  6. Run this command to install grub:

    root@debian:~# grub-install /dev/sda

  7. Update the UUID in the /etc/fstab file.

    To update the UUID in the /etc/fstab file:
    1. Run the blkid command and identify the new UUID for the boot disk. Also, note the UUIDs of additional disk devices, if any.
    2. Edit the /etc/fstab file using a text editor.
    3. Replace the UUIDs of the boot disk with the correct UUIDs identified in Step 7a.
    4. Replace UUIDs for other devices, if any.
    5. Save and close the file.
    6. Update the /boot/grub/grub.cfg file with correct UUIDs for the boot disk.

  8. Disconnect the DVD from virtual machine and then reboot the virtual machine.



Additional Information



使用 VMware vCenter Converter Standalone 对 Ubuntu 12.04 虚拟机执行 P2V 转换时在进行到 97% 时失败,并显示以下错误:安装 GRUB 命令时出错
VMware vCenter Converter Standalone を使用した Ubuntu 12.04 仮想マシンの P2V 変換が、「GRUB コマンドのインストールのエラー」というエラーで 97% の確率で失敗する