Migrate an LXC container from older Proxmox version

arbermejo

New Member
Dec 19, 2018
9
0
1
29
I'm trying to migrate an LXC container from hosts with Proxmox versions 4.4-1 and 4.0-48 to 5.2-10. So what i have done untill now was a tar.gz backup and i copied it to my newer Proxmox version and restoring it, but isn't working. Any advice of what should i do??
 
what exactly is not working?
the container isn't starting, this is the output when i try to create the new container

Formatting '/mnt/pve/FreeNas/images/103/vm-103-disk-0.raw', fmt=raw size=8589934592
mke2fs 1.43.4 (31-Jan-2017)
Creating filesystem with 2097152 4k blocks and 524288 inodes
Filesystem UUID: a37799ef-4e1b-4547-8482-0ba258e3ad9a
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: 0/64 done
Writing inode tables: 0/64 done
Creating journal (16384 blocks): done
Multiple mount protection is enabled with update interval 5 seconds.
Writing superblocks and filesystem accounting information: 0/64 done

extracting archive '/var/lib/vz/template/cache/prueba_ale.tar.gz'

gzip: stdin: not in gzip format
tar: Child died with signal 13
tar: Error is not recoverable: exiting now
TASK ERROR: command 'tar xpf - -z --totals --one-file-system -p --sparse --numeric-owner --acls --xattrs '--xattrs-include=user.*' '--xattrs-include=security.capability' '--warning=no-file-ignored' '--warning=no-xattr-write' -C /var/lib/lxc/103/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 2
 
gzip: stdin: not in gzip format
Looks like your tar.gz is corrupt, did you check that the backup was created without errors and that it is a gzip compressed archive? What's the output of `file your_backup.tar.gz`?
 
Last edited:
  • Like
Reactions: arbermejo
Looks like your tar.gz is corrupt, did you check that the backup was created without errors and that it is a gzip compressed archive? What's the output of `file your_backup.tar.gz`?
No i didn't recieve any errors during the backup. I've already tried it in two ways. First with a backup on the old server and the second was making the tar.gz file by myself.

Note: Sorry the output i previously post was from the second way.

In the firs one when y restored the backup everything went fine, but when i tried to start the container it gave this error

Job for pve-container@101.service failed because the control process exited with error code.
See "systemctl status pve-container@101.service" and "journalctl -xe" for details.
TASK ERROR: command 'systemctl start pve-container@101' failed: exit code 1

and when i check with systemctl status pve-container@101.service this is what it gave me

pve-container@101.service - PVE LXC Container: 101
Loaded: loaded (/lib/systemd/system/pve-container@.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2019-02-01 12:41:36 CST; 3min 3s ago
Docs: man:lxc-start
man:lxc
man: pct
Process: 28892 ExecStart=/usr/bin/lxc-start -n 101 (code=exited, status=1/FAILURE)

Feb 01 12:41:34 pmox1 systemd[1]: Starting PVE LXC Container: 101...
Feb 01 12:41:36 pmox1 systemd[1]: pve-container@101.service: Control process exited, code=exited status=1
Feb 01 12:41:36 pmox1 systemd[1]: pve-container@101.service: Killing process 28896 (lxc-start) with signal SIGKILL.
Feb 01 12:41:36 pmox1 systemd[1]: pve-container@101.service: Killing process 28984 (apparmor_parser) with signal SIGKILL.
Feb 01 12:41:36 pmox1 systemd[1]: Failed to start PVE LXC Container: 101.
Feb 01 12:41:36 pmox1 systemd[1]: pve-container@101.service: Unit entered failed state.
Feb 01 12:41:36 pmox1 systemd[1]: pve-container@101.service: Failed with result 'exit-code'.
 
Last edited:
You can try to run
Code:
lxc-start -nCTID -lDEBUG -o/dev/stdout
to debug. CTID is the ID of the container you want to start
 
You can try to run
Code:
lxc-start -nCTID -lDEBUG -o/dev/stdout
to debug. CTID is the ID of the container you want to start
So it seems like the problem is with the containers network

lxc-start 101 20190204142109.754 ERROR conf - conf.c:run_buffer:353 - Script exited with status 2
lxc-start 101 20190204142109.321 ERROR network - network.c:lxc_create_network_priv:2446 - Failed to create network device
lxc-start 101 20190204142109.321 ERROR start - start.c:lxc_spawn:1616 - Failed to create the network
lxc-start 101 20190204142109.322 ERROR start - start.c:__lxc_start:1948 - Failed to spawn container "101"
lxc-start 101 20190204142109.323 DEBUG lxccontainer - lxccontainer.c:wait_on_daemonized_start:828 - First child 5872 exited
lxc-start 101 20190204142109.323 ERROR lxccontainer - lxccontainer.c:wait_on_daemonized_start:840 - Received container state "STOPPING" instead of "RUNNING"
lxc-start: 101: lxccontainer.c: wait_on_daemonized_start: 840 Received container state "STOPPING" instead of "RUNNING"
lxc-start 101 20190204142109.324 ERROR lxc_start - tools/lxc_start.c:main:330 - The container failed to start
lxc-start: 101: tools/lxc_start.c: main: 330 The container failed to start
lxc-start 101 20190204142109.324 ERROR lxc_start - tools/lxc_start.c:main:333 - To get more details, run the container in foreground mode
lxc-start: 101: tools/lxc_start.c: main: 333 To get more details, run the container in foreground mode
lxc-start 101 20190204142109.324 ERROR lxc_start - tools/lxc_start.c:main:336 - Additional information can be obtained by setting the --logfile and --logpriority options
 

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!