This website uses cookies
HowtoForge
This website use cookies to personalize
content, provide custom experiences,
target ads, to provide social media
How To Virtualize A Physical Linux Machine
features and to analyse our traffic. We
Author: mannes
also share information about your use of
our site with our social media, advertising
How To Virtualize A Physical Linux Machine
and analytics partners who may combine
it with
This othershows
tutorial information
how that
youyou've
can virtualize a physical Linux machine. It is
provided
intended to only
not them for
or that they've collected
virtualization, but for any relocation of a RedHat Linux
fromsystem
based your use of their
from oneservices.
machine Below you
to another.
have the option of selecting which types
Here are the you'll
of cookies stepsallow
to betocompleted:
store your
personal information. To view the vendor
1. Install a virtualization software on the desired machine.
list or change consent settings at any time
2. Create an empty virtual machine with enough disk space, selecting the OS
you’re going to migrate.
3. Download a Linux Live-CD ISO (e.g. Knoppix).
4. Burn one copy on a CD and then copy the ISO to the virtualization server (the
host).
5. Reboot the original Linux box (the physical machine that you want to
virtualize) with the CD you’ve just burnt, and connect the ISO to the newly
created virtual machine (i.e., boot the VM from the ISO).
6. Check both live CDs have net connection correctly configured and that they
can see each other.
7. In the virtual machine, type this:
nc -l -p 10000 | dd of=/dev/hda
8. On the machine you’re migrating, type:
:
dd conv=noerror if=/dev/hda | nc $IP_OF_THE_VM 10000
9. Wait until dd finishes its job and do a clean reboot of the virtual machine.
10. Boot in rescue mode with the distro's first CD or DVD and chroot to the new
system (on the virtual machine).
11. Run kudzu to remove old devices and find the new ones (or manually edit
your /etc/[Link] file, which is the most important since it includes
your scsi-device). For SuSE Linux systems, you may need to run yast to
discover the new hardware.
12. Create a new init using mkinitrd on your kernel version. Example:
/sbin/mkinitrd -v -f /boot/[Link] 2.6.20-1
13. Edit your /boot/grub/[Link] file to boot your newly created initrd
image.
14. Keep your fingers crossed and reboot your VM.
How To Virtualize A Physical Linux Machine
Tags: virtualization
HowtoForge
Back to top
: