Saturday, October 26, 2019

Virtualise a running legacy physical Linux server (P2V)

problem: You have a legacy physical Linux server, live in production, that you would like to virtualise (P2V) with near zero downtime?

My goal was to take a physical Linux P node running live-production and virtualise it. Primarily so the physical hardware could be repurposed as a hypervisor or retired. I didn't want to create and allocate multi terabyte disks that were present in the P partition table, nor have to use md raid in the V guest which the P node was using, because the target hypervisor (Proxmox 5) used ZoL/ZFS. I also wanted to mitigate downtime/reboots on the running P node as it was busy performing production tasks.

solution: I have documented the steps I took without using specific P2V tools

After researching multiple ways of solving this problem, I documented my steps on server fault.

There were multiple questions on the Stack Exchange network and some of the answered helped but there wasn't really an end to end guide on the process, at least not for my circumstances and goals. So after documenting and running my own steps, I posted the answer for others to use as a reference.

Check the answer on server fault for the details:

Once I had successfully V'ed the P node, and had the V node running in my Proxmox PVE lab, I also posted my steps for repurposing the P node as a Proxmox hypervisor. This was a little tricky but with tips from the Proxmox forum I was able to make a clean Proxmox install with native ZoL/ZFS via network booted rescue image on the Hetzner service provider.
It was then possible to take a backup of the V node and transfer it to the new hypervisor and restore it with qmrestore.

Everything worked as hoped in the end. In the journey I had refreshed on some Linux knowledge and picked up a few new techniques. I had successfully repurposed the P node as a hypervisor and had the legacy Linux node running as a V in the new hypervisor. All with near zero downtime to production.


Props to:
Various Q&A authors @ the Stack Exchange network.
Various post authors @ Proxmox forums.
The various wiki authors @ the Proxmox wiki page for Migration of servers to Proxmox VE.
I also cited some useful links in my answer on server fault.

No comments: