OpenVZ Create a Virtual Server How To

Valic —  July 2, 2011 — 5 Comments

Create a Virtual Server:
Once you have OpenVZ installed you will be able to begin the process of installing individual containers.

Using the vzctl command you will be able to create a virtual server.

vzctl create 102 –ostemplate debian-6.0-x86 –config basic
Creating container private area (debian-6.0-x86)
Performing postcreate actions
Container private area was created

The following setting provides for the VE to start on boot:

vzctl set 102 –onboot yes –save

vzctl set 102 –hostname  debian-tutorials –save

vzctl set 102 –ipadd –save

vzctl set 102 –nameserver –save

vzctl start 102
Starting container …
Container is mounted
Adding IP address(es):
Setting CPU units: 1000
Set hostname: debian-tutorials
File resolv.conf was modified
Container start in progress…

vzctl set 102 –userpasswd root:your-root-password –save
Changing password for user root.
passwd: all authentication tokens updated successfully.
Saved parameters for VE 102

If you want to see whitch virtual server are running use the following command:

vzlist -a
101          – stopped   slave
102         11 running   debian-tutorials


Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

5 responses to OpenVZ Create a Virtual Server How To

  1. This was a wonderful article. Very well written and understandable. You effectively covered a very important aspect of open-source technology. I am new to open-source technology so I need to find easy to understand articles and this was really helpful. Thanks!

  2. Looks ok – can i re-assign an IP address after the VM is created using the same syntax?

    Also does anybody know how to backup the VM file in the most effective way?


  3. yes, you can reaasign the same ip address.

  4. IT Support Newark February 26, 2013 at 11:36

    this is very informative! thanks for the info

Trackbacks and Pingbacks:

  1. OpenVZ Create a Virtual Server How To | VT Tech - July 7, 2011

    […] OpenVZ Create a Virtual Server How To Posted in Linux virtual server | Tags: containers, private area, virtual server […]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.