ENG/GER Importing an physical Ubuntu-Server into Proxmox

Johannes_Kaefer

New Member
May 27, 2021
2
0
1
German below:

Hello guys,

is it possible to import an existing physical Linux Server (Ubuntu 10.04.4 LTS) into Proxmox?
And if it's possible to virtualize the machine into Proxmox, what would u recommend me, to import it in the best way?

I know it's an old system, but very important.

Thanks in advance.

Kind regards
Johannes



Hallo zusammen,

ich wollte fragen, ob es möglich ist einen exitstierenden physikalischen Linux Server (Ubuntu 10.04.4 LTS) in Proxmox zu virtualisieren?
Wenn es möglich ist den Server zu virtualisieren, was würdet ihr mir empfehlen, um den Server bestmöglich zu importieren.

Ich weiß es ist ein alter Server, aber es handelt sich dabei um ein wichtiges System.

Vielen Dank im Voraus.

Freundliche Grüße
Johannes
 
principally thats easy, if your linux knowledge is fine.
* create new machine in pve
* boot this machine into a live system like grml and create and mount the filesystems (lets say to /target)
* give the machine a temporary ip, set password for root and start ssh service

* on the physical machine stop all services
* rsync / to the new maschine's /target
be aware of several rsync params like -numeric-ids, --one-filesysystem, exclude probably c/sys etc depending on your fs layout

on pve guest
* when finished, make missing folders proc sys tmp
* bind mount /dev to /target and install grub
* make changes to fstab reflecting your eventually new layout
* change interfaces to your old settings

* shutdown or disconnect the old machine and reboot the new virtual

its easy though many strings attached.
tools like clonezilla can help you if you are not that fit with linux
 
  • Like
Reactions: Johannes_Kaefer
Wouldn't it also be possible to dd the physical disk into an img and import it as a raw disk into a VM?
 
Wouldn't it also be possible to dd the physical disk into an img and import it as a raw disk into a VM?
you can do this. clonezilla is more effective (just copying existing data) and makes misc changes for you. dd can take much longer than clonezilla.

rsync method is with least downtime. you can even run several rsyncs in advance with running services. only the last/final rsync must be done with services stopped to be consistent. migration is then a matter of seconds (as you can even test start the new vm disconnected to see if it boots correctly)
 
  • Like
Reactions: Johannes_Kaefer
Hey pvps1,

thanks for your help. The duplication into Proxmox worked good, Clonezilla is a perfect tool and rapidly fast. The only thing is, that it isn't possible for Proxmox to boot the system from the disk, I try to fix bootloader, but maybe u know this issue and have a solution for it?

Cheers,
Johannes
 
Booting a cloned target is always a trick, since the MBR and grub setup tends to break between source and target when you're doing filesystem rsyncs. What I've done in the past is boot both the source and target from a rescue cd, enable their networking, then use dd | netcat to copy the source raw block device to the target's raw block device (ensuring the target VM's vdisk is of sufficient size.) Since this is doing a bit copy of the entire block device, it will generally boot on the target without issues.

something like (assuming the source machine only has one drive to be cloned):

source machine:
dd if=/dev/sda bs=1m | netcat target-ip 54321
target vm:
netcat -l 54321 | dd of=/dev/sda bs=1m status=progress

I've used the System Rescue CD for this process for years.
 
  • Like
Reactions: ph0x

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!