Container Cheat Sheet – OpenVZ 7

Use this Cheat Sheet to configure a Linux container from scratch.

Create a container (Ubuntu for example):

prlctl create CTNAME --vmtype ct --ostemplate ubuntu-16.04-x86_64

Container configuration:

prlctl set CTNAME --ipadd ip
prlctl set CTNAME --nameserver 8.8.8.8 --nameserver 8.8.4.4
prlctl set CTNAME --cpus 4
prlctl set CTNAME --memsize 4G --swappages 512M
prlctl set CTNAME --userpasswd root:password
prlctl set CTNAME --diskspace 50G
prlctl set CTNAME --iopslimit 100
prlctl set CTNAME --hostname name
prlctl set CTNAME --vnc-mode manual --vnc-port 5901 --vnc-passwd password
prlctl set CTNAME --onboot yes

Start the container:

prlctl start CTNAME

Update the container:

prlctl exec CTNAME apt-get update -y
prlctl exec CTNAME apt-get upgrade -y

CentOS/Fedora/RHEL etc.:

prlctl exec CTNAME yum update -y

OpenVZ 7 Guide:
Click here to open the Guide

Leave a Reply

Your email address will not be published.