Fix: fixquota fails with journaled quota support: not available with vzaquota (disabled)

If you’re running cPanel server on a OpenVZ hardware node, you might face issues with quota for few reasons:

1. Secondary quota might not have been enabled on hardware node.

You can verify by checking for “DISK_QUOTA=yes” in /etc/vz/conf/vz.conf

Also, QUOTAUGIDLIMIT needs to be set for the VPS in  /etc/sysconfig/vz-scripts/CT_ID.conf (PS: CT_ID is the container id of the VPS)

2. You should have initialized the quota via WHM.

If you continue to face problem even after applying both fixes, re-initializing quota might help as per http://wiki.openvz.org/Cpanel_quotas  Here is the excerpt:

WHM/Cpanel, a popular commercial web-based control panel for Linux, has a tendency to overwrite the special quota files in the VE context. I am referring to:

lrwxr-xr-x 1 root root 39 Jun 8 17:27 aquota.group -> /proc/vz/vzaquota/00000073/aquota.group
lrwxr-xr-x 1 root root 38 Jun 8 17:27 aquota.user -> /proc/vz/vzaquota/00000073/aquota.user

The result of these being overwritten will be WHM showing “unlimited” quota reports for all users in the system. An quick solution to this is to run these commands from within the VE as root:

rm -rf /aquota.user 2>/dev/null
rm -rf /aquota.group 2>/dev/null
unlink /aquota.user 2>/dev/null
unlink /aquota.group 2>/dev/null
for x in `find /proc/vz/vzaquota/ | tail -2 `; do ln -s $x / ; done

journled quota support warning didn’t get resolved even after this. Yet to check for the core reason for the same.

Enable ip from different subnet on OpenVZ Server

If you want to run virtual machines of different ip subnets from your node you will have to enable a parameter in /etc/vz/vz.conf.

Following is the remedy for those who are facing issues working with multiple subnet ip’s

# Controls which interfaces to send ARP requests and modify ARP tables on.
NEIGHBOUR_DEVS=all

Tags:


Fix: iptables: Unknown error 4294967295

Following error is noticed when you are running in the VM.

: Unknown error 4294967295

Main reason for this error iptables support missing in OpenVZ.

Here are the quick steps to resolve this issue permanently:

1. Define which iptables modules are available for VEs.

a)
Edit /etc/sysconfig/iptables-config file on a OpenVZ hardware node:

IPTABLES_MODULES=”ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp”

b)
Edit /etc/sysconfig/vz file on a OpenVZ hardware node:

IPTABLES=”ipt_REJECT
ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp”

Note:- iptables modules list in IPTABLES and IPTABLES_MODULES parameters in /etc/sysconfig/vz and /etc/sysconfig/iptables-config files should be placed in one single line, no linebreaks is allowed in this parameter.

Restart OpenVZ server
# service vz restart

2. Increase ‘numiptent’ parameter for the VE you need to install APF into. This parameter limits the amount of iptables rules available for a VE. Default APF configuration requires ~400 rules. Lets set it to 400 in the example below for VE #101:

# vzctl set 101 --numiptent 400 --save

3. Start APF inside the VE:
# /etc/init.d/apf start

Tags: , ,


Fix: OpenVZ Container already locked

Unable to restart VPS on your OpenVZ box? Does is fail with the following error? Container already locked Tried “vzctl restart VEID” and “vzctl start VEID –force” or “vzctl stop VEID –fast” Here is how you can fix it: 1. …

Read more »


Fix:Unable to ping veth device on proxmox

Virtual Ethernet devices of the OpenVZ VM’s inside ProxMox is connected to a bridge. After installing ProxMox and creating virtual nodes, I found that public ips allocated inside VM’s were not reachable to world.

A quick fix for this issue is to ensure that Proxy ARP and IP Forwarding is configured fine.

Check these lines:

# ifconfig vzbr0 0
# echo 1 > /proc/sys/net/ipv4/conf/vzbr0/forwarding
# echo 1 > /proc/sys/net/ipv4/conf/vzbr0/proxy_arp

You can read more information about OpenVZ Virtual Ethernet devices in bridge mode configuration check this link.