VMware Cloud Community
wattb
Contributor
Contributor
Jump to solution

Vmware Converter 4.0.1 Standalone gets 97% Error: Failed to reconfigure the target virtual machine. Linux conversion P2V

I get 97% then it fails. I am converting Ubuntu 9.10 server. I will attach the logs. "GrubInstaller::InstallGrub: /usr/lib/vmware-converter/installGrub.sh failed with return code: 127, and message:

/vmware-updateGrub.sh: 38: grub: not found

Error running GRUB

Error running vmware-updateGrub.sh through chroot into /mnt/p2v-src-root

10/22/09 found out Ubuntu 9.10 uses Grub2 is this the issue and can it work with Grub2?

Let me know if you can help.

0 Kudos
1 Solution

Accepted Solutions
gobragi
Contributor
Contributor
Jump to solution

Oki I've done the P2V and after it failed at 97%,

I booted the VM up with LiveCD into Rescue mode, connected root to /dev/sda1, installed grub2 and finally ran "upgrade-from-grub-legacy".

After the reboot, everything works fine.

So no need to replace your UUID's and all that. This should be enough.

Thank again for this tread.

-Bragi from Iceland

View solution in original post

0 Kudos
14 Replies
eschwab
Contributor
Contributor
Jump to solution

I've had the same experience virtualizing Ubuntu 8.10 and 9.04 boxes ... We use lilo and xfs, I don't know what p2v does after the 97% stage, but I've found I get a functional system if I just rerun grub-install or lilo in rescue mode .. More specifically:

- hardware -> cd -> 'connect at power on' an Ubuntu install CD
- options -> advanced / boot options: Force BIOS setup
- power on, select boot in the BIOS and +++ CDROM to the top
- rescue a broken system, select correct root partition, execute a shell in it
mkdir -p /var/run/network
mkdir /var/lock
rm /etc/udev/rules.d/70-persistent-net.rules
rewrite /etc/fstab UUID entries to /dev/sda
rewrite /etc/fstab non-ext3 filesystems to ext3
lilo
sync and power down
disconnect cd

0 Kudos
wattb
Contributor
Contributor
Jump to solution

I appreciate you feedback. I have not had any issues with Ubuntu 8.10 server with the original Grub but 9.10 uses Grub 2 a complete rewrite. I was looking if VMWare has a fix for this going forward.

0 Kudos
fear_nothing
Contributor
Contributor
Jump to solution

I'm having the same issue, has this issue been fixed?

0 Kudos
LiamSchneider
Contributor
Contributor
Jump to solution

Sorry for adding this post months later, but I ran into this same issue just yesterday and I thought that someone else might want to hear about this experience.

I'm unsure if VMWare has fixed this issue at this point and I would definately like to see this fixed, but with the help of this post and some other references I found I was able to work around this issue.

I did follow most of the steps above (posted by eschwab) but to be clear, this is what I did inside vCenter to finish the conversion:

  1. Performed the conversion of Ubuntu 9.10 with Vmware converter 4.0.1 (which fails at 97% - leaving the system in an off state)

  2. Right-clicked the converted guest and chose "Edit Settings"

  3. Clicked on "CD/DVD Drive 1"

  4. Clicked on the "Datastore ISO File" option and browsed my datastore to select the ubuntu 9.10 O/S ISO file*

  5. Clicked on the "Connect at power on" option

  6. Clicked on the options tab and then "Boot options"

  7. Checked the box in the "Force BIOS Setup" area

  8. Clicked on OK

  9. Right-clicked the converted host again and chose "Power" and then the "Power on" option to start the system.

  10. I selected the converted host and clicked on the console tab.

  11. The BIOS setup for the guest comes up and I went to the boot area by hitting the right arrow key a couple times.

  12. By using the down arrow key I selected "Hard drive" and pressed the minus key to move it down and then moved the selection up using the up arrow key to select the removable devices listing and pressed the minus key (this left the CD-Rom listing at the top).

  13. I pressed the F10 key and pressed the Enter key (with the "Yes" option selected) to save the changes and exit.

  14. The ubuntu CD booted and I was presented with some options for the language, I opted for english and pressed Enter.

  15. I selected the "Rescue a broken system"

  16. It asked for a language selection again and again I opted for English and hit the enter key

  17. I asked for my country, I selected United States and pressed enter

  18. I did not opt to have it auto detect my keyboard, so I pressed enter on this and the next couple screens regarding the keyboard.

  19. At this point it asked for a hostname (which I don't think really matters because it doesn't save this anywhere) so I pressed enter on what it already had there.

  20. It asked for my timezone, so I gave it my timezone and hit enter.

  21. I selected /dev/sda1 to use as my root file system and pressed enter.

  22. It presents a set of options, one of which was to reinstall the grub bootloader, which I did.

  23. One of the other options presented is to start a shell (its the top option) which I did.

  24. At the prompt I typed "blkid" and it gave me the UUID of the /dev/sda1 disk (there was not a UUID for the swap disk). I made note of the UUID for /dev/sda1

  25. I edited the /etc/fstab by typing "nano /etc/fstab"

  26. I changed the line for the root file system which starts with "UUID=" (and also has "/" in it) and put in the new UUID (replacing the old one) and then saved it.**

  27. I edited the /boot/grub/grub.cfg and replaced all of the old UUIDs in there with the new UUID (there were 5 places where the old UUID was present).I of course saved my changes.**

  28. I then ran "rm /etc/udev/rules.d/70-persistent-net.rules" to remove what the system thought the network adapters were and force it to recreate them essentially.

  29. I turned the VM guest off, disconnected the ubuntu ISO cd and then turned it back on and it booted up without issue.

*Note: I had uploaded the ISO for Ubuntu 9.10 onto my vmware esxi host data store to connect the cd/dvd drive to it.

**Note: other ubuntu installs may have different disk depending on the setup, there could be multiple UUIDs that need to be accounted for and the grub bootloader could have multiple new UUIDs that need to be used to replace old ones.

Keep in mind that there are many different ways to skin this cat (you can do this same set of operations with other methods), but this is what I did and it worked for me. Hope this helps.

gobragi
Contributor
Contributor
Jump to solution

Same situation here but after following LiamSchneider's steps, I still get the "Minimal BASH-like line editing..." grub> prompt Smiley Sad

One thing I noticed in the /boot/grub/grub.cfg, was the (hd0,1), I changed it to (hd0,0) as I thought is should be, but no cigar.

I've also run the:

grub> root (hd0,0)

grub> setup (hd0,0)

with success on all but the following (2 output lines):

Running "embed /boot/grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)

Any ideas ?

0 Kudos
LiamSchneider
Contributor
Contributor
Jump to solution

(hd0,1) is most likely correct (that is what I have in my grub.cfg). Here is a sample of my grub.cfg:

menuentry "Ubuntu, Linux 2.6.31-14-generic-pae" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        set quiet=1
        insmod ext2
        set root=(hd0,1)
        search --no-floppy --fs-uuid --set 9dc11d99-00b4-4147-90ff-dcc4327e4e88
        linux   /boot/vmlinuz-2.6.31-14-generic-pae root=UUID=9dc11d99-00b4-4147-90ff-dcc4327e4e88 ro   quiet splash
        initrd  /boot/initrd.img-2.6.31-14-generic-pae
}

The problem could also be that you have a different version of grub than I do. The newer version of grub (called grub 2 but is version 1.96) uses the grub.cfg and the older versions use menu.lst.

Is it possible you upgraded from Jaunty 9.04 to Karmic 9.10? If so, if you want to have the latest version of grub, run "sudo apt-get install grub2" and then "sudo upgrade-from-grub-legacy" to make it a permanent change. (I also recommend reading this post for more information: )

Good luck!

0 Kudos
gobragi
Contributor
Contributor
Jump to solution

thx, "set root=(hd0,1)" was also in my grub.cfg but when going through the minimal BASH-like line command and running the grub commands, I list up the disks and partitions and (hd0,0) is the only available.

I don't know if the system was upgraded from Jaunty but I think not.

My guess is there was no grub installed prior to the first couple of P2V, but then I installed it on the physical and tryed again.

VMWare Converter also tries to install Grub when reconfiguring the VM but fails at 97%.

I installed Grub2 on the VM in liveCD rescue mode and then did a upgrade-to-legacy and rebooted.

Worked like a charm, Tanks alot Smiley Happy

-Bragi

0 Kudos
gobragi
Contributor
Contributor
Jump to solution

My guess is that it should be enough to install grub2 and upgrade-from-grub-legacy in liveCD rescue mode after P2V.

Will try over the weekend and post results.

0 Kudos
LiamSchneider
Contributor
Contributor
Jump to solution

Fantastic! Glad to hear you were able to move forward. Let me know your other findings.

-Liam

0 Kudos
gobragi
Contributor
Contributor
Jump to solution

Oki I've done the P2V and after it failed at 97%,

I booted the VM up with LiveCD into Rescue mode, connected root to /dev/sda1, installed grub2 and finally ran "upgrade-from-grub-legacy".

After the reboot, everything works fine.

So no need to replace your UUID's and all that. This should be enough.

Thank again for this tread.

-Bragi from Iceland

0 Kudos
abiheiri
Contributor
Contributor
Jump to solution

I got it to work on debian 6.0 but it was a little different

I had an lvm configuration

I mounted /
I mounted my /boot
chroot /mnt (if arent already)
-dpkg-reconfigure grub-pc
-dpkg-reconfigure linux-image-2.6.32-5-686 (whatever your latest is)
-update-grub
-grub-intall /dev/sda (wherever the boot loader is)

source:
http://forgottheaddress.blogspot.com/2011/09/evmsactivate-is-not-available.html

0 Kudos
RoryBourke
Contributor
Contributor
Jump to solution

I know this is a LOT later, but this solution just worked for me using ubuntu server 11.04 (x86) on converter 5.0.0 to vSphere 5.0.0.

No way I would have figured this out, props to you sir.

0 Kudos
sutoor
Contributor
Contributor
Jump to solution

I disabled floppy in BIOS and after grub/kernel update the errors were gone.

0 Kudos
HENIAGP
Contributor
Contributor
Jump to solution

Hi, I met the same issue when I converter Ubuntu 12.04 by converter 6.4. I tried to do according to your solution. But I can't find the file grub.cfg in the path. Could you please give me some advice? Thanks in advance
0 Kudos