Home » Virtualization » OpenVZ

Create users in OpenVZ Containers

Helper script to create users on all OpenVZ VEs simultaneously:   #!/bin/bash # create_ve_users.sh # Usage: ./create_ve_users.sh <username> <password> <uid> <group1,group2> USERNAME=$1 PASSWORD=$2 USERID=$3 GROUP=$4 EXPECTED_ARGS=4 OUT_FILE=.create_users_$$ if [ $# -ne $EXPECTED_ARGS ] then echo “Usage: `basename $0` <username> <password> <uid> <group1,group2>” exit 65 fi VE_LIST=$(/usr/sbin/vzlist -H -o veid) for VE in ${VE_LIST} do vzctl [...]

Update OpenVZ containers

If you manage several OpenVZ containers, here is a simple bash script to keep the OpenVZ containers upto date. #!/bin/bash # vzyum_updates.sh # updates VEs VE_LIST=$(/usr/sbin/vzlist -H -o veid | grep -v Warning) for VE in ${VE_LIST} do /usr/bin/vzyum $VE update done exit 0

Howto: Re-create/re-install a VPS

How to re-create/re-install a OpenVZ VPS? 1) Make a backup of the configuration file: cp -p /etc/sysconfig/vz-scripts/VEID.conf  /etc/sysconfig/vz-scripts/VEID.conf_old 2) Stop the VPS: vzctl stop VEID 3) Destroy/Terminate the VPS: vzctl destroy VEID 4) Create the VPS using the OS templates stored under /vz/template/cache directory: vzctl recreate VEID –ostemplate os-template-name 5) Copy the original configuration file [...]

PPP in container

Our goal is to start the pppd daemon in a virtual machine. Then it is possible, for example, to connect to your DSL provider in a VM. Caveat This feature is experimental. It currently requires a version of vzctl patched with this patch. It is also necessary to run one of these 2 kernels : 2.6.27 [...]

Unable to get tty name: Bad file descriptor

You may receive an error as “Unable to get tty name: Bad file descriptor” while accessing a VPS from the host server. The problem occur when some files from /lib directory of the VPS goes missing. See example below: root@hostserver:/# vzctl enter VEID entered into CT VEID Unable to get tty name: Bad file descriptor [...]

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

You may receive the following error message while starting a VPS: root@server [~]# vzctl start VEID vzquota : (error) Quota on syscall for id xxx: 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 [...]

Bridge Networking On OpenVZ Containers Using VETH Devices

1. Host will be open on LAN and guests on WAN. Additionally, there is a bridged LAN for guests. 2. We will be using bridge networking for protecting the Host Network and saving IP addresses, also giving flexibility with the guest network setup. 3. Configure LAN Eth1 port to 192.168.1.2 4. WAN Eth0 port is [...]

Quota getstat syscall: Inappropriate ioctl for device

You may receive the error message while starting a VPS on OpenVZ server. vzquota : (error) Quota getstat syscall for id 101: Inappropriate ioctl for device vzquota init failed [3] This is a typical Quota error message on OpenVZ servers while starting a VPS. The message indicates that you need to initialize quota on the [...]

VPS login problem: enter into Container VEID failed

You may receive the following message on accessing a VPS from the host server: # vzctl enter 101 enter into VE 101 failed Unable to open pty: No such file or directory The reason behind is the missing tty/pty files OR the udev devices. There are two ways of creating them, using the ‘MAKEDEV’ program [...]

vzquota : (error) Quota is running, stop it first

If you receive the error message “vzquota : (error) Quota is running, stop it first” while restarting a VPS, you will first have to turn off it’s quota and then drop it vzquota off  VEID vzquota drop VEID Once done, restart the VPS and it will re-initialize the quota for the VPS and will start [...]

Enter your email address:

Liên Kết Website

web design | Shared linux windows problems | Dedicated server | website chất lượng cao | hosting chất lượng cao | Tutorial video collection | Troubleshooting Tips and Tutorial