Some Basic Important OpenVZ Commands:
Login to node to check following commands
1. To get the list of all the VPS’s hosted on the Node.
2. To start the VPS
3.To stop (Shut Down) the VPS
4. To view the status of the particular VPS
5. To stop the VPS quickly and forcefully
6. To enter in a particular VPS
Following are few VPS configuration Commands
7. To set the Hostname of a VPS.
8. To add a new IP to the hosting VPS.
9. To delete the IP from VPS.
10 To reset root password of a VPS.
11. To add the nameserver IP’s to the VPS.
12. To set memory limit for VPS
13. To set Disk quota for VPS
14. To enable offline_management
15. To set boot status
Login to node to check following commands
1. To get the list of all the VPS’s hosted on the Node.
Code:
root@server ~]#vzlist -a
2. To start the VPS
Code:
root@server ~]#vzctl start VPS_ID
3.To stop (Shut Down) the VPS
Code:
root@server ~]#vzctl stop VPS_ID
4. To view the status of the particular VPS
Code:
root@server ~]#vzctl status VPS_ID
5. To stop the VPS quickly and forcefully
Code:
root@server ~]#vzctl stop VPS_ID –fast
6. To enter in a particular VPS
Code:
root@server ~]# vzctl enter VPS_ID
Following are few VPS configuration Commands
7. To set the Hostname of a VPS.
Code:
root@server ~]#vzctl set VPS_ID --hostname server.domain.com --save
8. To add a new IP to the hosting VPS.
Code:
root@server ~]#vzctl set VPS_ID --ipadd 1.2.3.4 --save
9. To delete the IP from VPS.
Code:
root@server ~]#vzctl set VPS_ID --ipdel 1.2.3.4 --save
10 To reset root password of a VPS.
Code:
root@server ~]#vzctl set VPS_ID --userpasswd root:new_password --save
11. To add the nameserver IP’s to the VPS.
Code:
root@server ~]#vzctl set VPS_ID --nameserver 1.2.3.4 --save
12. To set memory limit for VPS
Code:
root@server ~]#vzctl set VPS_ID --slmmemorylimit 2048M --save
13. To set Disk quota for VPS
Code:
root@server ~]#vzctl set VPS_ID --diskspace 62914560 --save
14. To enable offline_management
Code:
root@server ~]#vzctl set VPS_ID --offline_management yes --save
15. To set boot status
Code:
root@server ~]#vzctl set VPS_ID --onboot no --save
Comment