List of basic commands for XEN VPS & OpenVZ Servers

Today in this blog we will some of the basic 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. 

What is XEN VPS?

XEN is virtualization technology isolating every single VPS account to their own disk providing dedicated kernel to each account which results in a more customizable dedicated solution. Learn more about XEN VPS

  • Provides Full Root Access of the Account
  • Dedicated RAM & CPU resources
  • Wide scope for customization
  • Disk upgrades need expertise
  • Required to reboot for upgradation
  • Independent Kernel install
  • Provides Swap Space
  • Linux & Windows both OS are supported  

List of Xen VPS some basic commands:

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

What is OpenVZ VPS?

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.

  • Provides Full Root Access of the Account
  • Offers guaranteed  & burst RAM
  • RAM & Disk Upgrades are easy
  • User friendly due to Lightweight Virtualization
  • Low Cost
  • CPU can be shared
  • Only Linux OS can be used

List of OpenVZ commands:

1. # vzlist >> List the running VPS
# vzlist
106 104 running xx.xx.xx.xx
107 46 running xx.xx.xx.xx
108 83 running xx.xx.xx.xx
109 86 running xx.xx.xx.xx

2. # vzlist -a >> list running and stopped VPSs
# vzlist -a
106 104 running xx.xx.xx.xx
107 46 running xx.xx.xx.xx
108 83 running xx.xx.xx.xx
109 86 running xx.xx.xx.xx
110 – stopped xx.xx.xx.xx

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
# 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


If you have any suggestion or queries please do comment in below section. Thank you.

Vishwajit Kale

Vishwajit Kale blazed onto the digital marketing scene back in 2015 and is the digital marketing strategist of Hostripples, a company that aims to provide affordable web hosting solutions. Vishwajit is experienced in digital and content marketing along with SEO. He's fond of writing technology blogs, traveling and reading.