参考
Migrate container from OpenVZ to Linux container
copy the backup file in /var/lib/vz/template/cache/
注意点
- ZFS上でコンテナの作成、復元はできません。
-
Permission error w/ sockets inside CT since migration to PVE 4.1 | Page 2 | Proxmox Support Forum
- socketのパーミッションが755になる問題あり
755
$ ls -l /var/lib/mysql/mysql.sock
srwxr-xr-x 1 mysql mysql 0 Feb 3 16:43 /var/lib/mysql/mysql.sock
- 力技で回避したい場合は以下
/etc/rc.d/init.d/mysql
case "$mode" in
'start')
# Start daemon
# Safeguard (relative paths, core dumps..)
cd $basedir
echo $echo_n "Starting MySQL"
if test -x $bindir/mysqld_safe
then
# Give extra arguments to mysqld with the my.cnf file. This script
# may be overwritten at next upgrade.
$bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null 2>&1 &
wait_for_pid created "$!" "$mysqld_pid_file_path"; return_value=$?
# Make lock for RedHat / SuSE
if test -w "$lockdir"
then
touch "$lock_file_path"
fi
+ chmod 777 /var/lib/mysql/mysql.sock
exit $return_value
else
log_failure_msg "Couldn't find MySQL server ($bindir/mysqld_safe)"
fi
;;
CentOS6,7でデフォルトゲートウェイが設定されない
/etc/sysconfig/network
- GATEWAYDEV="venet0"
- IPV6_DEFAULTDEV="venet0"
+ GATEWAYDEV="eth0"
+ IPV6_DEFAULTDEV="eth0"
sshログインが成功しない場合
ssh PTY allocation request failed
対応
/etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
+ rm -f /dev/ptmx && ln -s /dev/pts/ptmx /dev/ptmx
touch /var/lock/subsys/local
- OS再起動しsshログインができることを確認