Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Converting a Gentoo system to a VMWare Virtual machine?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
doalwa
Tux's lil' helper
Tux's lil' helper


Joined: 03 Mar 2003
Posts: 142
Location: Old Europe

PostPosted: Mon Feb 26, 2007 2:42 pm    Post subject: Converting a Gentoo system to a VMWare Virtual machine? Reply with quote

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
View user's profile Send private message
elgato319
Guru
Guru


Joined: 15 Sep 2005
Posts: 546

PostPosted: Mon Feb 26, 2007 3:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
vandien
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2006
Posts: 137

PostPosted: Mon Feb 26, 2007 3:45 pm    Post subject: Re: Converting a Gentoo system to a VMWare Virtual machine? Reply with quote

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
View user's profile Send private message
davidgurvich
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1063

PostPosted: Mon Feb 26, 2007 3:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
doalwa
Tux's lil' helper
Tux's lil' helper


Joined: 03 Mar 2003
Posts: 142
Location: Old Europe

PostPosted: Mon Feb 26, 2007 6:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 3003
Location: Bay Area, CA

PostPosted: Tue Feb 27, 2007 7:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum