Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to migrate a production server to a VM for development purposes, and exactly duplicate the production environment as closely as possible.

The production server is running CentOS with a single ~3TB partition on a RAID 5 array. Although only 13 GB is used, partimage is not an option because the machine hosting the VM has a 150 GB drive and partimage requires images be restored to a partition of equal or greater size.

Right now it looks like the best option is to setup a new CentOS VM from scratch, using production config files as a reference, and copying over all the relevant data.

Is there an easier option?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

You can convert your physical machine to virtual using VMware converter. The resulting vmdk file can then be used directly by VirtualBox.

In VirtualBox during the Create New Virtual Machine process, when you get to the Virtual Hard Disk dialogue select Use existing hard disk and then browse to the location of your vmdk file.

share|improve this answer
    
I tried this, but can't get past the destination system step. It asks for VMWare Infrastructure server details, and the following URL suggests I need an ESXi server? serverfault.com/questions/81908/… –  robjb Mar 24 '11 at 19:36
1  
@Rob: ESXi is free, easy to set up, and runs from a USB pen drive. You can set this up on a spare machine as the conversion destination. –  Iain Mar 25 '11 at 8:11
add comment

You can use g4l (ghost for linux) to 1:1 clone your existing OS. But it requires downtime

share|improve this answer
    
Your answer doesn't indicate how this would ease migration to VirtualBox. I don't know what kind of output formats g4l supports, or how to convert its output to an acceptable virtual disk format. –  robjb Mar 24 '11 at 19:46
    
Rob, try reading what is g4l and how it works. I suggested solution for you and you didn't even tried to do some research? –  Dmytro Leonenko Mar 25 '11 at 21:33
    
I have; I know it creates a raw image file with optional Gzip compression. I can't seem to find information on other output formats (if they exist), and since that only seems to complicate the conversion to a VirtualBox VM, I can't consider your suggestion a complete solution. –  robjb Mar 26 '11 at 15:19
1  
Look. It's just as simple as boot both computer and VM from CD/iso and set one as server and other as client. Then press start. They both have to be on the same subnet or you can use FTP server as intermediate storage in other case –  Dmytro Leonenko Mar 27 '11 at 8:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.