HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=4)
-   -   XenServer to VMware (Debian Squeeze) (http://www.howtoforge.com/forums/showthread.php?t=57891)

edge 11th July 2012 09:43

XenServer to VMware (Debian Squeeze)
 
I've got a XenServer VM what I would like to convert to VMware.
This can "in theory" be done with "VMware vCenter Converter Standalone Client".

In theory...

When you run the Converter as is, it will give an error when 99% is done of the converting.
Code:

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 '

Basically the error is caused because the NEW layout responce string from: grub-install -v (grub-install (GRUB) 1.98+20100804-14+squeeze1)
The converter does not recognize the responce.
It should be: grub-install (GNU GRUB 1.98+20100804-14+squeeze1)

To fix this I added the following to /usr/sbin/grub-install:

Code:

if [ $# -eq 1 -a "$1" = "-v" ] ; then
  echo "grub-install (GNU GRUB 1.98+20100804-14+squeeze1)"
  exit 0
fi

Now when running the converter I get the following error:
Code:

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: error:
no such disk. Error installing GRUB Error running vmware-updateGrub.sh through chroot into /mnt/p2v-src-root

Unfortinatly running the created VM I get the error:
Code:

Error loading operating system_
When I boot from CD into rescue mode, I do see all the files
I guess that the only problem is Grub.
Now how do I reinstall Grub, and where should it be installed?
Using the Reinstall GRUB boot loader option from the rescue option does not fix the problem.

Anyone here who might know how and where to install the GRUB boot loader?

edge 11th July 2012 10:17

Some more info from the converted VM:

Code:

#fdisk -l

Disk /dev/sda: 42.9 GB, 42945347584 bytes
2 heads, 82 sectors/track, 1497814 cylinders
Units = cylinders of 56 * 512 = 28672 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x090631c4

    Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          3      149776    41937664  83  Linux

Disk /dev/sdb: 1070 MB, 1070465024 bytes
52 heads, 32 sectors/track, 1256 cylinders
Units = cylinders of 1664 * 512 = 851968 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6ffad3af

    Device Boot      Start        End      Blocks  Id  System
/dev/sdb1              1        1256    1044224+  82  Linux swap / Solaris
#

And.

Code:

# cat /boot/grub/menu.lst
..
..
..
title          Debian GNU/Linux, kernel 2.6.32-5-686-bigmem
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.32-5-686-bigmem root=/dev/xvda1 ro console=hvc0 quiet
initrd          /boot/initrd.img-2.6.32-5-686-bigmem

title          Debian GNU/Linux, kernel 2.6.32-5-686-bigmem (single-user mode)
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.32-5-686-bigmem root=/dev/xvda1 ro console=hvc0 single
initrd          /boot/initrd.img-2.6.32-5-686-bigmem

title          Debian GNU/Linux, kernel 2.6.32-4-686-bigmem
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.32-4-686-bigmem root=/dev/xvda1 ro console=hvc0 quiet
initrd          /boot/initrd.img-2.6.32-4-686-bigmem

title          Debian GNU/Linux, kernel 2.6.32-4-686-bigmem (single-user mode)
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.32-4-686-bigmem root=/dev/xvda1 ro console=hvc0 single
initrd          /boot/initrd.img-2.6.32-4-686-bigmem

title          Debian GNU/Linux, kernel 2.6.26-2-686-bigmem
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.26-2-686-bigmem root=/dev/xvda1 ro console=hvc0 quiet
initrd          /boot/initrd.img-2.6.26-2-686-bigmem

title          Debian GNU/Linux, kernel 2.6.26-2-686-bigmem (single-user mode)
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.26-2-686-bigmem root=/dev/xvda1 ro console=hvc0 single
initrd          /boot/initrd.img-2.6.26-2-686-bigmem

### END DEBIAN AUTOMAGIC KERNELS LIST
#


falko 12th July 2012 10:41

Have you tried to run
Code:

grub-install
from the rescue system?

edge 12th July 2012 13:14

Yes I did, and I get:
Code:

#grun-install
install_device not specified
Usage: grub-install [OPTION] install_devide
Install GRUB on your drive.

...
...
...

#

I guess that it needs to be installed on /dev/sda1, but I need to be sure before I do so, as creating a new VM of the system takes about 4 hrs.

Also.
ON the Xenserver the Disk's are named different than on this VM.
I'm not sure if this will cause a problem?

This VM the are (see also 2nd post):
/dev/sda1 (set to boot)
/dev/sdb1

On the Xenserver they are:
/dev/xvda1 (set to boot)
/dev/xvdb1

Code:

host:~# fdisk -l

Disk /dev/xvdb: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x86a2ed46

    Device Boot      Start        End      Blocks  Id  System
/dev/xvdb1              1        130    1044193+  82  Linux swap / Solaris

Disk /dev/xvda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000dc2c6

    Device Boot      Start        End      Blocks  Id  System
/dev/xvda1  *          1        5221    41937651  83  Linux
host:~#

So.... It's "grub-install" .... ????

falko 13th July 2012 16:34

Should be either
Code:

grub-install /dev/sda
or
Code:

grub-install /dev/xvda
If the device doesn't exist, the system will tell you. I'd try this on a copy first.

edge 13th July 2012 17:10

Hi falko.. Thank you for your time on this.

Okay.

Code:

#grub-install /dev/xvda
/usr/sbin/grub-probe: error: cannot start `dev/xvda'.
#grub-install /dev/sda
Installation finished. No error reported
#

After this I reboot, and it does show the installed kernals (looking good so far)
Then.. When I select one I get the following error.

Code:

error: no such device: 23f86d60-263c-4a2b-b28d-dd4093a22677.
Loading Linux 2.6.32-5-686-bigmem ...
Loading initial ramdisk ...

After this the VM does do nothing anymore.. (looks like it's hanging)

So close... But still so far away :-(

falko 14th July 2012 17:51

What's in /etc/fstab? Can you try to use device names instead of UUIDs?

edge 14th July 2012 19:09

Quote:

Originally Posted by falko (Post 282086)
What's in /etc/fstab? Can you try to use device names instead of UUIDs?

fstab looks like this:

Code:

proc                /proc        proc        default                0                0
/dev/xvda1        /        ext3        errors=remount-ro,usrquota,grpquota        0        1
/dev/xvdb1        none        swap        sw                0                0

I've also tested this, but with no luck (same error)
Code:

proc                /proc        proc        default                0                0
/dev/sda1        /        ext3        errors=remount-ro,usrquota,grpquota        0        1
/dev/sdb1        none        swap        sw                0                0

When I boot the "single-user mode" kernel I get this:
Code:

Decompressing Linux... Parsing ELF... done.
Booting the kernell
_

After this the VM just sits there.. (looks like hanging)
I'm about to give up on this...

falko 15th July 2012 14:00

Hm... I'm running out of ideas as well... :(

edge 15th July 2012 16:31

Fu***t....

I'm going to do a new "clean" install, and move all the accounts from the Xenserver VM to the new VMware vSphere VM!

Does this trick still work to do the moving from one ISPconfig server to an other?

http://www.howtoforge.com/forums/showthread.php?t=57640


All times are GMT +2. The time now is 01:35.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.