×

OpenVZ commands and its Usages.

OpenVZ commands and its Usages.

OpenVZ:

OpenVZ is an operating system-level virtualization technology based on the Linux operating system.OpenVZ allows a physical server to run multiple isolated operating systems called virtual private servers.

Commands :

  • Command to list the running VPS list

# vzlist

Example:

# 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

  • Command to list running and stopped VPSs in a node

# vzlist -a

Example:

# 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

109 86 running xx.xx.xx.xx server4.test4.com

110 – stopped xx.xx.xx.xx server5.test5.com

  • To start VPS

# vzctl start CTID

Example:

    # vzctl start 110

  • To shut down VPS

# vzctl stop CTID

Example:

    # vzctl stop 110

  • To view the status of a VPS

# vzctl status CTID

Example:

    # vzctl status 110

  • To enter a VPS

# vzctl enter CTID

Example:

    # vzctl enter 106

       Entered into CT 106

  • Set hostname for a Server

# vzctl set CTID –hostname New_hostname –save

  • Add new IP to VPS

# vzctl set CTID –ipadd xx.xx.xx.xx –save

  • Delete IP from VPS

# vzctl set CTID –ipdel xx.xx.xx.xx –save

  • Reset root password of a VPS

# vzctl set CTID –userpasswd root:new_password –save

  • To add NameServer IPs to VPS

# vzctl set CTID –nameserver xx.xx.xx.xx –save

  • Delete a container

# vzctl destroy CTID

  • Suspending a container

# vzctl suspend CTID

For more information visit-Ideastack

Tags: ,

Leave a Reply

Your email address will not be published.