Cre­at­ing your first con­tainer (vir­tual ma­chine)

OpenSource For You - - LET'S TRY -

In or­der to cre­ate your first con­tainer, you need a tem­plate file. ‘Tem­plates’ in OpenVZ refers to a com­pressed for­mat of dif­fer­ent op­er­at­ing sys­tems that are avail­able freely. You can browse the tem­plates at https://openvz.org/Down­load/ tem­plate/precre­ated.

Down­load your favourite op­er­at­ing sys­tem’s tem­plate to the /vz/tem­plate/cache di­rec­tory and once com­pleted, fol­low the steps shown in the next sec­tion.

The power of the shell comes in handy when cre­at­ing con­tain­ers or when amend­ing the cur­rent set­tings re­lated to a con­tainer. In this sec­tion, we will cre­ate our first con­tainer (vir­tual ma­chine) and add a few pa­ram­e­ters, in­clud­ing the IP ad­dress, so that you can ac­cess your ma­chine over a LAN (or pro­vide a public IP so that it can be ac­ces­si­ble over a WAN as a stand­alone vir­tual server), name, DNS name server, root user pass­word, etc. So, let’s get started with cre­at­ing the con­tainer first:

To check if your con­tainer was cre­ated suc­cess­fully, run vzlist -a and it should list all the con­tain­ers (even those not run­ning) as shown in Fig­ure 2.

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.