Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two physical machines that I wish to virtualize.

I can not (physically) plug the hard drives from either machine into the new machine that will act as their VM host, so I think that copying the entire structure of the system over using dd is out of the question.

How can I best go about migrating these machines from their hardware to the KVM environment? I've set up empty, unformatted LVM logical volumes to host their filesystems, with the understanding that giving the VMs a real partition to work with achieves higher performance than sticking an image on the filesystem.

Would I be better off creating new OS installs and rsyncing the differences over?

FWIW, the two machines to be VM'd are running CentOS 5, and the host machine is running Ubuntu Server 10.04 for no particularly important reason. I doubt this matters too much, as it's still going to be KVM and libvert that matter.

share|improve this question
up vote 2 down vote accepted

You could possibly pipe the output from dd through an SSH tunnel to your target machine. I've known it to be done relatively successfully into a VMWare virtual machine.

Good details in the main answer here, and provides instructions for what to do if SSH isn't running (a number of liveCDs have SSH server on them anyway, so shouldn't be a problem):

share|improve this answer
The notes at the bottom of that answer are golden. In particular, one of source filesystems is dramatically larger in capacity than the space allotted, though it's mostly free space and all the actual data will fit. Looks like a dump/restore for that machine, and a netcat+ssh+dd copy for the other. – Charles Jun 29 '10 at 1:57

You can copy the disk images to the LVM logical volumes and provide this as the disk image for the VM. Make sure you disable NTP and NTPDATE on the virtual servers.

I converted some old images using Mondo to create bootable recovery images. This allowed me to resize the partitions during reinstall.

share|improve this answer

Your Answer


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.