proxmox - physical to virtual migration
this guide will describe how to migrate a physical machine to a proxmox virtual machine.
create disk image of the physical machine
- boot the machine using a linux live cd. I'm using Knoppix 7.2 because it works with the Dual Pentium III machine.
- find the source disk
lsblk
# assuming the output as follows
# /dev/sda <-- destination
# /dev/sdb <-- source
- mount destination disk (previously formatted as ext3 for knoppix compatibility)
mkdir -p /mnt/destination
mount -t ext3 /dev/sda1 /mnt/destination
- create disk image
dd if=/dev/sdb of=/mnt/destination/server.img bs=8M conv=noerror,sync
import image into virtual machine
- create a new proxmox virtual machine without a disk. note the vmid, i'll use vmid 109 as an example.
- on the proxmox instance, mount the destination disk.
- convert disk image to qcow2
qemu-img convert -f raw -O qcow2 server.img server.qcow2
- import disk into virtual machine
# vm-storage is an example, this would be the storage volume that you store proxmox vm disks.
qm disk import 109 server.qcow2 vm-storage