]> git.proxmox.com Git - pve-docs.git/blame - sysadmin.adoc
add note about unique cluster names
[pve-docs.git] / sysadmin.adoc
CommitLineData
419ef454
DM
1Host System Administration
2==========================
b7c3af6a 3include::attributes.txt[]
419ef454
DM
4
5{pve} is based on the famous https://www.debian.org/[Debian] Linux
6distribution. That means that you have access to the whole world of
7Debian packages, and the base system is well documented. The
8https://debian-handbook.info/download/stable/debian-handbook.pdf[Debian
65647b07 9Administrator\'s Handbook] is available online, and provides a
419ef454
DM
10comprehensive introduction to the Debian operating system (see
11xref:Hertzog13[]).
12
13A standard {pve} installation uses the default repositories from
14Debian, so you get bug fixes and security updates through that
15channel. In addition, we provide our own package repository to roll
16out all {pve} related packages. This includes updates to some
17Debian packages when necessary.
18
19We also deliver a specially optimized Linux kernel, where we enable all
20required virtualization and container features. That kernel includes
21drivers for http://zfsonlinux.org/[ZFS], and several hardware drivers.
22For example, we ship Intel network card drivers to support their
23newest hardware.
24
25The following sections will concentrate on virtualization related
26topics. They either explains things which are different on {pve}, or
27tasks which are commonly used on {pve}. For other topics, please refer
28to the standard Debian documentation.
29
30System requirements
31-------------------
32
33For production servers, high quality server equipment is needed. Keep
34in mind, if you run 10 Virtual Servers on one machine and you then
35experience a hardware failure, 10 services are lost. {pve}
36supports clustering, this means that multiple {pve} installations
37can be centrally managed thanks to the included cluster functionality.
38
39{pve} can use local storage (DAS), SAN, NAS and also distributed
40storage (Ceph RBD). For details see xref:chapter-storage[chapter storage].
41
42Minimum requirements, for evaluation
43~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44
45* CPU: 64bit (Intel EMT64 or AMD64)
46
47* RAM: 1 GB RAM
48
49* Hard drive
50
51* One NIC
52
53Recommended system requirements
54~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55
56* CPU: 64bit (Intel EMT64 or AMD64), Multi core CPU recommended
57
58* RAM: 8 GB is good, more is better
59
60* Hardware RAID with batteries protected write cache (BBU) or flash
61 based protection
62
63* Fast hard drives, best results with 15k rpm SAS, Raid10
64
65* At least two NIC´s, depending on the used storage technology you need more
66
67
d91f8c1e 68include::getting-help.adoc[]
419ef454 69
d91f8c1e 70include::pve-package-repos.adoc[]
419ef454 71
d91f8c1e 72include::pve-installation.adoc[]
419ef454 73
d91f8c1e 74include::system-software-updates.adoc[]
202dc350
DM
75
76
419ef454
DM
77Network Configuration
78---------------------
79
69c356c4
DM
80{pve} uses a bridged networking model. Each host can have up to 4094
81bridges. Bridges are like physical network switches implemented in
82software. All VMs can share a single bridge, as if
83virtual network cables from each guest were all plugged into the same
84switch. But you can also create multiple bridges to separate network
85domains.
86
87For connecting VMs to the outside world, bridges are attached to
88physical network cards. For further flexibility, you can configure
89VLANs (IEEE 802.1q) and network bonding, also known as "link
90aggregation". That way it is possible to build complex and flexible
91virtual networks.
92
93Debian traditionally uses the 'ifup' and 'ifdown' commands to
94configure the network. The file '/etc/network/interfaces' contains the
95whole network setup. Please refer to to manual page ('man interfaces')
96for a complete format description.
97
98NOTE: {pve} does not write changes directly to
99'/etc/network/interfaces'. Instead, we write into a temporary file
100called '/etc/network/interfaces.new', and commit those changes when
101you reboot the node.
102
103It is worth mentioning that you can directly edit the configuration
104file. All {pve} tools tries hard to keep such direct user
105modifications. Using the GUI is still preferable, because it
106protect you from errors.
107
108Naming Conventions
109~~~~~~~~~~~~~~~~~~
110
111We currently use the following naming conventions for device names:
112
113* Ethernet devices: eth[N], where 0 ≤ N (`eth0`, `eth1`, ...)
114
115* Bridge names: vmbr[N], where 0 ≤ N ≤ 4094 (`vmbr0` - `vmbr4094`)
419ef454 116
69c356c4
DM
117* Bonds: bond[N], where 0 ≤ N (`bond0`, `bond1`, ...)
118
119* VLANs: Simply add the VLAN number to the device name,
120 separated by a period (`eth0.50`, `bond1.30`)
121
122This makes it easier to debug networks problems, because the device
123names implies the device type.
124
125Default Configuration using a Bridge
126~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
419ef454 127
69c356c4
DM
128The installation program creates a single bridge named `vmbr0`, which
129is connected to the first ethernet card `eth0`. The corresponding
130configuration in '/etc/network/interfaces' looks like this:
131
132----
133auto lo
134iface lo inet loopback
135
136iface eth0 inet manual
137
138auto vmbr0
139iface vmbr0 inet static
140 address 192.168.10.2
141 netmask 255.255.255.0
142 gateway 192.168.10.1
143 bridge_ports eth0
144 bridge_stp off
145 bridge_fd 0
146----
147
148Virtual machines behave as if they were directly connected to the
149physical network. The network, in turn, sees each virtual machine as
150having its own MAC, even though there is only one network cable
151connecting all of these VMs to the network.
152
153
154Routed Configuration
155~~~~~~~~~~~~~~~~~~~~
156
157Most hosting providers do not support the above setup. For security
158reasons, they disable networking as soon as they detect multiple MAC
159addresses on a single interface.
160
161TIP: Some providers allows you to register additional MACs on there
162management interface. This avoids the problem, but is clumsy to
163configure because you need to register a MAC for each of your VMs.
164
165You can avoid the problem by "routing" all traffic via a single
166interface. This makes sure that all network packets use the same MAC
167address.
168
169A common scenario is that you have a public IP (assume 192.168.10.2
170for this example), and an additional IP block for your VMs
171(10.10.10.1/255.255.255.0). We recommend the following setup for such
172situations:
173
174----
175auto lo
176iface lo inet loopback
177
178auto eth0
179iface eth0 inet static
180 address 192.168.10.2
181 netmask 255.255.255.0
182 gateway 192.168.10.1
183 post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
184
185
186auto vmbr0
187iface vmbr0 inet static
188 address 10.10.10.1
189 netmask 255.255.255.0
190 bridge_ports none
191 bridge_stp off
192 bridge_fd 0
193----
194
195
196Masquerading (NAT) with iptables
197~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
198
199In some cases you may want to use private IPs behind your Proxmox
200host's true IP, and masquerade the traffic using NAT:
201
202----
203auto lo
204iface lo inet loopback
205
206auto eth0
207#real IP adress
208iface eth0 inet static
209 address 192.168.10.2
210 netmask 255.255.255.0
211 gateway 192.168.10.1
212
213auto vmbr0
214#private sub network
215iface vmbr0 inet static
216 address 10.10.10.1
217 netmask 255.255.255.0
218 bridge_ports none
219 bridge_stp off
220 bridge_fd 0
221
222 post-up echo 1 > /proc/sys/net/ipv4/ip_forward
223 post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
224 post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
225----
226
227////
228TODO: explain IPv6 support?
229TODO: explan OVS
230////
231
232
233////
234TODO:
419ef454
DM
235
236Local Storage
237-------------
238
239Logical Volume Manager (LVM)
240~~~~~~~~~~~~~~~~~~~~~~~~~~~~
241
650c5cc1 242TODO: info about LVM.
419ef454
DM
243
244
245ZFS on Linux
246~~~~~~~~~~~~
247
650c5cc1 248TODO: info about ZFS.
419ef454
DM
249
250
251Working with 'systemd'
252----------------------
253
254Journal and syslog
255~~~~~~~~~~~~~~~~~~
256
257TODO: explain persistent journal...
258
259
69c356c4 260////
419ef454
DM
261
262
263
264
265