OpenVZ Forum


Home » General » Support » Problem migrating Debian 3.1 physical server to OpenVZ container
Problem migrating Debian 3.1 physical server to OpenVZ container [message #51430] Thu, 29 May 2014 21:30 Go to next message
plomosa is currently offline  plomosa
Messages: 2
Registered: May 2014
Junior Member
From: *interwrx.com
HN is running CentOS 6.5, I'm using the OpenVZ kernel 2.6.32-042stab088.4 and vzctl version 4.7.2

Trying to migrate from a system running Debian 3.1, and want to move from this physical host into a virtualized container.

Followed instructions on moving from a physical server to a container. Had to FTP the files since there is not enough free space to use tar and the system does not have rsync installed.

After following the steps outlined to accomplish this, I attempt to start the container but I get a non-descript error:

Starting container...
Mounting root: /vz/root/401 /vz/private/401
Container is mounted
Setting iptables mask 0x1c000007
Setting features mask 0000000000000001/0000000000000001
Container start failed (try to check kernel messages, e.g. "dmesg | tail")
Killing container ...
Container was stopped
Running: /usr/sbin/vzquota stat 401 -f
Container is unmounted



running a dmesg | tail only shows the container started and then stopped.

I set the loglevel to 9 to see if I could get more clues, but didn't get anything else that gives me any further clues to help troubleshoot the problem. Any ideas on how to either solve the problem, or to narrow down the sources of it, or even just to generate a more descriptive error message?

vzctl.log only shows:

2014-05-29T08:49:44-0700 vzctl : CT 401 : Starting container...
2014-05-29T08:49:44-0700 vzctl : CT 401 : Mounting root: /vz/root/401 /vz/private/401
2014-05-29T08:49:44-0700 vzctl : CT 401 : Container is mounted
2014-05-29T08:49:44-0700 vzctl : CT 401 : Setting iptables mask 0x1c000007
2014-05-29T08:49:44-0700 vzctl : CT 401 : Setting features mask 0000000000000001/0000000000000001
2014-05-29T08:49:44-0700 vzeventd : CT 401 : CTID = 401, event = ve-start (len=8)
2014-05-29T08:49:44-0700 vzeventd : CT 401 : Got start event (ignored)
2014-05-29T08:49:44-0700 vzctl : CT 401 : Container start failed (try to check kernel messages, e.g. "dmesg | tail")
2014-05-29T08:49:44-0700 vzctl : CT 401 : Killing container ...
2014-05-29T08:49:44-0700 vzeventd : CT 401 : CTID = 401, event = ve-stop (len=7)
2014-05-29T08:49:44-0700 vzeventd : CT 401 : Running stop event script
2014-05-29T08:49:44-0700 vzeventd : CT 401 : Forked child 4566 for stop event
2014-05-29T08:49:44-0700 vzeventd : CT 401 : Running: /usr/libexec/vzctl/scripts/vzevent-stop
2014-05-29T08:49:45-0700 vzctl : CT 401 : Locked by: pid 4560, cmdline vzctl start 401
2014-05-29T08:49:45-0700 vzctl : CT 401 : Container already locked
2014-05-29T08:49:45-0700 vzeventd : Child 4566 exited with success
2014-05-29T08:49:46-0700 vzctl : CT 401 : Container was stopped
2014-05-29T08:49:46-0700 vzctl : CT 401 : Running: /usr/sbin/vzquota stat 401 -f
2014-05-29T08:49:46-0700 vzctl : CT 401 : Container is unmounted


Re: Problem migrating Debian 3.1 physical server to OpenVZ container [message #51432 is a reply to message #51430] Fri, 30 May 2014 20:00 Go to previous messageGo to next message
plomosa is currently offline  plomosa
Messages: 2
Registered: May 2014
Junior Member
From: *interwrx.com
I did an strace while running the vzctl start 401 command and I think it is an issue while running the set_console.sh script. Here are the results immediately preceding the failure message:


stat("/etc/vz/dists/scripts/set_console.sh", {st_mode=S_IFREG|0755, st_size=4978, ...}) = 0
open("/etc/vz/dists/scripts/set_console.sh", O_RDONLY) = 5
read(5, "#!/bin/bash\n# Copyright (C) 2012-2014, Parallels, Inc. All rights reserved.\n#\n# This program is free software; you can redistr"..., 4978) = 4978
close(5) = 0
write(1, "Running container script: /etc/vz/dists/scripts/set_console.sh\n", 63) = 63
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=327, ...}) = 0
write(3, "2014-05-30T12:31:47-0700 vzctl : CT 401 : Running container script: /etc/vz/dists/scripts/set_console.sh\n", 105) = 105
ioctl(4, 0x400c2e05, 0x7fff09472f90) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f39546d2df0) = 135669
wait4(135669, [{WIFEXITED(s) && WEXITSTATUS(s) == 4}], 0, NULL) = 135669
--- SIGCHLD (Child exited) @ 0 (0) ---
write(2, "Container start failed (try to check kernel messages, e.g. \"dmesg | tail\")", 74) = 74
write(2, "\n", 1) = 1
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=327, ...}) = 0
write(3, "2014-05-30T12:31:47-0700 vzctl : CT 401 : Container start failed (try to check kernel messages, e.g. \"dmesg | tail\")\n", 117) = 117
close(6) = 0
write(8, "O\0\0\0", 4) = -1 EPIPE (Broken pipe)
--- SIGPIPE (Broken pipe) @ 0 (0) ---
close(Cool = 0





I checked the output of the process itself that was run and see this output:



set_robust_list(0x7f39546d2e00, 0x18) = 0
pipe([5, 7]) = 0
pipe([10, 11]) = 0
pipe([12, 13]) = 0
pipe([14, 15]) = 0
fcntl(10, F_GETFL) = 0 (flags O_RDONLY)
fcntl(10, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl(12, F_GETFL) = 0 (flags O_RDONLY)
fcntl(12, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
rt_sigaction(SIGCHLD, {0x3b32417900, [], SA_RESTORER|SA_NOCLDSTOP, 0x3b314329a0}, NULL, Cool = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER, 0x3b314329a0}, NULL, Cool = 0
syscall_501(0x191, 0, 0xffffffffffffffff, 0, 0x211dc, 0x191, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1
) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f39546d2df0) = 135670
close(15) = 0
close(11) = 0
close(13) = 0
close(5) = 0
read(14, "/\0\0\0", 4) = 4
--- SIGCHLD (Child exited) @ 0 (0) ---
rt_sigreturn(0x11) = 4
close(14) = 0
close(15) = -1 EBADF (Bad file descriptor)
close(10) = 0
close(11) = -1 EBADF (Bad file descriptor)
close(12) = 0
close(13) = -1 EBADF (Bad file descriptor)
close(5) = -1 EBADF (Bad file descriptor)
close(7) = 0
exit_group(4) = ?




Any ideas?
Re: Problem migrating Debian 3.1 physical server to OpenVZ container [message #51434 is a reply to message #51430] Sun, 01 June 2014 10:28 Go to previous message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
From: *static.zebra.lt
Probably you will need to debug this yourself, or give a lot of details for us.

which instructions you have followed?
this one?
https://wiki.openvz.org/Physical_to_container

I would not use ftp for such things. a lot of permission and other problems might be.
use rsync or other tools which supports permissions, symlinks, hardlinks transfering or keeping in place.


Or if this possible, setup new CT from http://download.openvz.org/template/precreated/unsupported/d ebian-3.1-x86.tar.gz

install needed packages, replace needed config files (from physical server), copy data.

Centos 6.5
kernel 2.6.32-042stab088.4
vzctl 4.7

used template from openvz
# vzctl create 98 --layout simfs --ostemplate debian-3.1-x86
Container private area was created

# vzctl start 98
Starting container...
Container is mounted
Setting CPU units: 1000
Container start in progress...

]# vzctl enter 98
entered into CT 98
# ps faux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 1592 520 ? Ss 14:10 0:00 init [2]
root 2 0.0 0.0 0 0 ? S 14:10 0:00 [kthreadd/98]
root 3 0.0 0.0 0 0 ? S 14:10 0:00 \_ [khelper/98]
root 175 0.0 0.2 1636 540 ? Ss 14:10 0:00 /sbin/syslogd
root 184 0.0 0.3 3552 892 ? Ss 14:10 0:00 /usr/sbin/sshd
root 191 0.0 0.2 2248 772 ? Ss 14:10 0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive
root 268 0.0 0.6 6792 1672 ? Ss 14:10 0:00 sendmail: MTA: accepting connections
root 282 0.0 0.2 1828 648 ? Ss 14:10 0:00 /usr/sbin/cron
root 287 0.0 0.8 7216 2208 ? Ss 14:10 0:00 /usr/sbin/apache2 -k start -DSSL
www-data 289 0.0 0.6 7216 1696 ? S 14:10 0:00 \_ /usr/sbin/apache2 -k start -DSSL
root 294 0.0 0.1 1580 448 ? Ss+ 14:10 0:00 /sbin/mingetty console
root 295 0.0 0.1 1580 460 tty2 Ss+ 14:10 0:00 /sbin/mingetty tty2
root 296 0.0 0.2 27528 716 ? Ss 14:11 0:00 vzctl: pts/0
root 297 0.0 0.5 2628 1400 pts/0 Ss 14:11 0:00 \_ -bash
root 301 0.0 0.3 2568 812 pts/0 R+ 14:11 0:00 \_ ps faux

# cat /etc/debian_version
3.1


Previous Topic: VPS remains offline.
Next Topic: file system in / vz / private / xxx backup / restore
Goto Forum:
  


Current Time: Tue Sep 25 11:59:01 GMT 2018