VMware Cloud Community
McServer
Contributor
Contributor
Jump to solution

Linux VM Ubuntu conversion failed at 98% grub error

The system is an ubuntu 10 system. The error I get is "FAILED: An error occurred during the conversion: 'GrubInstaller::InstallGrub: /usr/lib/vmware-converter/installGrub.sh failed with return code: 127, and message: Installing GRUB1 on (hd0)... /vmware-updateGrub.sh: 59: grub:
not found Error installing GRUB Error running vmware-updateGrub.sh through chroot into /mnt/p2v-src-root '"

The log highlights show "Error: Unable to configure the destination virtual machine"

I was so thrilled when I saw how fast the conversion was moving along. I am using vCenter Converter Standalone 5. I know I've been asking a lot of questions over the past few days and I really really appreciate all the help. Please, help me again!! Thanks,

Reply
0 Kudos
1 Solution

Accepted Solutions
ivivanov
VMware Employee
VMware Employee
Jump to solution

This syntax works for me. You don't need to edit grub.cfg file, but grub-install script, which (in my case) is under /usr/sbin/grub-install. You need to put these lines at the top of the file (well, after the #!/bin/sh line).

The idea is that Converter is running grub-install -v to detect the version and in this manner we are returning a GRUB2 version in a recognizable format, so it can detect the version properly and proceed correctly further.

__________
It is worse!

View solution in original post

Reply
0 Kudos
8 Replies
ivivanov
VMware Employee
VMware Employee
Jump to solution

It looks the GRUB version on the source has been detected as GRUB1, however Ubuntu 10.x is shipped with GRUB2. You may want to look at this thread http://communities.vmware.com/message/1884331#1884331 and see whether the workaround is good enough for you. If it doesn't fix your problem, you should export the logs of the failed task in order to diagnose the problem (switch the GUI to task view, right-click on the failed task and select "Export logs" command).

__________
It is worse!
Reply
0 Kudos
McServer
Contributor
Contributor
Jump to solution

I'll have a look and report back here. Hopefully the workaround will function for me as sending the log files would first require me to go through them and remove any proprietary info. Thanks for getting back to me. I'll let you know how it turns out... if it does come down to the log files is there anyway of telling which one you would need (would make going though them easier).

Thanks,

Reply
0 Kudos
McServer
Contributor
Contributor
Jump to solution

I actually ran into that post earlier today but though I'd give it another shot. I may have missed something but I cannot find a workaround in the available information.

EDIT: Sorry, I totally missed page 2.

Message was edited by: McServer

Reply
0 Kudos
McServer
Contributor
Contributor
Jump to solution

This is what I pulled from the page I missed in the above mentioned article.

if [ $# -eq 1 -a "$1" = "-v" ] ; then
  echo "grub-install (GNU GRUB 1.99-12ubuntu5)"
  exit 0
fi

Are you sure of the syntax? The other if statements in my grub.cfg file have no space after the closing square bracket between it and the semicolon. Also, I'm not 100% sure im putting this possible workaround statment in the correct location. Can you confirm for me exactly what file should be edited to test this? I am using ubuntu 10

Message was edited by: McServer

Reply
0 Kudos
ivivanov
VMware Employee
VMware Employee
Jump to solution

This syntax works for me. You don't need to edit grub.cfg file, but grub-install script, which (in my case) is under /usr/sbin/grub-install. You need to put these lines at the top of the file (well, after the #!/bin/sh line).

The idea is that Converter is running grub-install -v to detect the version and in this manner we are returning a GRUB2 version in a recognizable format, so it can detect the version properly and proceed correctly further.

__________
It is worse!
Reply
0 Kudos
McServer
Contributor
Contributor
Jump to solution

Thank you so much! This worked perfectly!

Reply
0 Kudos
zelfick
Contributor
Contributor
Jump to solution

HI Ivivanov, how are you?

I am now facing a pretty similar error:

FAILED: An error occurred during the conversion: 'GrubInstaller::InstallGrub: /usr/lib/vmware-converter/installGrub.sh failed with return code: 127, and message: FATAL: kernel too old Error running vmware-updateGrub.sh through chroot into /mnt/p2v-src-root Command:
chroot "/mnt/p2v-src-root" /vmware-updateGrub.sh "GRUB2" "(hd0)" "(hd0,1)" /vmware-device.map "grub2-install" '

I understand the fix mentioned then the fix is done in the source machine grub configuration or in some part in vcenter

can you please tell me were can i configure that, thanks in advance.

Reply
0 Kudos
patanassov
VMware Employee
VMware Employee
Jump to solution

Hello zelfick,

It is a different issue you have encountered. "Kernel too old" error refers to the helper's kernel being too old for the machine you are converting (it is probably a newer, unsupported version). Unfortunately tweaking grub,cfg is not a workaround in this case.

Regards,

Plamen

Reply
0 Kudos