What's wrong with this picture?

SamTzu

Renowned Member
Mar 27, 2009
529
17
83
Helsinki, Finland
sami.mattila.eu
Ok. It's not a picture but still... take a look how long it took to migrate LXC container (that is on a NAS so there is nothing to actually migrate).

2018-04-23 15:53:24 shutdown CT 144
2018-04-23 15:54:06 starting migration of CT 144 to node 'vh3' (10.168.100.103)
2018-04-23 15:54:07 volume 'Q1SSD:144/vm-144-disk-1.raw' is on shared storage 'Q1SSD'
2018-04-23 15:54:07 start final cleanup
2018-04-23 15:54:11 start container on target node
2018-04-23 15:54:11 # /usr/bin/ssh -e none -o 'BatchMode=yes' -o 'HostKeyAlias=vh3' root@10.168.100.103 pct start 144
2018-04-23 15:55:13 migration finished successfully (duration 00:01:50)
TASK OK

This should be as simple as Stop (on old node) mv .conf to new node and Start (on new node.)
I'm thinking we need to do something about the LXC container migrations that are on shared drives.
 
if you take a closer look you see the following:

2018-04-23 15:53:24 shutdown CT 144
2018-04-23 15:54:06 starting migration of CT 144 to node 'vh3' (10.168.100.103)
it takes ~30s to shutdown the container (this could be faster, depending on what is in the container)

2018-04-23 15:54:11 start container on target node
2018-04-23 15:54:11 # /usr/bin/ssh -e none -o 'BatchMode=yes' -o 'HostKeyAlias=vh3' root@10.168.100.103 pct start 144
2018-04-23 15:55:13 migration finished successfully (duration 00:01:50)
and it takes more than one minute to start the container (this also depends on the container itself)

so of the 1:50 it takes, 1:30 - 1:40 is only shutting down and starting again the actual migration takes place here:

2018-04-23 15:54:06 starting migration of CT 144 to node 'vh3' (10.168.100.103)
2018-04-23 15:54:07 volume 'Q1SSD:144/vm-144-disk-1.raw' is on shared storage 'Q1SSD'
2018-04-23 15:54:07 start final cleanup
2018-04-23 15:54:11 start container on target node
which takes about 5 s
 
I just tested nested virtualization and migrated a whole KVM that had 10 (network attached) LXC containers in a few seconds.
So I couldn't migrate LXC well but I could migrate KVM with many LXC well.
It's an odd world...