[SOLVED] Migrating Proxmox Container to Google Cloud Platform

earthian

Member
Oct 6, 2020
7
1
8
54
Hello,

Are there any tools, procedures to easily migrate a bunch of Proxmox containers to Google Cloud Platform (GCP) VMs?

For example:
- I have a container which has 20GB storage disk (thin-lvm), has Debian OS and has setup services and apps running on it.
- I have a similarly sized VM on GCP with 20GB storage disk attached.

How would you suggest to get everything from the container to GCP VM as-is so that the app would not notice where it is running.

Or is this a manual work to set everything up again from new and do manual migration of configs, files, data, etc., etc...

Kind Regards
Andrius
 
You are migrating from a container to a VM. Containers don't have a kernel, initramdisk, or boot loader and their networking is tied in with PVE. It isn't really possible to directly migrate and I don't know of any pre-done tools.

Unless somebody else has a good idea you will need to set up the VM and then copy over your data. A tool like rsync may be helpful for this.
 
Hello everybody,

I would like to update and set this as solved. And here is the story:

First of all I decided the easiest and fastest way to migrate would be to use Proxmox in GCP too and it was a really straight forward and easy path:

1) start an instance with Debian Bookworm (I chose n2d with 4 CPUs and 16GB RAM, 40 GB root disk)
2) add Proxmox repositories
3) Install Proxmox (check manuals for v8.x on Debian)
4) create a Linux Bridge without any devices (host-only networking)
5) add additional disk storage (in my case 300 GB SSD disk) for container filesystems
6) add iptable rules to the bridge post-up and post-down as provided in the Proxmox docs
7) installed nginx for proxying containers on host (GCP VM)
8) installed certbot on host for SSL certificates for nginx

Done! :)

I know GCP has support for Docker out of the box, but LXC is not Docker and porting to Docker takes much more time than the above 8 steps.

Cons:
- Proxmox uses around 1 GB extra RAM compared to vanilla Debian

Pros:
- Nice web UI for container management
- Migration of containers from on-prem Proxmox takes around 30 minutes counting in backing up, transfer of the backup over the network and restoration
- Add future flexibility to add more containers (e.g. testing or staging environments, own backup solutions, etc.)
 

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!