Table of Contents
Today in this blog we will learn some of the basic server commands for XEN VPS and OpenVZ Servers. We will also have a short idea about what is XEN VPS and OpenVZ technology. So without taking much time so let’s start with XEN VPS.
XEN is virtualization technology isolating every single VPS account to their own disk providing a dedicated kernel to each account which results in a more customizable dedicated solution. Learn more about how VPS can be useful.
1. xm list >> To list the VM (virtual machine)
2. xm list vpsname(vm1) >> List status of a single VM (virtual machine)
3. xm list vm1 -l >> Details for a VM
4. xm create vpsname >> Creates a new VM
5. xm reboot vpsname >> reboot the VM
6. xm shutdown vpsname >> Shutdown the VM
7. xm destroy vpsname >> To instantly stop the VM
8. xm suspend vpsname >> to suspend the VM
9. xm resume vpsname >> To resume the VM
10. xm console vpsname(vm1) >> Open console to VM
11. xm info >> Displays host information
12. xm vcpu-list >> Lists domain virtual processors
13. xm network-list >> Lists domain virtual network interfaces
14. xm uptime >> To show the uptime
15. xm top >> to monitor host and real-time
As OpenVZ VPS server technology is based on the Linux kernel and OS, each instance will perform and execute exactly like a standalone server, which can be rebooted separately and also have root access, IP address, memory, configuration files, CPU, etc. Thus you will be able to utilize more resources efficiently.
1. # vzlist >> List the running VPS
EG:
# vzlist
CTID NPROC STATUS IP_ADDR HOSTNAME
106 104 running xx.xx.xx.xx server1.test.com
107 46 running xx.xx.xx.xx server2.test.com
108 83 running xx.xx.xx.xx server3.test.com
109 86 running xx.xx.xx.xx server4.test.com
2. # vzlist -a >> list running and stopped VPSs
# vzlist -a
CTID NPROC STATUS IP_ADDR HOSTNAME
106 104 running xx.xx.xx.xx server1.test1.com
107 46 running xx.xx.xx.xx server2.test2.com
108 83 running xx.xx.xx.xx server3.test3.com
109 86 running xx.xx.xx.xx server4.test4.com
110 – stopped xx.xx.xx.xx server5.test5.com
3. # vzctl start CTID >> Start a container
# vzctl stop CTID >> Stop a container
# vzctl status CTID >> check Status
# vzctl restart CTID >> Restart container
# vzctl enter CTID >> Enter the specific container
# vzctl destroy CTID >> Delete a container
# vzctl suspend CTID >> Suspend container
4.Set hostname for a Server
# vzctl set CTID –hostname New_hostname –save
5.Add new IP to VPS
# vzctl set CTID –ipadd xx.xx.xx.xx –save
6.Delete IP from VPS
# vzctl set CTID –ipdel xx.xx.xx.xx –save
7.Reset root password of a VPS
# vzctl set CTID –userpasswd root:new_password –save
8., To add NameServer IPs to VPS
# vzctl set CTID –nameserver xx.xx.xx.xx –save
9.Executes commands for a container from node
# vzctl exec CTID command
10.# vzctl exec 101 df -h
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 130G 89G 27G 78% /
none 8.0G 4.0K 8.0G 1% /dev
none 8.0G 0 8.0G 0% /dev/shm
11, To check the resource usages
# vzcalc -v CTID
EG:
# vzcalc -v 101
Resource Current(%) Promised(%) Max(%)
Low Mem 1.53 182706895112.42 182706895112.42
Total RAM 33.79 n/a n/a
Mem + Swap 1.73 38695649865149.61 n/a
Alloc. Mem 2.95 38695649865149.61 38695649865149.61
Num. Proc 0.05 n/a 2395786836523892.00
Conclusion:
If you have any suggestions or queries related to server management or server commands please do comment in the below section. Thank you.
As the demand for virtual private servers (VPS) continues to grow, businesses and individuals are faced with a crucial decision:…
Web hosting is a large industry, as many other factors help any web hosting provider to form a company. The…
Welcome to the complete guide to WordPress security best practices in 2024. As technology evolves rapidly, implementing strong security measures…
Hey, wanted to learn about web hosting? Or do you want to start a new website and need hosting? Questions…
In today's digital world, the threat of DDoS attacks has become increasingly prevalent. These types of attacks have the power…
View Comments