View previous topic :: View next topic |
Author |
Message |
doalwa Tux's lil' helper


Joined: 03 Mar 2003 Posts: 142 Location: Old Europe
|
Posted: Mon Feb 26, 2007 2:42 pm Post subject: Converting a Gentoo system to a VMWare Virtual machine? |
|
|
Hi,
I have the following problem:
We're running a customized Gentoo Linux installation which primarily provides our customers with SFTP/FTP Access for Database backups and other support related content.
We've had some serious hardware issues with this machine recently and since we're already running 3 Windows 2003 Servers in separate Virtual Machines under VMWare Server I also wanted to move this Gentoo machine to VMWare Server.
I know that there is a free utility from VMware called VMware converter which allows a very easy transfer of a physical machine to a virtual machine, but the catch is that it only works with MS Windows.
I really don't want to reinstall this gentoo box since there are alot of custom perl scripts and other obscure stuff which isn't really well documented and the co-worker which originally set this box up has since left the company.
Is there another way to transfer the existing installation to a vm?? Perhaps creating a tar image of the root partition and restoring the tar backup in a newly created Gentoo installation under VMWare Server?
I'd be very grateful for any suggestions, maybe someone in here has already solved this problem?
TIA,
Dominik _________________ Keepin' the Funk alive since 1983! |
|
Back to top |
|
 |
elgato319 Guru

Joined: 15 Sep 2005 Posts: 546
|
Posted: Mon Feb 26, 2007 3:43 pm Post subject: |
|
|
I would try to do a stage5 backup of the existing maschine.
Than create a new liunx virtual maschine and boot it via a gentoo livecd.
Restore the stage5 archive and see if it boots.
At last install vmware-tools.
maybe you need to re-compile the kernel to get things working (network card, cpu, etc...)
good luck  |
|
Back to top |
|
 |
vandien Tux's lil' helper

Joined: 03 May 2006 Posts: 137
|
Posted: Mon Feb 26, 2007 3:45 pm Post subject: Re: Converting a Gentoo system to a VMWare Virtual machine? |
|
|
doalwa wrote: | Is there another way to transfer the existing installation to a vm?? Perhaps creating a tar image of the root partition and restoring the tar backup in a newly created Gentoo installation under VMWare Server? |
This will work. It might be safer to shutdown the box first, but it should work with it booted like so:
Code: | mkdir /mnt/gentoo
mount -o bind / /mnt/gentoo
(assuming /home is a separate partition)
cd /mnt/gentoo
tar -cpf /home/backup.tar . |
Then, follow the handbook up until the point of installing the stage3 file and use your backup.tar instead. You may need to do the same process for the /boot partition, if it's separate. Configure and install Grub, reconfigure and compile the kernel, edit /etc/fstab if necessary.. and with a little luck it will boot without a problem :) |
|
Back to top |
|
 |
davidgurvich Veteran


Joined: 23 Apr 2004 Posts: 1063
|
Posted: Mon Feb 26, 2007 3:59 pm Post subject: |
|
|
I have seen an option to use an existing hd or partition as the image. I have never tried that, but that might allow using the actual partitions.
Definitely backup before doing any of these. |
|
Back to top |
|
 |
doalwa Tux's lil' helper


Joined: 03 Mar 2003 Posts: 142 Location: Old Europe
|
Posted: Mon Feb 26, 2007 6:10 pm Post subject: |
|
|
Thanks a lot folks, so it seems like there are some options for me to try.
I'll give it a shot and report back if and how it worked out! _________________ Keepin' the Funk alive since 1983! |
|
Back to top |
|
 |
devsk Advocate


Joined: 24 Oct 2003 Posts: 3003 Location: Bay Area, CA
|
Posted: Tue Feb 27, 2007 7:32 am Post subject: |
|
|
a checklist (off the top of my head)of things to do after you restore a physical install into a virtual drive:
Code: | 1. change /etc/fstab
2.enable scsi in kernel and CONFIG_SPI=y, CONFIG_FUSION_SPI=y CONFIG_SCSI_SPI_ATTRS=y should be set to use LSI Logic virtual disk drive.
3.include sound card CONFIG_SND_ENS1371=m.
4.build pcnet32 (CONFIG_PCNET32=m) module for basic networking. once you install vmware-tools (a pain), you won't need to use it.
5.must set HZ=100 to get a decent performance and good time in the VM.
6.must change xorg.conf to use vmware adapter (if have setup X). VIDEO_CARDS in make.conf should have vmware (i.e. install x11-drivers/xf86-video-vmware) listed. vmmouse driver (x11-drivers/xf86-input-vmmouse) for freely moving the mouse between host and guest.
7.must change make.conf for MAKEOPTS.
8.change /etc/modules.autoload.d/kernel-2.6
9.change /etc/modules.d/alsa for sound adapter.
10. change /etc/conf.d/hostname
11.I have always needed "nosmp noapic nolapic" on kernel cmdline for a stable VM operation.
|
|
|
Back to top |
|
 |
|