Create and starting a openvz container.

To create and start a container, run the following commands:

# vzctl create CTID –ostemplate osname
# vzctl set CTID –ipadd a.b.c.d –save
# vzctl set CTID –nameserver a.b.c.d –save
# vzctl start CTID

Here CTID is the numeric ID for the container; osname is the name of the OS template for the container, and a.b.c.d is the IP address to be assigned to the container.

Example:

# vzctl create 101 –ostemplate fedora-core-5-minimal
# vzctl set 101 –ipadd 10.1.2.3 –save
# vzctl set 101 –nameserver 10.0.2.1 –save
# vzctl start 101

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.