Basic operations in OpenVZ environment
2013-01-09 20:52
495 查看
This article assumes you have already installed OpenVZ. If not, follow the link to perform the steps needed.
Create and start a container
To create and start a container, run the following commands:[host-node]# vzctl create CTID --ostemplate osname [host-node]# vzctl set CTID --ipadd a.b.c.d --save [host-node]# vzctl set CTID --nameserver a.b.c.d --save [host-node]# 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:
[host-node]# vzctl create 101 --ostemplate fedora-core-5-minimal [host-node]# vzctl set 101 --ipadd 10.1.2.3 --save [host-node]# vzctl set 101 --nameserver 10.0.2.1 --save [host-node]# vzctl start 101
Your freshly-created container should be up and running now; you can see its processes:
[host-node]# vzctl exec CTID ps ax
Enter to and exit from the container
To enter container give the following command:[host-node]# vzctl enter CTID entered into container CTID [container]#
To exit from container, just type
exitand press Enter:
[container]# exit exited from container VEID [host-node]#
Stop and destroy the container
To stop container:[host-node]# vzctl stop CTID Stopping container ... Container was stopped Container is unmounted
And to destroy container:
[host-node]# vzctl destroy CTID Destroying container private area: /vz/private/CTID Container private area was destroyed
Now, when you know how to manage your container, learn about Resource management.
相关文章推荐
- 使用Spring提供的Open Session In View而引起Write operations are not allowed in read-only mode (FlushMode.NEVER) 错误解决
- Image acquisition and basic operations in matlab
- openSessionInView,如果没有配置事务,会出现Write operations are not allowed in read-only mode。。。错误
- Support of basic operations on Sets in Dynamics AX
- basic operations in sql
- openvz UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY
- Open Session In View(Write operations are not allowed in read-only mode)
- ECC in OPEN SSL 2(operations)
- 使用Spring提供的Open Session In View而引起Write operations are not allowed in read-only mode (FlushMode.NEVE
- Polynomial Library in OpenCascade
- [USACO 2012OPEN] Balanced Cow Subsets(meet in the middle + DFS)
- The command could not be located because '/sbin' is not included in the PATH environment variable
- Write operations are not allowed in read-only mode错误
- How to search a table in a store proc and open the store proc
- 数据库调优:The most important factor in making a database application fast is its basic design.
- SpringMVC学习系列-后记 开启项目的OpenSessionInView
- Need to specify class name in environment or system property, or as an applet parameter, or in a
- join operations in SQL
- 使用struts2 的jsonplugin插件与opensessioninview和hibernate延迟加载时遇到的问题
- Write operations are not allowed in read-only mode