專有名詞定義
- Hardware Node(HN):實際運行 openvz 服務的作業系統。
- Container(CT)/Virtual Environment(VE)/Virtual Private Server (VPS):虛擬機環境。
HN指令集 - vzctl
- 登入 container(無密碼,以 root 身份)
vzctl enter <CTID>
安裝 precreated template
官方有提供一些已經做好的的作業系統(operating system template),包含有 centos, ubuntu, debian 等等。
下載位址:http://wiki.openvz.org/Download/template/precreated
cd /vz/template/cache/
wget http://download.openvz.org/template/precreated/centos-5-x86.tar.gz
注意:
template 檔不用解壓縮。
新增&啟動 Container
WebVZ Admin > Containers > New Container
- Owner of the container:Administrator <或者,新增新的用戶>
- Operating system template:<選擇要安裝的作業系統 template>
- Configuration file name:<選擇已經定義的系統設定檔>
- Container ID:102 <自訂一組數字>
- Name:ast16 <自訂 container 名稱>
- IP Address:<IP 位址>
- Hostname:<主機名稱>
- Nameserver(DNS):<DNS 主機位址>
- Enable booting on startup:no <是否在 openvz 服務啟動後自動開啟這 container>
- Sart up the container after creating it:yes <是否在新增後,自動啟動 container>
- Root password:<設定 root 密碼>
注意:
- owner of the container:之後可以修改。
- operating system template:之後不可修改。
- configuration file name:之後不可更改,但仍可以修改個別的參數,例如 disk space, kernel memory size, etc..。
- container ID:之後不可修改。
- name:之後可以修改。
- IP address, hostname, DNS, root password:之後可以修改。
- 建立新的 container 時,系統需要一段時間進行處理,約需 15-17 分。