6,534
edits
Changes
created
This document briefly describes the steps needed to install OpenVZ on your Debian 7 "Wheezy" machine. For RHEL/Centos 6 based systems, please see [[Quick installation]]. {{Out|A commercial version of OpenVZ is available, which simplifies installation with a single disk as well as supports networked installation using PXE boot. To learn more about Parallels Cloud Server and request a free trial, please see http://www.parallels.com/products/pcs/}} == Requirements == This guide assumes you are running '''Debian 7 "Wheezy" ''' for '''AMD64''' on your system (x86 is not yet supported). === /vz file system === It is recommended to use a separate partition for containers (by default '''/var/lib/vz''') and format it to '''ext4'''. === apt pre-setup === Run the following: <pre><nowiki>cat << EOF > /etc/apt/sources.list.d/openvz-rhel6.listdeb http://download.openvz.org/debian wheezy main#deb http://download.openvz.org/debian wheezy-test mainEOF</nowiki></pre> Import GPG key used for signing repository: <pre><nowiki>wget http://ftp.openvz.org/debian/archive.keyapt-key add archive.key</nowiki></pre> Update the local cache: apt-get update == Kernel installation == Limited OpenVZ functionality is supported when you run a recent 3.x kernel (check [[vzctl for upstream kernel]], so OpenVZ kernel installation is optional but still recommended. #REDIRECT apt-get install linux-image-openvz-amd64 == System configuration == <!-- this is not yet in vzctl.deb {{Note|With vzctl 4.6 or newer there is no need to do manual configuration. Skip to [[Installation #Tools_installation]].}}--> Please make sure the following steps are performed before rebooting into OpenVZ kernel. === sysctl === There are a number of kernel parameters that should be set for OpenVZ to work correctly. These parameters are stored in <tt>/etc/sysctl.conf</tt> file. Here are the relevant portions of the file; please edit accordingly. <pre># On Hardware Node we generally need# packet forwarding enabled and proxy arp disablednet.ipv4.ip_forward = 1net.ipv6.conf.default.forwarding = 1net.ipv6.conf.all.forwarding = 1net.ipv4.conf.default.proxy_arp = 0 # Enables source route verificationnet.ipv4.conf.all.rp_filter = 1 # Enables the magic-sysrq keykernel.sysrq = 1 # We do not want all our interfaces to send redirectsnet.ipv4.conf.default.send_redirects = 1net.ipv4.conf.all.send_redirects = 0</pre> == Tools installation == {{Out|Before installing tools, please read about [[vzstats]] and opt-out if you don't want to help the project.}} OpenVZ needs some user-level tools installed: # apt-get install vzctl vzquota ploop == Reboot into OpenVZ kernel == Now reboot the machine and choose an entry with word "openvz" in the boot loader menu (it should be default choice). == Download OS templates == {{Note|this step is optional, vzctl is able to download templates on Debiandemand.}} An OS template is a Linux distribution installed into a containerand then packed into a gzipped tarball. Using such a cache, a new containercan be created in a minute. Download precreated template caches from [http://openvz.org/download/template/cache Downloads » Templates » Precreated], or directly from [http://download.openvz.org/template/precreated/ download.openvz.org/template/precreated], or from one of the [[Download mirrors|mirrors]]. Put those tarballs '''as-is (no unpacking needed)''' to the <tt>/vz/template/cache/</oldtt> directory. == Next steps == OpenVZ is now set up on your machine. Follow on to [[basic operations in OpenVZ environment]] document. [[Category: Installation]][[Category: HOWTO]]