• DevOps
    Case Study

    How we built a resilient multi-account, multi-cloud solution for a Health Tech service provider!

    READ CASESTUDY
    icon

    24/7 DevOps as a Service

    Round-the-clock DevOps for uninterrupted efficiency.

    icon

    Infrastructure as a Code

    Crafting infrastructure with ingenious code.

    icon

    CI/CD Pipeline

    Automated CI/CD pipeline for seamless deployments.

    icon

    DevSecOps

    Integrated security in continuous DevOps practices.

    icon

    Hire DevOps Engineers

    Level up your team with DevOps visionaries.

    icon

    Consulting Services

    Navigate success with expert DevOps consulting.

  • TechOps
    Case Study

    How we built a scalable Odoo solution for a Travel Tech service provider!

    READ CASESTUDY

    WEB HOSTING SUPPORT

    icon

    HelpDesk Support

    Highly skilled 24/7 HelpDesk Support

    icon

    Product Support

    Boost your product support with our expertise.

    MANAGED SERVICES

    icon

    Server Management

    Don’t let server issues slow you down. Let us manage them for you.

    icon

    Server Monitoring

    Safeguard your server health with our comprehensive monitoring solutions.

    STAFF AUGMENTATION

    icon

    Hire an Admin

    Transform your business operations with our expert administrative support.

    icon

    Hire a Team

    Augment your workforce with highly skilled professionals from our diverse talent pool.

  • CloudOps
    Case Study

    How we helped a Private Deemed University in India, save US $3500/m on hosting charges!

    READ CASESTUDY
    icon

    AWS Well Architected Review

    Round-the-clock for uninterrupted efficiency

    icon

    Optimize

    Efficient CloudOps mastery for seamless cloud management

    icon

    Manage

    Automated CI/CD pipeline for seamless deployments

    icon

    Migrate

    Upgrade the journey, Migrate & Modernize seamlessly

    icon

    Modernize

    Simplify compliance complexities with our dedicated services

    icon

    FinOps as a Service

    FinOps as a Service

  • SecOps
    Case Study

    How we built a scalable Odoo solution for TravelTech service provider!

    READ CASESTUDY
    icon

    VAPT

    Vulnerability Assessment and Penetration Testing

    icon

    Source Code Review

    Ensuring source code security ans safe practices to reduce risks

    icon

    Security Consultation

    On demand services for improving server security

    icon

    System Hardening

    Reduced vulnerability and proactive protection

    icon

    Managed SoC

    Monitors and maintains system security. Quick response on incidents.

    icon

    Compliance as a Service

    Regulatory compliance, reduced risk

  • Insights
    Case Study

    How we helped a Private Deemed University in India, save US $3,500/m on hosting charges!

    READ CASESTUDY
    icon

    Blog

    Explore our latest articles and insights

    icon

    Case Studies

    Read about our client success stories

    icon

    Flipbook

    Explore our latest Flipbook

    icon

    Events

    Join us at upcoming events and conferences

    icon

    Webinars

    Watch our educational webinar series

  • Our Story
  • Contact Us

Interested to collaborate?

Get in touch with us!

Ready to elevate your business with certified cloud expertise? Contact us today to learn how our team can help you leverage cloud technology to drive growth, streamline operations, and enhance security.

  • AWSAWS
  • Azure CloudAzure Cloud
  • Google CloudGoogle Cloud
  • Akamai CloudAkamai Cloud
  • OVHOVH
  • Digital OceanDigital Ocean
  • HetznerHetzner
  • Kubernetes Consultancy Services
  • K8s & Cloud native Solutions
  • 24/7 Infrastructure Monitoring
  • DevOps as a Service
  • Cloud CI/CD Solutions
  • White Labeled MSP Support
  • Our story
  • Life@SupportSages
  • Insights
  • Careers
  • Events
  • Contact Us

Connect with us!


LinkedInFacebookXInstagramYouTube

aws partneraws advanced partner
SupportSages

Copyright © 2008 – 2026 SupportSages Pvt Ltd. All Rights Reserved.
Privacy PolicyLegal TermsData ProtectionCookie Policy
VPS creation Steps

VPS creation Steps

Vipin R.N

  • 8 min read
VPS creation Steps

Generating audio, please wait...

Scenario
Our requirement is to create VPS from a Node (or Physical server). The Virtualization technology adopted in the Node is OpenVZ (Open Virtuozzo).

OpenVZ
OpenVZ is an Operating System level, container-based Virtualization for Linux. OpenVZ creates multiple secure, isolated Linux containers (otherwise known as VEs or VPSs) on a single physical server enabling better server utilization and ensuring that applications do not conflict. Each container performs and executes exactly like a stand-alone server; a container can be rebooted independently and have root access, users, IP addresses, memory, processes, files, applications, system libraries and configuration files.

Creating a Container
Before we start creating a Container or create VPS, the following prerequisites are to be met :

  • Check that the Hardware Node is visible on your network. You should be able to connect to/from other hosts. Otherwise, your Containers will not be accessible from other servers.
  • Check that you have at least one IP address per Container and the addresses belong to the same network as the Hardware Node or routing to the Containers has been set up via the Hardware Node.

To create a new Container, we have to:

  • Choose the new Container ID where it has to be ensured that no containers already exists by that CTID (Container ID). More detailed Guidelines are available at https://openvz.org/User_Guide/Operations_on_Containers#Choosing_Container_ID
  • Choose the OS template to use for the Container. Various OS templates are available to download here. The OS templates would be in tar.gz format and it should not be unpacked. The location where the OS templates reside is /vz/template/cache.

 

[root@node /vz/template/cache/]# ls
centos-5.0-x86.tar.gz centos-6-x86_64.tar.gz centos-6-x86.tar.gz debian-6.0-x86_64.tar.gz

Now, let’s create the container. The command used to create a container is :-


# vzctl create CTID --ostemplate --config basic 

Example :

vzctl create 100 –ostemplate centos-6-x86 –config basic

OR

vzctl create 262 –ostemplate debian-6.0-x86_64 –config basic

Note : When specifying the OS template, make sure to remove the file extension (tar.gz). If you don’t specify the OS Template name, it will try to fetch the parameter in /etc/vz/vz.conf. See the section ## Defaults for containers in that file for more information. It would look like :

## Defaults for containers
VE_ROOT=/vz/root/$VEID
VE_PRIVATE=/vz/private/$VEID
CONFIGFILE=”basic”
DEF_OSTEMPLATE=”centos-5″

With vzctl create command, the container private area is being created. The private area is the directory containing the actual files of the given Container; it is usually residing in /vz/private/CTID/. The private area is mounted to the /vz/root/CTID directory on the Hardware Node and provides Container users with a complete Linux file system tree.

[root@node ~]# ls /vz/root/100/
.autofsck boot/ etc/ lib/ mnt/ proc/ sbin/ srv/ tmp/ var/ bin/ dev/ home/ media/ opt/ root/ selinux/ sys/ usr/

[root@node conf]# ls /vz/private/100
bin boot dev etc home lib media mnt opt proc root sbin selinux srv sys tmp usr var

The switch –config basic is specified to choose the basic template configuration which would be usually located at /etc/vz/conf/ve-basic.conf-sample. This file has resource control parameters suitable for most Containers. Obviously these parameters can be changed later.

Essential Configuration

Creating just the container will not help it function properly. Some inevitable configuration has to be made before we start the container. The Configuration file of a container is located at /etc/vz/conf/CTID.conf where CTID is the container ID. You can either edit the configuration file directly or use vzctl commands to adjust the parameters in any container’s configuration file. Using vzctl commands is more safe because you cannot make any incorrect or invalid parameter in the configuration file. Few essential parameters for a Container are given below.

Add IP Address

Adding an IP address is very much essential. To add an IP address to the Container, use the command


# vzctl set CTID --ipadd <IP Address> --save

Example :

vzctl set 100 –ipadd 8.18.17.48 –save

Note : It is possible to add multiple IP addresses at once or add an entire IP range by using CIDR notation. Make sure that the IP address is free or not used elsewhere.

Assign DNS Server

To set a DNS server to a Container, use the command


# vzctl set CTID --nameserver <NS ADDRESS> --save

Example :

vzctl set 100 –nameserver 8.8.8.8 –save

Disk Space

To set certain amount of Disk space to a Container, use the command


# vzctl set CTID --diskspace <SOFTLIMIT:HARDLIMIT> --save

Example :

vzctl set 100 –diskspace 100G:110G –save

Note : Sufficient Disk space would be allotted to the container by the Basic configuration file. If it is not enough, you can override it.

Hostname

Promotional banner

To set the Hostname to a Container, use the command


# vzctl set CTID --hostname <HOSTNAME> --save

Example :

vzctl set 100 –hostname training.supportsages.com –save

Change System Time

Sometimes it may be essential to enable the capability of a container to change its System time. For that use the command


# vzctl set CTID --capability sys_time:on --save

Example :

vzctl set 100 –capability sys_time:on –save

Startup Parameters

It is possible to define the onboot Container startup parameter. Setting this parameter to yes makes the Container automatically boot at the Hardware Node startup.


# vzctl set CTID --onboot yes --save

Example :

vzctl set 100 –onboot yes –save

Starting the Container

Once all the essential parameters are defined, the container can be started. Many options can be set while the container is running. Then it may be necessary to restart the container for the changes to be in effect.


# vzctl start CTID

Example :

vzctl start 100

Checking the Container Status

To see whether our configuration has succeeded, hit vzlist -a. It will display all containers in a node irrespective of the status (Running | Stopped etc)

[root@node ~]# vzlist -a
CTID NPROC STATUS IP_ADDR HOSTNAME
100 26 running 8.18.17.48 training.supportsages.com
101 70 running 8.18.17.1 server.supportsages.com

Stopping the Container

To stop the container, execute


# vzctl stop CTID

Example :

vzctl stop 100

Removing the Container

To remove the container, execute


# vzctl destroy CTID

Example :

vzctl destroy 100

Note : Removing a container will cause complete data loss in it. Ensure that the data is backed up or no longer required. Before removing a container, it has to be stopped as well.

Other Parameters

Various other parameters determining the resource usage can be set in the Container configuration. See this link for complete details.

References / Further Reading

 

  1. User Guide/Operations on Containers – https://openvz.org/Basic_operations_in_OpenVZ_environment
  2. UBC primary parameters – https://wiki.openvz.org/UBC_primary_parameters
 Get 24/7 expert server management

 

  • Howtos
  • Linux
  • Troubleshooting
  • VPS
Promotional banner
Promotional banner

“Suspended Page ” defaced in cPanel Server

“Suspended Page ” defaced in cPanel Server
  • cPanel
  • Linux
  • Troubleshooting
logo

APC Cache Activation and disable XCache

APC Cache Activation and disable XCache
  • Apache
  • cPanel
  • Linux
logo

Blacklisted ? Switch your Mail Server IP

Blacklisted ? Switch your Mail Server IP
  • cPanel
  • Linux
  • Webmail
logo

Chapter 12 All about a process running in linux

Chapter 12 All about a process running in linux
  • General
  • Howtos
  • Linux
  • Special Offers
  • Training
  • Troubleshooting
logo

Posts by Vipin R.N

Vipin is a no-nonsense, disciplined guy who ensures that everything is carried out with the highest level of perfection. Apart from his great coding skills, he is quite interested in advanced server administration, issue analysis, documentation and training. In-depth knowledge in international politics, ammunition and automobiles makes this hard core Manchester United fan, one of the most referenced personalities in the entire team.