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:
Mount the original Linux distribution DVD on the virtual machine and boot from DVD.
Select the rescue option from the boot menu.
Identify the disk containing the root file system.
Select the option to initiate a shell.
Fix the BIOS boot partition.
To fix the BIOS boot partition, run these commands:
root@ubuntu:~# parted /dev/sda
(parted) unit MB
(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
(parted) mkpart primary 104300 104400
(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
(parted)set 4 bios_grub on
Note: This command enables the partition as a BIOS boot partition.
(parted) q
Run this command to install grub:
root@debian:~# grub-install /dev/sda
Update the UUID in the /etc/fstab file.
To update the UUID in the /etc/fstab file:
Run the blkid command and identify the new UUID for the boot disk. Also, note the UUIDs of additional disk devices, if any.
Edit the /etc/fstab file using a text editor.
Replace the UUIDs of the boot disk with the correct UUIDs identified in Step 7a.
Replace UUIDs for other devices, if any.
Save and close the file.
Update the /boot/grub/grub.cfg file with correct UUIDs for the boot disk.
Disconnect the DVD from virtual machine and then reboot the virtual machine.