P r o f e s s i o n a l — M a n a g e m e n t — S o l u t i o n s
RSS icon Email icon Home icon
  • OpenVZ container error: Unable to open pty: No such file or directory

    Posted on June 26th, 2009 Admin No comments

    Today we can across one VPS having issues with pusedo terminal access. While entering into the vps from the openvz hardware node we received the following error.

    enter into VE 701 failed
    Unable to open pty: No such file or directory

    Thanks for the openvz community who helped us to fix this problem with the following fix.

    vzctl exec VEID /sbin/MAKEDEV pty
    vzctl exec VEID /sbin/MAKEDEV tty
    vzctl enter VEID

    To Fix this issue permanently:

    1. Edit the file /etc/rc.sysinit of the VPS server

    2. Comment the line
    #/sbin/start_udev

    3. Add the following lines after /sbin/start_udev:

    /sbin/MAKEDEV tty
    /sbin/MAKEDEV pty

    4. Reboot your VPS
    vzctl restart VEID

    OR

    vzctl exec veid update-rc.d -f udev remove
    vzctl restart veid

    Hopefully the above commands should help you fix your issues as well.

    Share/Save/Bookmark

  • Installing OpenVZ on CentOS

    Posted on April 21st, 2009 Admin No comments

    One virtualization product that is different from the others is OpenVZ. It will only do Linux-on-Linux virtualization as it is an OS-level virtualization product, where others are machine or hardware virtualization products. Essentially, OpenVZ is a glorified Linux chroot or BSD jail system that allows you to completely isolate processes from each other, increase security by keeping bits separate, and tightly control resource utilization. OpenVZ refers to these “virtual machines” as containers, virtual private servers (VPS), or virtual environments (VE).

    As a result, OpenVZ is much lighter on system resources than full virtualization products like VMware or Xen.

    Installing OpenVZ is quite simple. It requires a special kernel to provide the virtualization support it needs, and this can be obtained easily via the OpenVZ project itself. While the kernels are meant for RHEL4 and RHEL5, they will work on CentOS and track the upstream kernels quite closely.

    To begin, you must download the OpenVZ repository control file in order for yum to become aware of the repository, and import the repository’s GPG signing key.

    This can be done by executing:

    # cd /etc/yum.repos.d/

    # curl -OL http://download.openvz.org/openvz.repo

    # rpm –import http://download.openvz.org/RPM-GPG-Key-OpenVZ

    # yum update

    The final command downloads the repository metadata for the OpenVZ repositories. By default, only the RHEL5 and utils repositories are enabled; you can enable other repositories if you are interested in trying newer kernels. For CentOS 5, be sure to use the RHEL5 repository.

    To install the OpenVZ kernel, execute:

    # yum install ovzkernel.x86_64

    Substitute “x86_64″ above for “i386″ if you are running a 32-bit system. Once the kernel is installed, edit /boot/grub/grub.conf to make sure that the entry for the OpenVZ kernel is the default (if it is the first entry in the file, make sure that default=0 is set; if it is the third entry, use default=2; it should be the first entry, however).

    Next, edit /etc/sysctl.conf and add:

    net.ipv4.ip_forward = 1

    net.ipv4.conf.default.proxy_arp = 0

    net.ipv4.conf.all.rp_filter = 1

    kernel.sysrq = 1

    net.ipv4.conf.default.send_redirects = 1

    net.ipv4.conf.all.send_redirects = 0

    This will enable IPv4 forwarding, disable the proxy arp, enable source route verification, and disable all of the interfaces from sending redirects. It also enables the magic sysrq key. Some of these options may already be defined; if so, simply comment any you find earlier in the file.

    You will also need to disable SELinux by setting SELINUX=disabled in /etc/sysconfig/selinux.

    Now reboot the system. When it comes back up, install the OpenVZ utilities:

    # yum install vzctl.x86_64 vzquota.x86_64

    You do not need to specify the architecture on a 32-bit system; specifying it on the x86_64 platform is desirable; otherwise, it will want to install both the i386 and x86_64 packages.

    Once this is done, execute:

    # service vz start

    Installation is complete and you are ready to set up your first OpenVZ virtual machine. I’ll look at creating an OpenVZ container in the future; in the meantime you can look at the OpenVZ wiki to read about how to create OS templates. Let me know if you have any specific questions about OpenVZ.

    Share/Save/Bookmark

  • Account Creation [an error occurred while processing this directive]

    Posted on April 2nd, 2009 Admin No comments

    Sometimes you may notice problem to create a new account on your VPS server

    Create a new Account
    [an error occurred while processing this directive] Notification => aa@bb.net via EMAIL [level => 3]
    Account Creation

    The Cpanel logs reports the following error

    [root@server /]tail -f /usr/local/cpanel/logs/error_log
    edquota: Cannot set quota for user 553 from kernel on /dev/vzfs: No such process
    edquota: Can’t write quota for 553 on /dev/vzfs: No such process

    Solution.

    You just need to raise the quotagidlimit from the resource tab on the hardware node. If you do not have access to the Node ask your provider to raise the limit for you.

    Share/Save/Bookmark

  • OpenVZ basic commands

    Posted on November 13th, 2008 Admin No comments

    Following are some important commands which are normally used while working on a Hardware Node.

    vzlist -a : Shows list of all the VPS’s hosted on the Node.
    vzctl start VPS_ID: To start the VPS.
    vzctl stop VPS_ID : To stop (Shut Down) the VPS
    vzctl status VPS_ID : To view the status of the […]
    vzctl stop VPS_ID fast : to stop the VPS quickly and forcefully
    vzctl enter VPS_ID : To enter in a particular VPS

    Share/Save/Bookmark