How to migrate container online ?

Kan

Well-Known Member
Dec 21, 2016
84
4
48
54
Hello,

Is it possible to migrate a container to another node with no long offline time ?

Proxmox 4.4.

Thx for any help.
 
if you want short downtime, use shared storage (then the downtime is essentially the time it takes for your container to reboot)
 
I use "dir" type

Then it won't be quick, as you don't have a shared storage format.

If your looking at a one off migration then may be worth looking at a migration within the VM/OS.

If you want to have the ability to do quick migrations in future with small downtime then shared storage is worth looking at.
 
if you want short downtime, use shared storage (then the downtime is essentially the time it takes for your container to reboot)

Then it won't be quick, as you don't have a shared storage format.

I didn't choose shared storage because I will have many VM to deploy and I don't want to have problem with I/O disk, overload etc (still had). When problem with storage I prefer not have all VM in critical state.

But that was described is not online, it's an offline migration. If you really need online, just go with KVM/QEMU

How can I choose this ? When I create a container it creates only lxc image.
 
I would use local and shared storage combined in your case.
Critical VM's run on shared storage and non critical on local dir.
 
I would use local and shared storage combined in your case.
Critical VM's run on shared storage and non critical on local dir.

What I wanted to say is : I don't want to see all my VM encountering difficulties (critical and not critical VM) if the shared storage has problems (bad sectors, raid rebuild, etc). That's why I prefer a not shared storage.

I'm just surprise that I cannot use "live" migration with short downtime (shutdown, reboot).
If I use gui interface to do migration, the "restart mode" is checked and it shutdown the CT before to start copying. So long downtime if big disk.
If I uncheck 'restart mode', I've got erreor message : "can't migrate running container without --online or --restart (500)"

So migration is impossible for big CT if no shared storage ?
 
What I wanted to say is : I don't want to see all my VM encountering difficulties (critical and not critical VM) if the shared storage has problems (bad sectors, raid rebuild, etc). That's why I prefer a not shared storage.

I'm just surprise that I cannot use "live" migration with short downtime (shutdown, reboot).
If I use gui interface to do migration, the "restart mode" is checked and it shutdown the CT before to start copying. So long downtime if big disk.
If I uncheck 'restart mode', I've got erreor message : "can't migrate running container without --online or --restart (500)"

So migration is impossible for big CT if no shared storage ?

it's not impossible, it just takes a while.

a similar feature recently got merged for VMs (live migration with local disks), and it would be possible to implement a two-phase short-downtime migration for containers as well - nobody did so far.
 
What I wanted to say is : I don't want to see all my VM encountering difficulties (critical and not critical VM) if the shared storage has problems (bad sectors, raid rebuild, etc). That's why I prefer a not shared storage.

I'm just surprise that I cannot use "live" migration with short downtime (shutdown, reboot).
If I use gui interface to do migration, the "restart mode" is checked and it shutdown the CT before to start copying. So long downtime if big disk.
If I uncheck 'restart mode', I've got erreor message : "can't migrate running container without --online or --restart (500)"

So migration is impossible for big CT if no shared storage ?
Sure that shared network storage like ceph, glusterfs, etc. can have problems, but local storage can have them too! :p
You should understand, that it takes time to copy data from one cluster members local storage to other.
Fabian - two-phase short-downtime migration for containers is planed ir Proxmox 5.0?
 
Fabian - two-phase short-downtime migration for containers is planed ir Proxmox 5.0?

I'd like to see it implemented some time during the 5.x release series, but it most likely won't happen for 5.0 (or even 5.1, we'll see).
 
Sure that shared network storage like ceph, glusterfs, etc. can have problems, but local storage can have them too! :p
If the cluster hosts 100 CT in 10 nodes of 10CT with local storage, I have 10 CT down if problem happens with 1 storage. Instead of 100 CT. That's my choice.

You should understand, that it takes time to copy data from one cluster members local storage to other.
Fabian - two-phase short-downtime migration for containers is planed ir Proxmox 5.0?
I upgraded from 3.4 to 4.4 with hope this would be operational yet. I'm a bit disappointed by proxmox 4.4. I recently discovered too that it's impossible to reduce disk size of CT. That was possible with Proxmox 3... :(
 
as long as you use ZFS, you can reduce disk size of LXC.
 
If the cluster hosts 100 CT in 10 nodes of 10CT with local storage, I have 10 CT down if problem happens with 1 storage. Instead of 100 CT. That's my choice.

If one normally talks about shared storage, it's HA shared storage. Nobody should ever use a non-HA shared storage.

So you should have a cluster with a dedicated HA shared storage like a "real" SAN with multiple controllers, connections (paths), power supplies and UPS. Everything should be at least doubled, such that anything can fail and it still works great.
 
Hello
I have an LVM shared storage in icsci
I also have a container with lcx ubunt and I can not migrate online, it says I have to reboot

Can not migrate running container without --online or --restart (500)


Why is this error occurring?
 
Online migration for containers is not possible, you need to use the "restart" mode. As long as you have your data on shared storage, this works in a few seconds.
 
Online migration for containers is not possible, you need to use the "restart" mode. As long as you have your data on shared storage, this works in a few seconds.

Sorry for digging out such old thread, but this is just what I was looking for. So, I've created the LXC containter, which is turnkey-fileserver Debian 8. It runs smoothly on pve1 for example. It is added to the 'failover' HA group, so the only downtime I observed was while copying a file and then shut down pve1. It was moved (with a restart) to pve2 and was available in a while, but unfortunately all connections dropped. But after container was finally up again, I was able to connect to the Samba share again, as well as connect to the SSH of the container.

So, for LXC no way to be migrated without downtime, we can just assume that no operation is in progress in case of failure of the node.

And, for critical HA we still need to consider classic KVM VM to be able to continue, just like I saw once at my friend's office - but on the vMotion. He played Youtube on the VM, then put this node offline. vMotion transferred VM immediately to available node then Youtube didn't event stop or stuck... It was still playing. Amazing. However - is this available with Proxmox?
 

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!