vzctl create 101 \ --ostemplate centos-5-i386-afull \ --conf vps.basic \ --ipadd 168.254.7.130 \ --hostname mynew.container.com
二、开始安装OpenVZ
1.安装核心
#cd /etc/yum.repos.d # wget http://download.openvz.org/openvz.repo yum search ovzkernel
根据你的服务器环境安装需要的核心
ovzkernel-PAE-devel.i686 : Development package for building kernel modules to match the PAE kernel. ovzkernel-PAE.i686 : The Linux kernel compiled for PAE capable machines. ovzkernel.i686 : Virtuozzo Linux kernel (the core of the Linux operating system) ovzkernel.i686 : Virtuozzo Linux kernel (the core of the Linux operating system) ovzkernel-devel.i686 : Development package for building kernel modules to match the kernel.
如果你内存多过4G请安装ovzkernel-PAE,但现在服务器的内存只有3GB所以就安装这个把。
yum install ovzkernel-xen.i686
2.修改启动文件
# vi /boot/grub/grub.conf default=0 title CentOS (2.6.18-92.1.18.el5.028stab060.2)
当启动服务器时使用OpenVZ的核心。
3.修改核心模组文件
# vi /etc/sysctl.conf net.ipv4.ip_forward = 1 net.ipv4.conf.default.proxy_arp = 0 net.ipv4.conf.all.rp_filter = 1 kernel.sysrq = 1 net.ipv4.conf.default.send_redirects = 1 net.ipv4.conf.all.send_redirects = 0 # sysctl -p 檢查是否有錯誤的輸入 修改 /etc/modprobe.conf 載入 options ip_conntrack ip_conntrack_enable_ve0=1 ## vzcpt 模組
4.重启服务器,使用新的核心与模组
vzethdev 16268 0 vzrst 145940 0 ip_nat 22288 1 vzrst vzcpt 116260 0 ip_conntrack 60356 3 vzrst,ip_nat,vzcpt ipip 17796 2 vzrst,vzcpt tun 15872 2 vzrst,vzcpt vzdquota 43924 6 [permanent] vznetdev 21384 12 vzmon 49292 10 vzethdev,vzrst,vzcpt,vznetdev ipv6 284924 180 vzrst,vzcpt,vzmon vzdev 7556 6 vzethdev,vzdquota,vznetdev,vzmon
这些就是OpenVZ的模组.
有网络、磁盘、磁盘配额、迁移、输入、监察这些部分。
5. 安装OpenVZ 主要的控制软件
yum install vzctl vzquota xdelta -y rpm -ivh http://download.openvz.org/contrib/utils/vzdump/vzdump-1.0-2.noarch.rpm rpm -ivh http://download.openvz.org/contrib/utils/vzprocps-2.0.11-6.13.swsoft.i386.rpm
6. 启动服务
# /sbin/service vz start
安装好啦!等下一节教大家如何使用OpenVZ吧!
Frankly, I don’t know more details about HyperVM.
So I went to try it to install the HyperVM from my dedicated server.
Installation HyperVM is damn very easy, and just 1 little linux syntax.
After the fresh install, I get this error message, when I tried to add a Virtual Machine on tab OpenVZ :
no_servers_configured_for_this_driver
By, default HyperVm is adding Xen Driver it self. So, you must add the OpenVZ driver in your HyperVM.
Simply login to your hyperVM admin control http://
There you add the Ip/Hostname and the Password, HyperVM will automatically detect the driver.
Then you could add OpenVZ Virtual Machine.
最新评论