We get this error while trying to enter VPS from hardware node when VPS gets hang or it is running our of memory space.
==========
[root@server ~]# vzctl enter 1212
Unable to fork: Cannot allocate memory
==========
run the command to check the disk space in the VPS.
=========
vzctl exec 1212 df -Th
=========
If disk space is full increase the disk space of VPS and it will start to work and If disk space is not full just reboot the server it will start to work also if while running above command if you get the same error reboot the server and then give it a try.
This blog will help you troubleshoot issues in linux servers, windows servers and web hosting applications...
Showing posts with label Virtual Private server Issues. Show all posts
Showing posts with label Virtual Private server Issues. Show all posts
Wednesday, February 12, 2014
Saturday, October 12, 2013
Important openVZ Commands
- VZ Information To list all the running/stopped VPS in the node
vzlist -a
- List all the running VPS in the node it will show only running VPS.
vzlist
- Display the templates present in the server
vzpkgls
- Creating a VPS To create a VPS with VEID 1212 and OStemplate centos-cpanel with vps.basic configuration
vzctl create 1212 --ostemplate centos-cpanel -.config vps.basic
- Deleting a VPS To destroy a VPS with VEID 1212
vzctl destroy 1212
- Configuring VPS (The changes are saved in /etc/vz/conf/<VEID>.conf) To automatically boot when a node is up
vzctl set 1212 --onboot yes --save
- Set hostname
vzctl set 1212 --hostname test1212.my.org --save
- Add an IP address
vzctl set 1212 --ipadd 192.123.192.2 --save
- Delete an IP address
vzctl set 1212 --ipdel 192.123.192.2 --save
- Set the name servers
vzctl set 1212 --nameserver 192.122.12.1 --save
- Set the root password of VPS 1212
vzctl set 1212 --userpasswd root:password
- Set shortname for VPS
vzctl set 1212 --name test1212 --save
- Start/Stop/Restart VPS To start a VPS
vzctl start 1212
vzctl stop 1212
vzctl restart 1212
- Start a disabled VPS
vzctl start 1212 --force
- Stop a VPS
vzctl stop 1212
- Restart a VPS
vzctl restart 1212
- Check the status of a VPS
vzctl status 1212
- Disable a VPS
vzctl set 1212 --disabled yes
- Enable a VPS
vzctl set 1212 --disabled no
- Suspend a VPS
vzctl suspend 1212
- Resume a VPS
vzctl resume 1212
- Run yum update on a VPS
vzyum 1212 -y update
- Install a package using yum on VPS
vzyum 1212 -y install package
- Install a package using rpm on VPS
- Get the details of the VPS like VEID, ClassID, number of processes inside each VPS and the IP addresses of VPS
cat /proc/vz/veinfo
- Enter into a VPS 1212
vzctl enter 1212
- Execute a command in VPS from the hardware node 1212
vzctl exec 1212 command
vzctl exec 1212 df -h
- Managing Disk Quotas To assign disk quotas – First limit is soft limit, second limit is hard limit
vzctl set 1212 --diskspace 10485760 --save --> for setting 10GB
OR
vzctl set 1212 --diskspace 1048576 --save --> for setting 1GB
- Assign disk inodes
vzctl set 1212 --diskinodes 90000:91000 --save
- Check the disk quota of a VPS
vzquota stat 1212 -t
- Managing CPU quota To display the available CPU power
vzcpucheck
- Set the number of CPUs available to a VPS
vzctl set 1212 --cpus 2 --save
- Set the minimum and maximum CPU limits
vzctl set 1212 --cpuunits nnnn --cpulimit nn --save
(cpuunits is a an absolute number (fraction of power of the node) and cpulimit is taken as percentage)
- Managing memory quota To display memory usage
vzmemcheck -v
- Set kmem
vzctl set 1212 --kmemsize 2211840:2359296 --save
- Set privvmpages
vzctl set 1212 --privvmpages 2G:2G --save
*Note 1212 is the container or vps id.
Friday, October 11, 2013
VPS down Unable to add IP Address already in use Container start failed
The issue is because there is misconfiguration in the IP assigned to the server to resolve the issue follow the steps below.
============
============
[root@node ~]# vzctl start 2413 --force
Starting container ...
Container is mounted
Adding IP address(es): 192.192.192.192 193.193.193.193
Unable to add IP 193.193.193.193: Address already in use
Container start failed (try to check kernel messages, e.g. "dmesg | tail")
Stopping container ...
Container was stopped
Container is unmounted
============
============
unable to add IP(193.193.193.193) that means additional IP has been assigned to current VPS is already assigned to some other VPS too, To resolve the issue we have remove it, If it is assigned to only one single VPS then remove the IP and reassign it from solusVM.
- Login to Hardware Node
- cd /etc/vz/conf
- vi containerid.conf
- remove IP from this file which does not belong to that VPS then run below command
- vzctl start 2413 --force
Thursday, October 03, 2013
Autoftpbackup configuration on solusvm
Create ftp account in the Backup server (You will need the login credentials of FTP account while configuring backup in solusvm)
*Note Make sure port 21 is open in backup-server.
Login to solusVM
Admin control-panel >> Nodes >> List >> Manage Node (On the Node you wish to backup) >> Auto FTP Backup
Under FTP Server Settings
Profile —-(Make it default)
IP or Hostname—-backup-server.com (FTP server ip or hostname)
Username—-(FTP user name)
Password—-(FTP user password)
Port—-(port 21)
Passive—-(Enable)
Directory—-(/ is default)
IP or Hostname—-backup-server.com (FTP server ip or hostname)
Username—-(FTP user name)
Password—-(FTP user password)
Port—-(port 21)
Passive—-(Enable)
Directory—-(/ is default)
Under Backup Settings
Enabled—-(Enable)
Frequency—-( Run the backup every day, week or month)
Run Time—-(00-23 hours, 00-59 mins)
Day—-(Only required for weekly)
Day of Month—-(Only required for monthly)
Rotation—-(Value=1)
Ionice Priority—-(Value=0)
Ionice Class—-(Value=0)
Nice—-(Value=19)
Xen HVM/KVM Compression Type—- (bzip2)
pbzip2 Threads (Xen/KVM)—-(Value=1)
OpenVZ Backup Type—-(Online)
KVM/Xen Backup Type—-(Online)
OpenVZ Temp Directory—-(/vz/dump)
KVM/Xen Temp Directory—-(/tmp)
Exclude VPS—-(CTRL + Click to select multiple)
Frequency—-( Run the backup every day, week or month)
Run Time—-(00-23 hours, 00-59 mins)
Day—-(Only required for weekly)
Day of Month—-(Only required for monthly)
Rotation—-(Value=1)
Ionice Priority—-(Value=0)
Ionice Class—-(Value=0)
Nice—-(Value=19)
Xen HVM/KVM Compression Type—- (bzip2)
pbzip2 Threads (Xen/KVM)—-(Value=1)
OpenVZ Backup Type—-(Online)
KVM/Xen Backup Type—-(Online)
OpenVZ Temp Directory—-(/vz/dump)
KVM/Xen Temp Directory—-(/tmp)
Exclude VPS—-(CTRL + Click to select multiple)
Then click “update”
Restoring container through backup
Migrate backup file from backup server to hardware node.
User the command to restore backup.
/usr/sbin/vzdump –restore /path/to/backup/file NEW-CONTAINER-ID
make sure the new-container-id assigned does not belong to any other existing container.
Start the Container
vzctl start NEW-CONTAINER-ID
*Note you can also see the logs of current proceeding of backup process in the solusVM by following the steps belowAdmin control-panel >> Nodes > List > Manage Node (On the Node you wish to backup) > Auto FTP Backup.
At the bottom of the page you can see the live logs.
Friday, September 20, 2013
VPS down Container start disabled
VPS Not responding to ping
SSH try to restart
vzctl start 10674
give error container start disabled.
Try to start or restart forcefully
vzctl restart 10674 --force