ericwrosenberg
Contributor
Contributor

vCenter Converter Standalone fails at 97% p2v

Hello,

I am getting the following error at 97% when trying to p2v machines running Oracle Linux 7.x:

FAILED: An error occurred during the conversion: 'GrubInstaller::InstallGrub: /usr/lib/vmware-converter/installGrub.sh failed with return code: 1, and message: grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory. grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory. Error installing GRUB Command: grub2-install --force --no-floppy /dev/sda Error running vmware-updateGrub.sh through chroot into /mnt/p2v-src-root Command:
chroot "/mnt/p2v-src-root" /vmware-updateGrub.sh "GRUB2" "(hd0)" "(hd0,2)" /vmware-device.map "grub2-install" Installing GRUB2 on (hd0)... Installing GRUB2 on (hd0) failed. Installing GRUB2 on /dev/sda... '

I'm able to successfully v2v other Oracle Linux boxes so it does not seem to be a source OS issue. I'm wondering if it has to do with the bare metal machine being on UEFI vs BIOS.

Not sure what else to try, any help is appreciated.

Thanks

0 Kudos
5 Replies
patanassov
VMware Employee
VMware Employee

Hello

Converter runs grub2-install on the destination machine but uses whatever files happen to be on the source machine. The error is quite clear:grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist

Check the wanted file on the source; perhaps it is in a different directory. Copy it to where it is needed if so. Try to dry run grub2-install on the source machine (careful to not corrupt it!) to see whether all dependencies are fine and then convert again. Alternatively (and more safely) do these experiments on the target machine if it has not been deleted; you will need to boot from an live ISO to do that.

HTH,

Plamen

0 Kudos
bggold
Contributor
Contributor

I am having the same issue on oracle linux 7.6.  The converter is looking for the file in "/usr/lib/grub/x86_64-efi/" but the source server has it here "/usr/lib/grub/i386-pc/".

I already checked on other physical and virtual(not converted) oracle linux 7.6 servers and they all have it in the i386-pc folder.  I thought it might have been changed during setup.

Any ideas on how to fix this so that it will finish?  I fails at the point where there is not even a failed vm to be able to boot with resue.

Thanks

0 Kudos
tniira
Contributor
Contributor

@bggold, did you ever resolve the issue with OL 7.6? I am facing exactly the same issue. Any help would be highly appreciated. Thanks!

 

 

 

0 Kudos
ericwrosenberg
Contributor
Contributor

@tniira @bggold Hi, I revisited this just the other day and came up with a workaround, I copied modinfo.sh from another OEL machine in the directory /usr/lib/grub/i386-pc/ and created the following directory which did not exist on the source machine: /usr/lib/grub/x86_64-efi/  and placed modinfo.sh in the newly created directory. When I tried the conversion again I got past the modinfo.sh file does not exist error but received the following:FAILED: An error occurred during the conversion:

'GrubInstaller::InstallGrub: /usr/lib/vmware-converter/installGrub.sh failed with return code: 1, and message: Installing for i386-pc platform. grub2-install: error: cannot open `/usr/lib/grub/x86_64-efi/moddep.lst': No such file or directory. Installing for i386-pc platform. grub2-install: error: cannot open `/usr/lib/grub/x86_64-efi/moddep.lst': No such file or directory. Error installing GRUB Command: grub2-install --force --no-floppy /dev/sda Error running vmware-updateGrub.sh through chroot into /mnt/p2v-src-root Command:
chroot "/mnt/p2v-src-root" /vmware-updateGrub.sh "GRUB2" "(hd0)" "(hd0,2)" /vmware-device.map "grub2-install" Installing GRUB2 on (hd0)... Installing GRUB2 on (hd0) failed. Installing GRUB2 on /dev/sda... '

 

I went back to the OEL machine that I had copied modinfo.sh from and sure enough in that same directory, I found moddep.lst. I figured I'd copy moddep.lst from that machine to my source machine along with the rest of the  /usr/lib/grub/i386-pc/ directory to the source machine in the new directory that I had created: /usr/lib/grub/x86_64-efi/.

I kicked off another convert job and this time it completed successfully!

I know it's a bit of a hack, but it worked.

I also ran into errors in grub.cfg that caused me to have to intervene to get they system to get to the grub menu. The issue was caused by the converter commenting out lines with the wrong syntax as mentioned in this thread: https://communities.vmware.com/t5/Converter-Standalone-Discussions/VMware-Converter-Standalone-comme... once I removed the comment entries, the system booted up normally.

Hope this spares others some pain in dealing with these issues. 

 

Best,

Eric

0 Kudos
GasparYYC
Contributor
Contributor

Maybe too late to the party, but here it is for posterity:

 

In my case I was trying to convert a Centos 6.5 and got this error:

FAILED: An error occurred during the conversion: 'GrubInstaller::InstallGrub: /usr/lib/vmware-converter/installGrub.sh failed with return code: 1, and message: grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory. grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory. Error installing GRUB Command: grub2-install --force --no-floppy /dev/sda Error running vmware-updateGrub.sh through chroot into /mnt/p2v-src-root Command:
chroot "/mnt/p2v-src-root" /vmware-updateGrub.sh "GRUB2" "(hd0)" "(hd0,2)" /vmware-device.map "grub2-install" Installing GRUB2 on (hd0)... Installing GRUB2 on (hd0) failed. Installing GRUB2 on /dev/sda... '

 

The workaround to make it work is this:
1. Create the folder x86_64-efi and copy the contents from i386-pc:

cd /usr/lib/grub
cp -r i386-pc x86_64-efi

2. Make the file executable:

chmod 755 /usr/lib/grub/x86_64-efi/modinfo.sh

 

After that the conversion completed succesfully. 

Aside from the wrinkle, pretty impressive the Converter Standalone App!

 

 

0 Kudos