You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have gone through install Openvz and Creating Containers from online tutorial which is available at here .And done the tutorial.Here I have learned about container and creating containers using following commands those are
Container:
The Virtual machines are known as Containers in OpenVZ.the main advantage of Containers is that they will share the resources of the physical machine dynamically.
That means, a particular amount of RAM or Disk space will not be allocated to any particular container.
Creating Containers in Openvz:
The list of available pre-created templates availale here for dowbload centos minimal template
vzctl (It is a command, which is used to manage containers)
cd vz/template/cache (which is the default directory to store the downloaded templates.)
vzctl create 101 –ostemplate centos-7-x86_64-minimal (which is used to create the first virtual machine)
101 – Container ID (It typically starts from 100)
Next, we have to setup the IP address to the Container, for example: 192.168.1.103.
vzctl set 101 –ipadd 192.168.1.103 –save (which is used to set ip address)
vzctl set 101 –nameserver 8.8.8.8 –save (which is used to assign DNS server)
vzctl start 101 (To start container)
vzctl enter 101 (Entering the container)
From 02:00 AM TO 06:00 PM:
I read about basic commands of Opnenvz and practiced following commands those are
vzlist (It is a command, which is used to list the running vpss(virtual private service))
vzlist
vzctl start CTID (which is used to start container)
vzctl start 101
vzctl stop CTID (which is used to stop container)
vzctl stop 101
vzctl status CTID (which is used to view the status of vpps)
vzctl status 101
vzctl enter CTID (which is used to entering container)
vzctl enter 101
vzctl set CTID –hostname New_hostname –save (Set hostname for a Server)
vzctl set 101 --hostname raghu --save
vzctl set CTID –ipadd xx.xx.xx.xx –save (Set IP address)
vzctl set 101 --ipadd 10.2.56.110 --save
vzctl set CTID –ipdel xx.xx.xx.xx –save (Delete IP address)
vzctl set 101 --ipdel 10.2.56.110 --save
vzctl set CTID –nameserver xx.xx.xx.xx –save (Add name server)
vzctl set 101 --nameserver 10.4.2.222 --save
vzctl set CTID –userpasswd root:new_password –save (Reset userpassword and rootpassword)