I have not so far found any mention of the two problems we experienced migrating out OpenVZ containers into LXC when we upgraded to Proxmox 4, so I am memorializing them here in case they are useful to others:
Scenario: CentOS6 container (of maybe unknown template origin) running in OpenVZ under Proxmox 2.x. We followed the normal procedure for migration (proxmoxwiki Convert_OpenVZ_to_LXC) but
1) ssh into the CT gives the error
PTY allocation request failed on channel 0
shell request failed on channel 0
on the client side and
Nov 13 20:12:14 abc-vm sshd[1626]: error: openpty: No such file or directory
Nov 13 20:12:14 abc-vm sshd[1633]: error: session_pty_req: session 0 alloc failed
on the server/container side.
Unfortunately, I can not post the solution clearly because phpBB thinks I am posting a web link, maybe because it has slashes in it.
short form is that inside the container, remove slash dev slash ptmx and softlink it to slash dev slash pts slash ptmx
2) During the conversion, some of our CTs would not recognize as CentOS. (I have no idea if this is relevant to anyone but those
who used whatever templates we used to install our machines, but in case anyone else comes across this.)
The detection code found in slash usr slash share slash perl5 slash PVE slash LXC slash Setup.pm
gets diverted if it finds the file $rootfs slash etc slash lsb-release and when it turns out to not be Ubuntu, we never get to checking
for slash etc slash redhat-release to discover RedHat or CentOS. As a result we never do the conversions appropriate to CentOS and so
the converted container will not start.
This quick and dirty change resolved the problem for us: (though the indentation does not look quite like an the screen, so the
cut and paste has messed something up.)
(removed patch text)
(change the logic so it continues trying other indicators instead of failing to the end if lsb-release is present but Ubuntu is not in the file.
Hopefully this is somewhat useful to someone.
Scenario: CentOS6 container (of maybe unknown template origin) running in OpenVZ under Proxmox 2.x. We followed the normal procedure for migration (proxmoxwiki Convert_OpenVZ_to_LXC) but
1) ssh into the CT gives the error
PTY allocation request failed on channel 0
shell request failed on channel 0
on the client side and
Nov 13 20:12:14 abc-vm sshd[1626]: error: openpty: No such file or directory
Nov 13 20:12:14 abc-vm sshd[1633]: error: session_pty_req: session 0 alloc failed
on the server/container side.
Unfortunately, I can not post the solution clearly because phpBB thinks I am posting a web link, maybe because it has slashes in it.
short form is that inside the container, remove slash dev slash ptmx and softlink it to slash dev slash pts slash ptmx
2) During the conversion, some of our CTs would not recognize as CentOS. (I have no idea if this is relevant to anyone but those
who used whatever templates we used to install our machines, but in case anyone else comes across this.)
The detection code found in slash usr slash share slash perl5 slash PVE slash LXC slash Setup.pm
gets diverted if it finds the file $rootfs slash etc slash lsb-release and when it turns out to not be Ubuntu, we never get to checking
for slash etc slash redhat-release to discover RedHat or CentOS. As a result we never do the conversions appropriate to CentOS and so
the converted container will not start.
This quick and dirty change resolved the problem for us: (though the indentation does not look quite like an the screen, so the
cut and paste has messed something up.)
(removed patch text)
(change the logic so it continues trying other indicators instead of failing to the end if lsb-release is present but Ubuntu is not in the file.
Hopefully this is somewhat useful to someone.