Migrated Container: 1 (of 3) LXC Container not start after migrate

pxo

Renowned Member
Nov 3, 2013
29
0
66
Hello,

i updated Proxmox Cluster with 2 Nodes to Version 4, all works fine.

1 Problem with 1 from 3 migrated openVZ Containers:
2 converted openVZ to LXC Container starts without Problem.
1 Container starting not after the convert.

When i start the Container i see only:
Code:
Connected to tty 1
Type <Ctrl+a q> to exit the console, <Ctrl+a Ctrl+a> to enter Ctrl+a itself

I Backed up all 3 Containers before Migrate the Node to Version 4.
The Problem Container is a Debian Jessie with ISPCONFIG3.
Installed from Years with the openVZ Wheezy Template..

Any Ideas ?
 
The Restore Log:
Code:
Formatting '/mnt/pve/kvm/images/115/vm-115-disk-1.raw', fmt=raw size=10737418240
mke2fs 1.42.12 (29-Aug-2014)
Creating filesystem with 2621440 4k blocks and 655360 inodes
Filesystem UUID: 13f78ae1-a0fd-4e92-9a05-800910b5fc57
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

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

extracting archive '/mnt/pve/bak-px2/dump/vzdump-openvz-115-2015_10_30-19_55_33.tar.lzo'
tar: ./var/www/clients/client0/web1/tmp/owncloud-ocdvqx76ehqd/LDAP-Proxy-0f2d77c0017b5fe931fd163342690635: time stamp 2015-11-05 21:08:29 is 494194.596016113 s in the future
tar: ./var/www/clients/client0/web1/tmp/owncloud-ocdvqx76ehqd/LDAP-Proxy-036b0bfd2676d5732df3d80eb3e078af: time stamp 2015-11-20 13:16:31 is 1761876.595915782 s in the future
tar: ./var/www/clients/client0/web1/tmp/owncloud-ocdvqx76ehqd/LDAP-Proxy-21ae93ecbcf88f0d27fd690ae48ae2ef: time stamp 2015-11-05 21:07:07 is 494112.595779514 s in the future
Total bytes read: 5829672960 (5.5GiB, 21MiB/s)
Detected container architecture: amd64
###########################################################
Converting OpenVZ configuration to LXC.
Please check the configuration and reconfigure the network.
###########################################################
TASK OK
 
1 Container starting not after the convert.

When i start the Container i see only:
Code:
Connected to tty 1
Type <Ctrl+a q> to exit the console, <Ctrl+a Ctrl+a> to enter Ctrl+a itself

But that indicates that the container is already started - just the console is not working?
 
Thanks for reply.

Start OK, i see the screen in post 1.
The IP is pingable.
No Services starting.
i can login with pct enter 115.
in /var/log i see no actual logs.

i view in the /etc/inittab and compare with functional lcx container, is the self lines:
Code:
1:2345:respawn:/sbin/getty --noclear 38400 tty1
2:23:respawn:/sbin/getty --noclear 38400 tty2
 
Code:
root@px1 /etc/pve/lxc > pct exec 115 ps -- auxww
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.2  28604  4708 ?        Ss   12:07   0:00 /sbin/init
root       215  0.0  0.2  32960  5300 ?        Ss   12:07   0:00 /lib/systemd/systemd-journald
root       443  0.0  0.1  37068  2660 ?        Ss   12:07   0:00 /sbin/rpcbind -w
statd      462  0.0  0.2  40408  6068 ?        Ss   12:07   0:00 /sbin/rpc.statd
root       488  0.0  0.0   4328   740 console  Ss+  12:07   0:00 /bin/sh -c /sbin/sulogin; /bin/systemctl --fail --no-block default
root       496  0.0  0.0  23816  1932 console  S+   12:07   0:00 /sbin/sulogin
root       577  0.0  0.1  20564  2496 pts/0    R+   12:09   0:00 ps auxww
 
thank you for the helpful question :)

Code:
journalctl
Oct 31 12:07:58 web systemd[1]: var-www-clients-client0-web2-log.mount mount process exited, code=exited status=
Oct 31 12:07:58 web systemd[1]: Failed to mount /var/www/clients/client0/web2/log.
Oct 31 12:07:58 web systemd[1]: Dependency failed for Local File Systems.
Oct 31 12:07:58 web systemd[1]: Triggering OnFailure= dependencies of local-fs.target.
Oct 31 12:07:58 web systemd[1]: Unit var-www-clients-client0-web2-log.mount entered failed state.
Oct 31 12:07:58 web systemd[1]: var-www-clients-client0-web1-log.mount mount process exited, code=exited status=
Oct 31 12:07:58 web systemd[1]: Failed to mount /var/www/clients/client0/web1/log.
Oct 31 12:07:58 web systemd[1]: Unit var-www-clients-client0-web1-log.mount entered failed state.

i edit the /etc/fstab, an comment out the mounts come from ISPCONFIG3.
Code:
root@web / > cat /etc/fstab
# UNCONFIGURED FSTAB FOR BASE SYSTEM
#/var/log/ispconfig/httpd/cloud.domain.net /var/www/clients/client0/web1/log    none    bind,nobootwait    0 0
#/var/log/ispconfig/httpd/domain.net /var/www/clients/client0/web2/log    none    bind,nobootwait    0 0

reboot the LXC and yeap -> booting..

what must i to for this error:
Code:
Oct 31 12:48:16 web networking[245]: Configuring network interfaces...venet0: ERROR while getting interface flags: No such device
Oct 31 12:48:16 web networking[245]: Failed to bring up venet0.
Oct 31 12:48:16 web networking[245]: Cannot find device "venet0:0"
Oct 31 12:48:16 web networking[245]: Failed to bring up venet0:0.
 
what must i to for this error:
Code:
Oct 31 12:48:16 web networking[245]: Configuring network interfaces...venet0: ERROR while getting interface flags: No such device
Oct 31 12:48:16 web networking[245]: Failed to bring up venet0.
[/QUOTE]

Just remove any reference to venet0 from /etc/network/interfaces - that is OpenVZ specific, and not required for LXC
 
I was wondering why ISPconfig log files were not working and here is the reason. Bind mounts fail. Is this apparmour @work? How can we get the fstab working with ISPconfig, LXC and internal bind mounts?
Code:
mount: block device /var/log/ispconfig/httpd/test8.s1.tila.eu is write-protected, mounting read-only
mount: cannot mount block device /var/log/ispconfig/httpd/test8.s1.tila.eu read-only
 
I have the same problem with mount as SamTzu described. Is there any solution?

Code:
mount: block device /var/log/ispconfig/httpd/xyz is write-protected, mounting read-only
mount: cannot mount block device /var/log/ispconfig/httpd/xyz read-only
 
I found a solution:

On the host edit /etc/apparmor.d/lxc/lxc-default
It should look like
Code:
profile lxc-container-default flags=(attach_disconnected,mediate_deleted) {
  ...
    mount options=(ro, bind),
  ...

And then

Code:
service apparmor reload
 
  • Like
Reactions: SamTzu

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!