<s>
OpenVZ	B-Language
(	O
Open	O
Virtuozzo	O
)	O
is	O
an	O
operating-system-level	B-Application
virtualization	I-Application
technology	O
for	O
Linux	B-Operating_System
.	O
</s>
<s>
It	O
allows	O
a	O
physical	O
server	O
to	O
run	O
multiple	O
isolated	O
operating	O
system	O
instances	O
,	O
called	O
containers	B-Application
,	O
virtual	B-General_Concept
private	I-General_Concept
servers	I-General_Concept
(	O
VPSs	O
)	O
,	O
or	O
virtual	O
environments	O
(	O
VEs	O
)	O
.	O
</s>
<s>
OpenVZ	B-Language
is	O
similar	O
to	O
Solaris	O
Containers	B-Application
and	O
LXC	B-Application
.	O
</s>
<s>
While	O
virtualization	O
technologies	O
such	O
as	O
VMware	O
,	O
Xen	B-Operating_System
and	O
KVM	B-Application
provide	O
full	O
virtualization	O
and	O
can	O
run	O
multiple	O
operating	O
systems	O
and	O
different	O
kernel	B-Operating_System
versions	O
,	O
OpenVZ	B-Language
uses	O
a	O
single	O
Linux	B-Operating_System
kernel	I-Operating_System
and	O
therefore	O
can	O
run	O
only	O
Linux	B-Operating_System
.	O
</s>
<s>
All	O
OpenVZ	B-Language
containers	B-Application
share	O
the	O
same	O
architecture	O
and	O
kernel	B-Operating_System
version	O
.	O
</s>
<s>
This	O
can	O
be	O
a	O
disadvantage	O
in	O
situations	O
where	O
guests	O
require	O
different	O
kernel	B-Operating_System
versions	O
than	O
that	O
of	O
the	O
host	O
.	O
</s>
<s>
However	O
,	O
as	O
it	O
does	O
not	O
have	O
the	O
overhead	O
of	O
a	O
true	O
hypervisor	B-Operating_System
,	O
it	O
is	O
very	O
fast	O
and	O
efficient	O
.	O
</s>
<s>
Memory	O
allocation	O
with	O
OpenVZ	B-Language
is	O
soft	O
in	O
that	O
memory	O
not	O
used	O
in	O
one	O
virtual	O
environment	O
can	O
be	O
used	O
by	O
others	O
or	O
for	O
disk	B-Device
caching	I-Device
.	O
</s>
<s>
While	O
old	O
versions	O
of	O
OpenVZ	B-Language
used	O
a	O
common	O
file	O
system	O
(	O
where	O
each	O
virtual	O
environment	O
is	O
just	O
a	O
directory	O
of	O
files	O
that	O
is	O
isolated	O
using	O
chroot	B-Application
)	O
,	O
current	O
versions	O
of	O
OpenVZ	B-Language
allow	O
each	O
container	B-Application
to	O
have	O
its	O
own	O
file	O
system	O
.	O
</s>
<s>
The	O
OpenVZ	B-Language
kernel	B-Operating_System
is	O
a	O
Linux	B-Operating_System
kernel	I-Operating_System
,	O
modified	O
to	O
add	O
support	O
for	O
OpenVZ	B-Language
containers	B-Application
.	O
</s>
<s>
The	O
modified	O
kernel	B-Operating_System
provides	O
virtualization	O
,	O
isolation	O
,	O
resource	O
management	O
,	O
and	O
checkpointing	B-General_Concept
.	O
</s>
<s>
As	O
of	O
vzctl	O
4.0	O
,	O
OpenVZ	B-Language
can	O
work	O
with	O
unpatched	O
Linux	B-Operating_System
3.x	O
kernels	B-Operating_System
,	O
with	O
a	O
reduced	O
feature	O
set	O
.	O
</s>
<s>
Each	O
container	B-Application
is	O
a	O
separate	O
entity	O
,	O
and	O
behaves	O
largely	O
as	O
a	O
physical	O
server	O
would	O
.	O
</s>
<s>
Files	O
System	B-Library
libraries	I-Library
,	O
applications	B-Application
,	O
virtualized	O
/proc	B-Application
and	O
/sys	B-Application
,	O
virtualized	O
locks	B-Operating_System
,	O
etc	O
.	O
</s>
<s>
Users	O
and	O
groups	O
Each	O
container	B-Application
has	O
its	O
own	O
root	B-Application
user	I-Application
,	O
as	O
well	O
as	O
other	O
users	O
and	O
groups	O
.	O
</s>
<s>
Process	O
tree	O
A	O
container	B-Application
only	O
sees	O
its	O
own	O
processes	B-Operating_System
(	O
starting	O
from	O
init	B-Operating_System
)	O
.	O
</s>
<s>
PIDs	O
are	O
virtualized	O
,	O
so	O
that	O
the	O
init	B-Operating_System
PID	B-Operating_System
is	O
1	O
as	O
it	O
should	O
be	O
.	O
</s>
<s>
Network	O
Virtual	O
network	B-Device
device	I-Device
,	O
which	O
allows	O
a	O
container	B-Application
to	O
have	O
its	O
own	O
IP	B-Protocol
addresses	I-Protocol
,	O
as	O
well	O
as	O
a	O
set	O
of	O
netfilter	B-Application
(	O
iptables	O
)	O
,	O
and	O
routing	B-Protocol
rules	O
.	O
</s>
<s>
Devices	O
If	O
needed	O
,	O
any	O
container	B-Application
can	O
be	O
granted	O
access	O
to	O
real	O
devices	O
like	O
network	B-Protocol
interfaces	I-Protocol
,	O
serial	B-Protocol
ports	I-Protocol
,	O
disk	B-Application
partitions	I-Application
,	O
etc	O
.	O
</s>
<s>
IPC	O
objects	O
Shared	B-Operating_System
memory	I-Operating_System
,	O
semaphores	B-Operating_System
,	O
messages	B-Architecture
.	O
</s>
<s>
OpenVZ	B-Language
resource	O
management	O
consists	O
of	O
four	O
components	O
:	O
two-level	O
disk	B-Application
quota	I-Application
,	O
fair	O
CPU	O
scheduler	O
,	O
disk	O
I/O	B-General_Concept
scheduler	I-General_Concept
,	O
and	O
user	O
bean	O
counters	O
(	O
see	O
below	O
)	O
.	O
</s>
<s>
These	O
resources	O
can	O
be	O
changed	O
during	O
container	B-Application
run	B-Library
time	I-Library
,	O
eliminating	O
the	O
need	O
to	O
reboot	B-Operating_System
.	O
</s>
<s>
Each	O
container	B-Application
can	O
have	O
its	O
own	O
disk	B-Application
quotas	I-Application
,	O
measured	O
in	O
terms	O
of	O
disk	O
blocks	O
and	O
inodes	B-Application
(	O
roughly	O
number	O
of	O
files	O
)	O
.	O
</s>
<s>
Within	O
the	O
container	B-Application
,	O
it	O
is	O
possible	O
to	O
use	O
standard	O
tools	O
to	O
set	O
UNIX	O
per-user	O
and	O
per-group	O
disk	B-Application
quotas	I-Application
.	O
</s>
<s>
The	O
CPU	O
scheduler	O
in	O
OpenVZ	B-Language
is	O
a	O
two-level	O
implementation	O
of	O
fair-share	B-Operating_System
scheduling	I-Operating_System
strategy	O
.	O
</s>
<s>
On	O
the	O
first	O
level	O
,	O
the	O
scheduler	O
decides	O
which	O
container	B-Application
it	O
is	O
to	O
give	O
the	O
CPU	O
time	O
slice	B-Application
to	O
,	O
based	O
on	O
per-container	O
cpuunits	O
values	O
.	O
</s>
<s>
On	O
the	O
second	O
level	O
the	O
standard	O
Linux	B-Operating_System
scheduler	O
decides	O
which	O
process	O
to	O
run	O
in	O
that	O
container	B-Application
,	O
using	O
standard	O
Linux	B-Operating_System
process	O
priorities	O
.	O
</s>
<s>
It	O
is	O
possible	O
to	O
set	O
different	O
values	O
for	O
the	O
CPUs	O
in	O
each	O
container	B-Application
.	O
</s>
<s>
In	O
addition	O
to	O
the	O
above	O
,	O
OpenVZ	B-Language
provides	O
ways	O
to	O
:	O
</s>
<s>
limit	O
number	O
of	O
CPU	O
cores	O
available	O
to	O
container	B-Application
(	O
--cpus	O
)	O
;	O
</s>
<s>
bind	O
a	O
container	B-Application
to	O
a	O
specific	O
set	O
of	O
CPUs	O
(	O
--cpumask	O
)	O
.	O
</s>
<s>
Similar	O
to	O
the	O
CPU	O
scheduler	O
described	O
above	O
,	O
I/O	B-General_Concept
scheduler	I-General_Concept
in	O
OpenVZ	B-Language
is	O
also	O
two-level	O
,	O
utilizing	O
Jens	O
Axboe	O
's	O
CFQ	B-Application
I/O	B-General_Concept
scheduler	I-General_Concept
on	O
its	O
second	O
level	O
.	O
</s>
<s>
Each	O
container	B-Application
is	O
assigned	O
an	O
I/O	O
priority	O
,	O
and	O
the	O
scheduler	O
distributes	O
the	O
available	O
I/O	O
bandwidth	O
according	O
to	O
the	O
priorities	O
assigned	O
.	O
</s>
<s>
Thus	O
no	O
single	O
container	B-Application
can	O
saturate	O
an	O
I/O	O
channel	O
.	O
</s>
<s>
User	O
Beancounters	O
is	O
a	O
set	O
of	O
per-container	O
counters	O
,	O
limits	O
,	O
and	O
guarantees	O
,	O
meant	O
to	O
prevent	O
a	O
single	O
container	B-Application
from	O
monopolizing	O
system	O
resources	O
.	O
</s>
<s>
In	O
current	O
OpenVZ	B-Language
kernels	B-Operating_System
(	O
RHEL6-based	O
042stab*	O
)	O
there	O
are	O
two	O
primary	O
parameters	O
(	O
ram	O
and	O
swap	O
,	O
a.k.a.	O
</s>
<s>
Other	O
resources	O
are	O
mostly	O
memory	O
and	O
various	O
in-kernel	O
objects	O
such	O
as	O
Inter-process	B-Operating_System
communication	I-Operating_System
shared	I-Operating_System
memory	I-Operating_System
segments	O
and	O
network	O
buffers	O
.	O
</s>
<s>
Each	O
resource	O
can	O
be	O
seen	O
from	O
/proc/user_beancounters	O
and	O
has	O
five	O
values	O
associated	O
with	O
it	O
:	O
current	O
usage	O
,	O
maximum	O
usage	O
(	O
for	O
the	O
lifetime	O
of	O
a	O
container	B-Application
)	O
,	O
barrier	O
,	O
limit	O
,	O
and	O
fail	O
counter	O
.	O
</s>
<s>
This	O
allows	O
the	O
owner	O
to	O
detect	O
problems	O
by	O
monitoring	O
/proc/user_beancounters	O
in	O
the	O
container	B-Application
.	O
</s>
<s>
A	O
live	O
migration	O
and	O
checkpointing	B-General_Concept
feature	O
was	O
released	O
for	O
OpenVZ	B-Language
in	O
the	O
middle	O
of	O
April	O
2006	O
.	O
</s>
<s>
This	O
makes	O
it	O
possible	O
to	O
move	O
a	O
container	B-Application
from	O
one	O
physical	O
server	O
to	O
another	O
without	O
shutting	O
down	O
the	O
container	B-Application
.	O
</s>
<s>
The	O
process	O
is	O
known	O
as	O
checkpointing	B-General_Concept
:	O
a	O
container	B-Application
is	O
frozen	O
and	O
its	O
whole	O
state	O
is	O
saved	O
to	O
a	O
file	O
on	O
disk	O
.	O
</s>
<s>
This	O
file	O
can	O
then	O
be	O
transferred	O
to	O
another	O
machine	O
and	O
a	O
container	B-Application
can	O
be	O
unfrozen	O
(	O
restored	O
)	O
there	O
;	O
the	O
delay	O
is	O
roughly	O
a	O
few	O
seconds	O
.	O
</s>
<s>
By	O
default	O
,	O
OpenVZ	B-Language
restricts	O
container	B-Application
access	O
to	O
real	O
physical	O
devices	O
(	O
thus	O
making	O
a	O
container	B-Application
hardware-independent	O
)	O
.	O
</s>
<s>
An	O
OpenVZ	B-Language
administrator	O
can	O
enable	O
container	B-Application
access	O
to	O
various	O
real	O
devices	O
,	O
such	O
as	O
disk	O
drives	O
,	O
USB	O
ports	O
,	O
PCI	O
devices	O
or	O
physical	O
network	B-Protocol
cards	I-Protocol
.	O
</s>
<s>
/dev/loopN	O
is	O
often	O
restricted	O
in	O
deployments	O
(	O
as	O
loop	O
devices	O
use	O
kernel	B-Operating_System
threads	O
which	O
might	O
be	O
a	O
security	O
issue	O
)	O
,	O
which	O
restricts	O
the	O
ability	O
to	O
mount	O
disk	O
images	O
.	O
</s>
<s>
A	O
work-around	O
is	O
to	O
use	O
FUSE	B-Application
.	O
</s>
<s>
OpenVZ	B-Language
is	O
limited	O
to	O
providing	O
only	O
some	O
VPN	O
technologies	O
based	O
on	O
PPP	O
(	O
such	O
as	O
PPTP/L2TP	O
)	O
and	O
TUN/TAP	O
.	O
</s>
<s>
IPsec	B-Protocol
is	O
supported	O
inside	O
containers	B-Application
since	O
kernel	B-Operating_System
2.6.32	O
.	O
</s>
<s>
A	O
graphical	B-Application
user	I-Application
interface	I-Application
called	O
EasyVZ	O
was	O
attempted	O
in	O
2007	O
,	O
but	O
it	O
did	O
not	O
progress	O
beyond	O
version	O
0.1	O
.	O
</s>
<s>
Up	O
to	O
version	O
3.4	O
,	O
Proxmox	B-Language
VE	I-Language
could	O
be	O
used	O
as	O
an	O
OpenVZ-based	O
server	B-General_Concept
virtualization	I-General_Concept
environment	O
with	O
a	O
GUI	B-Application
,	O
although	O
later	O
versions	O
switched	O
to	O
LXC	B-Application
.	O
</s>
