How to migrate container online ?

Kan

Active Member
Dec 21, 2016
81
4
28
52
Hello,

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

Proxmox 4.4.

Thx for any help.
 

fabian

Proxmox Staff Member
Staff member
Jan 7, 2016
7,670
1,448
164
if you want short downtime, use shared storage (then the downtime is essentially the time it takes for your container to reboot)
 

Ashley

Member
Jun 28, 2016
267
15
18
32
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.
 

Kan

Active Member
Dec 21, 2016
81
4
28
52
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.
 

snpz

Active Member
Mar 18, 2013
33
4
28
I would use local and shared storage combined in your case.
Critical VM's run on shared storage and non critical on local dir.
 

Kan

Active Member
Dec 21, 2016
81
4
28
52
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 ?
 

fabian

Proxmox Staff Member
Staff member
Jan 7, 2016
7,670
1,448
164
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.
 

snpz

Active Member
Mar 18, 2013
33
4
28
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

Proxmox Staff Member
Staff member
Jan 7, 2016
7,670
1,448
164
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).
 

Kan

Active Member
Dec 21, 2016
81
4
28
52
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... :(
 

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
15,540
921
163
as long as you use ZFS, you can reduce disk size of LXC.
 

LnxBil

Famous Member
Feb 21, 2015
6,347
786
163
Saarland, Germany
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.
 

Proxmoxgoogle

Member
Mar 21, 2017
74
0
11
33
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?
 

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
15,540
921
163
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.
 

twinsen

Member
Feb 3, 2018
5
1
8
46
Midrand
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 your own in 60 seconds.

Buy now!