Showing posts with label OpenVZ. Show all posts
Showing posts with label OpenVZ. Show all posts

Monday, 21 January 2013

/usr/sbin/pppd: No such file or directory

First Read my previous article, how to enable PPP module on OpenVZ  VPS.
http://senthilthoppur.blogspot.in/2012/12/how-to-enable-ppp-module-to-vps-on.html

You may receive the below Error while checking whether PPP module is enabled or not.


# /usr/sbin/pppd
-bash: /usr/sbin/pppd: No such file or directory

It means, the PPP package is not installed on your Linux Server. 


Use the Below command to install PPP package,

# yum install ppp


Once installed,  check whether PPP module is enabled or not.

# /usr/sbin/pppd
~ÿ}#À!}!}!} }4}"}&} } } } }%}&>à3À}'}"}(

Thursday, 27 December 2012

How to enable PPP Module to a VPS on OpenVZ

Steps to Enable PPP Module in a VPS:

To enable PPP module on a VPS, the Hardware Node should have the following module enabled.
*HN means Hardware Node

HN # modprobe ppp_async
HN # modprobe ppp_deflate
HN # lsmod | grep ppp
ppp_deflate             9793  2
zlib_deflate           21977  1 ppp_deflate
ppp_async              15169  1
crc_ccitt               6337  1 ppp_async
ppp_generic            30165  6 ppp_deflate,ppp_async
slhc                   10561  1 ppp_generic


HN # vzctl stop [VEnumber]
HN # vzctl set [VEnumber] --features ppp:on --save
HN # vzctl start [VEnumber]
HN # vzctl set [VEnumber] --devices c:108:0:rw --save

HN # vzctl exec [VEnumber] mknod /dev/ppp c 108 0
HN # vzctl exec [VEnumber] chmod 600 /dev/ppp


INSIDE THE VPS:
To check whether PPP is enabled or not:

VE# /usr/sbin/pppd

You should see gibberish in the standard output like
~�}#�!}!}!} }4}"}&} } } } }%}&)Q�}4}'}"}(}"p})



Sunday, 2 December 2012

vzquota : (error) Quota on syscall for id 101: Device or resource busy

Quota on syscall for id, Device or resource busy on OpenVZ

Failing quota off with 'Device or resource busy' error means that some file from VE private area was in use: might be some process running on HN opened it or just somebody had an ssh session opened with current dir in /vz/private/101/..

Error:

#vzctl restart 101
Restarting container
Starting container...
vzquota : (error) Quota on syscall for id 101: Device or resource busy
vzquota : (error)       Possible reasons:
vzquota : (error)       - Container's root is already mounted
vzquota : (error)       - there are opened files inside Container's private area
vzquota : (error)       - your current working directory is inside Container's
vzquota : (error)         private area
vzquota : (error)       Currently used file(s):


Try this:

# lsof 2> /dev/null | egrep '/vz/root/101 | /vz/private/101'

If any process lists, then kill that process and start the VPS again.








Sunday, 29 July 2012

Error: vzquota : (warning) Incorrect quota shutdown for id 101, recalculating disk usage


[root@Node ~]# vzctl start 101
vzquota : (warning) Incorrect quota shutdown for id 101, recalculating disk usage


Try the Below steps.
[root@Node ~]# vzquota on 101
[root@Node ~]# vzquota off 101
[root@Node ~]# vzquota on 101
[root@Node ~]# vzctl start 101



Sunday, 24 June 2012

How to Enable TUN/TAP Module in OpenVZ

OpenVZ supports VPN inside a container via kernel TUN/TAP module and device. To allow VPS #101 to use the TUN/TAP device the following should be done: 

#101 - VPS  id. Replace #101 with your VPS id.

Make sure the tun module has already loaded on the Node.
[root@Node /]#  lsmod | grep tun

If not listed, then load the tun module with the below command
[root@Node /]# modprobe tun

 [root@Node /]#  lsmod | grep tun
  tun                    82432  6

Run the following command in Node:
[root@Node /]#  vzctl set 101 --devnodes net/tun:rw --save
[root@Node /]#  vzctl set 101 --devices c:10:200:rw --save 
[root@Node /]#  vzctl stop 101 
[root@Node /]#  vzctl set 101 --capability net_admin:on --save
[root@Node /]#  vzctl start 101 
[root@Node /]#  vzctl exec 101 mkdir -p /dev/net
[root@Node /]#  vzctl exec 101 chmod 600 /dev/net/tun 

To check TUN/TAP is enabled or not :
[root@Node /]# vzctl enter 101
 
Inside the VPS: 
[root@vps /]# cat /dev/net/tun
cat: /dev/net/tun: File descriptor in bad state     # It means the TUN/TAP is enabled on your VPS.
 
 cat: /dev/net/tun: No such device     #  If you receive like this, then the TUN/TAP has not enabled on your VPS . Try to enable TUN/TAP again and check.
 

Source: http://wiki.openvz.org/VPN_via_the_TUN/TAP_device