Qual é o procedimento correto para mover um contêiner do Linux para um novo host? Aqui está o que eu fiz sem sucesso:
sudo tar -cjf sample_container.tar.bz2 <path-to-container>/sample_container
com o caminho para o novo
sudo -jxvf sample_container.tar.bz2
(por exemplo, caminho no novo host) Seguir os passos acima parece não funcionar. O que estou fazendo de errado?
Atualização: Aqui está a saída do log que recebo quando tento rodar o container:
lxc-start 20161111164704.185 ERROR lxc_conf - conf.c:mount_rootfs:807 - Permission denied - failed to get real path for '/home/newhost/dir1/dir2/lxc/mycontainer_trusty_lxc/rootfs'
lxc-start 20161111164704.185 ERROR lxc_conf - conf.c:setup_rootfs:1221 - failed to mount rootfs
lxc-start 20161111164704.185 ERROR lxc_conf - conf.c:do_rootfs_setup:3631 - failed to setup rootfs for 'mycontainer_trusty_lxc'
lxc-start 20161111164704.185 ERROR lxc_conf - conf.c:lxc_setup:3713 - Error setting up rootfs mount after spawn
lxc-start 20161111164704.185 ERROR lxc_start - start.c:do_start:834 - failed to setup the container
lxc-start 20161111164704.185 ERROR lxc_sync - sync.c:__sync_wait:57 - An error occurred in another process (expected sequence number 3)
lxc-start 20161111164704.185 ERROR lxc_start - start.c:__lxc_start:1354 - failed to spawn 'mycontainer_trusty_lxc'
lxc-start 20161111164709.723 ERROR lxc_start_ui - tools/lxc_start.c:main:344 - The container failed to start.
lxc-start 20161111164709.723 ERROR lxc_start_ui - tools/lxc_start.c:main:346 - To get more details, run the container in foreground mode.
lxc-start 20161111164709.723 ERROR lxc_start_ui - tools/lxc_start.c:main:348 - Additional information can be obtained by setting the --logfile and --logpriority options.
Tags lxc migration containers