I installed openvz in a debian etch as described at http://wiki.openvz.org/Installation_on_Debian#Etch_.28testin g.29 But openvz fails when I execute /etc/init.d/vz start Any pointers? However, on a server running centos4.4, openvz gets installed very easily.
Re: OpenVZ fails to start in Debian Etch
Quote: But openvz fails when I execute /etc/init.d/vz start Can you elaborate on this? I.e. what is the exact error? Can you run it with «sh -x» prepended and post output here? Also, what is the kernel version reported?
Hi Zenny, what kind of errors occures ?
when I try to run the /etc/init.d/vz start then it gives an output: # /etc/init.d/vz start Starting OpenVZ: ..failed That's it. I consulted another thread with the similar problem with Debian 3.2 but the problem does not seem to match with mine! The reference thread is http://forum.openvz.org/index.php?t=tree&goto=7741&& amp;srch=debian+etch#msg_7741 Thanks
Try to run it as # sh -x /etc/init.d/vz start and see what happens
Kir: Please find below the output: # sh -x /etc/init.d/vz start + VZCONF=/etc/vz/vz.conf + '[' -f /etc/vz/vz.conf ']' + . /etc/vz/vz.conf ++ VIRTUOZZO=yes ++ LOCKDIR=/var/lib/vz/lock ++ DUMPDIR=/var/lib/vz/dump ++ VE0CPUUNITS=1000 ++ LOGGING=yes ++ LOGFILE=/var/log/vzctl.log ++ LOG_LEVEL=0 ++ DISK_QUOTA=yes ++ VZFASTBOOT=no ++ TEMPLATE=/var/lib/vz/template ++ VE_ROOT=/var/lib/vz/root/ ++ VE_PRIVATE=/var/lib/vz/private/ ++ CONFIGFILE=vps.basic ++ DEF_OSTEMPLATE=fedora-core-4 ++ VZWDOG=no ++ IPTABLES='ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length' + '[' yes = no ']' + VZCTL=/usr/sbin/vzctl + VZQUOTA=/usr/sbin/vzquota + LOCKFILE=/var/lock/vz_lock + LICVIEW=/usr/sbin/vzlicview + PROC_VZVEINFO=/proc/vz/veinfo + '[' -x /usr/sbin/vzctl ']' + VZDEV=venet0 + PRELOAD_MODULES=af_packet + MODULES='vzmon vzdquota vzdev' + CPT_MODULES='vzcpt vzrst' + VETH_MODULES=vzethdev + MODULES_OTHER='vzcompat vzcpt vzrst vzethdev' + NET_MODULES='vznetdev vznet' + IPT_MODULES='ip_tables ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length' + '[' no = yes ']' + CONFIG_DIR=/etc/vz/conf + rc_done=..done + rc_failed=..failed + '[' -r /etc/init.d/functions ']' + '[' -r /etc/rc.status ']' + VEINFO= + RETVAL=0 + PARALLEL=4 + cd / + case "$1" in + start + local veid + local velist + local msg + lockfile /var/lock/vz_lock + local TEMPFILE=/var/lock/vz_lock.7214 + local LOCKFILE=/var/lock/vz_lock + echo 7214 + ln /var/lock/vz_lock.7214 /var/lock/vz_lock ++ cat /var/lock/vz_lock + kill -0 6008 + ln /var/lock/vz_lock.7214 /var/lock/vz_lock + rm -f /var/lock/vz_lock + echo 7214 + return 0 + '[' -f /var/lock/vz ']' + '[' '!' -e /dev/vzctl ']' + __echo 'Starting OpenVZ: ' + '[' '' = redhat ']' + echo -n 'Starting OpenVZ: ' Starting OpenVZ: + load_modules 'ip_tables ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length' + local 'modules=ip_tables ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length' + local mod + for mod in '${modules}' + /sbin/lsmod + grep -qw ip_tables + continue + for mod in '${modules}' + /sbin/lsmod + grep -qw ipt_REJECT + continue + for mod in '${modules}' + /sbin/lsmod + grep -qw ipt_tos + continue + for mod in '${modules}' + /sbin/lsmod + grep -qw ipt_limit + /sbin/modprobe ipt_limit + for mod in '${modules}' + /sbin/lsmod + grep -qw ipt_multiport + /sbin/modprobe ipt_multiport + for mod in '${modules}' + grep -qw iptable_filter + /sbin/lsmod + continue + for mod in '${modules}' + /sbin/lsmod + grep -qw iptable_mangle + continue + for mod in '${modules}' + /sbin/lsmod + grep -qw ipt_TCPMSS + continue + for mod in '${modules}' + /sbin/lsmod + grep -qw ipt_tcpmss + /sbin/modprobe ipt_tcpmss + for mod in '${modules}' + /sbin/lsmod + grep -qw ipt_ttl + continue + for mod in '${modules}' + /sbin/lsmod + grep -qw ipt_length + /sbin/modprobe ipt_length + for MOD in '$PRELOAD_MODULES' + /sbin/modprobe -r af_packet + /sbin/modprobe af_packet + for MOD in '$MODULES' + /sbin/modprobe vzmon + RETVAL=1 + '[' 1 -ne 0 ']' + print_failure 'Loading module vzmon' + '[' '' = redhat ']' + echo -n ..failed ..failed+ echo + return 1 + exit 1
Looks like vzmon OpenVZ kernel module fails to load. Does dmesg|tail shows anything bad? What happens if you try to run modprobe vzmon?
The outputs are as follows: # modprobe vzmon FATAL: Module vzmon not found. dmesg | tail lp0: using parport0 (interrupt-driven). ppdev: user-space parallel port driver NET: Registered protocol family 10 lo: Disabled Privacy Extensions IPv6 over IPv4 tunneling driver ip_tables: (C) 2000-2006 Netfilter Core Team [drm] Initialized drm 1.0.1 20051102 ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 16 (level, low) -> IRQ 58 [drm] Initialized i915 1.5.0 20060119 on minor 0 eth0: no IPv6 routers present
Looks like you haven't set CONFIG_VE_CALLS=m option in kernel .config while configuring/compiling the kernel. Please recompile the kernel with this option set to "m".
Thank you Kir for the advise. I recompiled the kernel and it works now. I have another question. The /etc/vz/vz.conf files reads like: ## Global parameters VIRTUOZZO=yes LOCKDIR=/var/lib/vz/lock DUMPDIR=/var/lib/vz/dump VE0CPUUNITS=1000 ## Logging parameters LOGGING=yes LOGFILE=/var/log/vzctl.log LOG_LEVEL=0 ## Disk quota parameters DISK_QUOTA=yes VZFASTBOOT=no # The name of the device whose ip address will be used as source ip for VE. # By default automatically assigned. #VE_ROUTE_SRC_DEV="eth0" ## Template parameters TEMPLATE=/var/lib/vz/template ## Defaults for VEs VE_ROOT=/var/lib/vz/root/$VEID VE_PRIVATE=/var/lib/vz/private/$VEID CONFIGFILE="vps.basic" DEF_OSTEMPLATE="fedora-core-4" ## Load vzwdog module VZWDOG="no" IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length" But I want to point it to a seperate partition with /vz as mountpoint instead of /var/lib/vz for the private VEs. Is it enough to change the path in the vz.conf file or do I need to relink other stuffs too? And I did see an empty /var/lib/vz/vzctl directory also. I could not see the rational of that? Thank you again. PS: After reading this thread ( http://forum.openvz.org/index.php?t=msg&goto=5126&&a mp;srch=%2Fvar%2Flib#msg_5126), I realized that why it is so. However, is it worth mounting the /var/lib/vz to /vz or will it break something?
Hi zenny, The debian install of vzctl package follows the "filesystem hierachy standard (fhs) -> http://www.pathname.com/fhs/ so the VZROOT is set to /var/lib/vz. For a "backward" compability, you can create a symbolic link to /vz: # ln -s /var/lib/vz /vz In your case, mount your seperate partion to /var/lib/vz, or change the vz.conf setting to your mountpoint. e.g: LOCKDIR=/var/lib/vz/lock DUMPDIR=/var/lib/vz/dump TEMPLATE=/var/lib/vz/template VE_ROOT=/var/lib/vz/root/$VEID VE_PRIVATE=/var/lib/vz/private/$VEID Change /var/lib/vz/ to your needed path