Migrating a physical linux server to proxmox

TobiasE

New Member
Dec 6, 2017
24
1
1
44
Greetings
From what I undestand I may use dd to write a raw image of the server I wish to migrate.
I should then setup a proxmox host and and add my newly created raw image to it.
Then restart it.
However it does not work. If I wish not to use a cd (clonezilla) how can I go about migrating a physical linux server to proxmox. The documentation says it is easy.
Any pointers would be apreciated.
 
Despite of wiki saying so, I do not think p2v-migration is "quite easy". If nothing else, VM has different "hardware", for which your physical server might not have necessary drivers installed. For me it is much easier (and faster) to do clean OS install on VM, and migrate only data...
 
Thank you for your reply, so you would then need to install the OS and then do partitioning and mounting of remote file systems and what not manually? And then use rsync?
 
unless your server has a lot of data, that is the hard drive size is prohibitively big, you can try FOG server for cloning.
the steps are:

Step 1: setup FOG server VM on your Proxmox. give the VM twice the amount the space needed for your target machine.
I have found it difficult to add extra space to use for image storing to FOG VM after setup so plan to have all space you might need. if your physical server takes up 20GB space on the real harddrive, plan to give FOG at least 50GB Virtual hard drive space on install, plus make sure your Proxmox host have at least additional 60GB to accommodate new VM and what not
This is a safety net specs. that I feel needed for problem free conversion and that I use in my setup.

Step 2: make sure your FOG VM works ok and you can see it on network.
boot your server (the one you want to image it) from PXE. you may need to configure this in BIOS etc...
and add it to inventory. than reboot and create an image on the for server.

while image is created read up on FOG on how to add image to the menu to begin cloning

Step 3: when Step 2 is done, you can reboot the physical server back up and let it be on the network.
Create new VM. try to match the specs to the original machine. at least CPU/RAM specs. you can adjust the hard drive size using the stats FOG imaging give you. most often than none the OS drive can be shrunk on clone, but thread carefully.

Step 4: boot the new VM and select PXE booting. it should boot up into FOG menu giving you chance to select image for cloning. select the image and let it run.

once done it should reboot, maybe several time and than into a working status.
word of caution: if you use static IP make sure your real server is off network when VM is booting.
you do not have to shut down just unplug the cable from the switch.

Step 5: login to your VM server and make sure all is working. also try to run any remote clients that depend on this server to make sure all is ok. shut down the physical server and keep it on the shelf for a few weeks until you are 100% sure all is working.

PS>> this should work fine for Linux based machines. Linux is very sturdy and resilient when it comes to hardware changes,with very few exceptions. (setups with raid on boot disks etc..)


I have mass-clone 15 PC so far with Linux Mint at work this way. that is physical to physical cloning but with very different hardware configs. as long as it can connect to internet it will find and install all drivers it needs to work.
 
Strange... we migrated very often Linuxserver/Linuxdesktops to virtual, or from virtual do physical. The only problem was with suse and Kernel 2.6. With all other distris like Ubunut, Centos, Gentoo, never had a problem. We do this alsway with rsync. So boot a Livedisk, copy with rsync from source to target, write grub, change some things in fstab, reboot. Ready :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!