SERVER MANAGEMENT

How to create a VPS in OpenVZ

openvz network bug
openvz network bug

What is OpenVZ?

OpenVZ is an operating system-level virtualization technology based on the Linux operating system. It allows multiple operating system instances (containers) on a single physical server. In OpenVZ, both the host and guest OS should be Linux. This is due to the OpenVZ uses a single patched Linux kernel.

How to create a VPS in OpenVZ

Please note that if you would like to create a VPS in OpenVZ, you need to download its templates to the directory /vz/template/cache. More OS templates can be download from Here

Commands to download CentOS 6 template

 
cd /vz/template/cache/
wget http://download.openvz.org/template/precreated/centos-6-x86_64.tar.gz

Create VPS

Once you downloaded the template of the desired OS, please run the following commands to Create a VPS

 
vzctl create <VPS ID> --ostemplate centos-6-x86_64

Set IP for VPS

 
vzctl set <VPS ID> --ipadd <IP Address> --save

Make sure VPS boots automatically after a reboot

 
vzctl set <VPS ID> --onboot yes --save

Set Nameservers IP for VPS

 
vzctl set <VPS ID> --nameserver 8.8.8.8 --save
vzctl set <VPS ID> --nameserver 8.8.4.4 --save

Set Hostname IP for VPS

 
vzctl set <VPS ID> --hostname <desired Hostname> --save

Set Disk quota for VPS

 
vzctl set <VPS ID> --diskspace 10G:11G --save

Set RAM and SWAP

 
vzctl set <VPS ID> --ram 1G --swap 1G --save

Start the VPS

 
vzctl start <VPS ID>

Set root password

 
vzctl exec <VPS ID> passwd

You have now done with creating a VPS in OpenVZ! Also, you can find Basic OpenVZ commands from Here

If you like this post and wish to receive more articles from us, please like our FB page: Grepitout

Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.

For more details on our services, please drop us an E-mail at info@grepitout.com

Tags

Topics