You can use live ubuntu / fedora / centos cd OR usb to run dd command.
once you have boot using live cd, you can mount nfs partition OR use external usb hdd to store raw file being generated using dd command.
dd is probably easiest way to migrate physical machine to kvm.
This article is about howto easily migrate physical Linux box to VM for KVM or for any other server which supports raw file or has tools available to convert raw file to supported image file for that server.
Below command will generate RAW file which can be used for KVM or can be used to convert advance image file like qcow2.
dd if=/dev/sda of=hdd.img
Here /dev/sda is source hdd for which we are generating image
above command was run from nfs mount point.
Once hdd.img is generated you can create new VM with newly generated hdd.img
To safely generate hdd image you need to boot physical machine using any live distro like fedora / ubuntu.
mount nfs storage OR mount spare hdd. From that mount point you can use above command.
if you find any missing point in here, please let us know in comment section or tweet us at @linuxreaders. To get more articles like this, subscribe to our RSS feeds / Mails.