Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th July 2012, 08:43
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,036
Thanks: 268
Thanked 152 Times in 132 Posts
Default 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?
__________________
Never execute code written on a Friday or a Monday.
Reply With Quote
Sponsored Links
  #2  
Old 11th July 2012, 09:17
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,036
Thanks: 268
Thanked 152 Times in 132 Posts
Default

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
#
__________________
Never execute code written on a Friday or a Monday.
Reply With Quote
  #3  
Old 12th July 2012, 09:41
falko falko is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Have you tried to run
Code:
grub-install
from the rescue system?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 12th July 2012, 12:14
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,036
Thanks: 268
Thanked 152 Times in 132 Posts
Default

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" .... ????
__________________
Never execute code written on a Friday or a Monday.

Last edited by edge; 12th July 2012 at 13:39.
Reply With Quote
  #5  
Old 13th July 2012, 15:34
falko falko is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

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.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 13th July 2012, 16:10
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,036
Thanks: 268
Thanked 152 Times in 132 Posts
Default

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 :-(
__________________
Never execute code written on a Friday or a Monday.
Reply With Quote
  #7  
Old 16th July 2012, 16:50
johjoh2k johjoh2k is offline
Junior Member
 
Join Date: Jul 2008
Posts: 21
Thanks: 2
Thanked 0 Times in 0 Posts
Default

If you want to try, this sequence worked for me:
- shutdown the VM in XenServer
- Export it somewhere so you can work on the VHD Virtual Hard Disk File (I have build an NFS Virtual OpenFiler on the new server and connected to both virtualization server)
- with the aid of http://www.winimage.com/ Professional, under "Disk" you can find "Convert Virtual Hard Disk Image"
- convert to VMDK

Good luck!
Reply With Quote
  #8  
Old 16th July 2012, 22:25
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,036
Thanks: 268
Thanked 152 Times in 132 Posts
Default

Quote:
Originally Posted by johjoh2k View Post
If you want to try, this sequence worked for me:
- shutdown the VM in XenServer
- Export it somewhere so you can work on the VHD Virtual Hard Disk File (I have build an NFS Virtual OpenFiler on the new server and connected to both virtualization server)
- with the aid of http://www.winimage.com/ Professional, under "Disk" you can find "Convert Virtual Hard Disk Image"
- convert to VMDK

Good luck!
Okay. I've used winimage to convert the ".xva" to a ".vmdk".

Now how do I get this into VMware?

I uploaded it to datastore [datastore1], and created a new VM.
When asked "Select a Disk" I used the option "Use an existing virtual disk.....", and selected the ".vmdk".
Unfortunately this did not boot...


Did I do something wrong here?
__________________
Never execute code written on a Friday or a Monday.
Reply With Quote
  #9  
Old 17th July 2012, 01:15
johjoh2k johjoh2k is offline
Junior Member
 
Join Date: Jul 2008
Posts: 21
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Yes VMDK exported by WinImage it's an old format of VMDK (4 if I remember correctly)
Now with VMware converter convert from VMDK to Vsphere
Reply With Quote
  #10  
Old 18th July 2012, 00:17
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,036
Thanks: 268
Thanked 152 Times in 132 Posts
Default

Hmmmm.

My VMware converter does not have the option to convert from VMDK to Vsphere!

Are you talking about the "VMware vCenter Converter Standalone Client", or some other VMware converter?
__________________
Never execute code written on a Friday or a Monday.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation just stops, and dies. cosmicsafari Installation/Configuration 3 19th July 2011 10:24
VMWare server on Debian Squeeze working unclecameron HOWTO-Related Questions 9 16th May 2011 21:17
[debian 5 + ispconfig 3] Unable to send mail tanakskool HOWTO-Related Questions 6 4th November 2009 18:20
Bind Failed christoph2k HOWTO-Related Questions 4 28th April 2007 00:57
e-mail problem!!! Debian 3.1 maroonworks Installation/Configuration 18 6th December 2005 14:42


All times are GMT +2. The time now is 18:08.


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