How to migrate Debian VM to Bare Metal

dme

New Member
Oct 15, 2022
3
0
1
I've been playing around with Proxmox for over a year now, having one main VM running 24/7 with my main application in docker (like Paperless, Plex, HA etc). Performance wise i'm not that happy and as I was not using any other VMs in the last months, i decided to move my VM to bare metal (overwriting the Proxmox installation). Is there an easy way to achieve this? I invested a lot of effort and hours configuring all my running docker containers and my whole setup at home (like smart home etc) is dependent on those applications running.

Thanks for your help!
 
You can run
Bash:
path=$(pvesm path STORAGENAME:vm-VMID-disk-0)

qemu-img convert $path -O raw /path/to/vm-VMID-disk-0.raw
to export the first disk of the VM into a raw image.

Then use dd to write the raw image to the physical disk of the new server. It should be able to boot.
 
You can run
Bash:
path=$(pvesm path STORAGENAME:vm-VMID-disk-0)

qemu-img convert $path -O raw /path/to/vm-VMID-disk-0.raw
to export the first disk of the VM into a raw image.

Then use dd to write the raw image to the physical disk of the new server. It should be able to boot.
What do you mean with "DD"?
 
Whatever you do: the dd command is extremely powerful & sometimes a dangerous command!
It will immediately overwrite a disk - that will probably then be unrecoverable.
If you misplace paths/options/operands etc. on the command line - YOU WILL REEK HAVOC!

USE WITH CAUTION - & ONLY IF YOU ARE 100% SURE WHAT YOU ARE DOING!


dd man-page.
 
  • Like
Reactions: UdoB

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!