Install Proxmox VE on Debian Jessie: Difference between revisions

From Proxmox VE
Jump to navigation Jump to search
(page created)
 
No edit summary
 
(25 intermediate revisions by 11 users not shown)
Line 1: Line 1:
=Introduction=
{{Note|Article about the old stable Proxmox VE 4.x releases}}


<b>BETA NOT FOR PRODUCTION</b>
== Introduction ==


The installation of a supported Proxmox VE server should be done via [[Bare-metal_ISO_Installer]]. In some case it makes sense to install Proxmox VE on top of a running Debian Jessie 64-bit, especially if you want a custom partition layout. For this HowTO the following Debian Wheezy ISO was used: [http://cdimage.debian.org/debian-cd/8.1.0/amd64/iso-cd/debian-8.1.0-amd64-netinst.iso debian-8.1.0-amd64-netinst.iso].
The installation of a supported Proxmox VE server should be done via [[Bare-metal_ISO_Installer]]. In some case it makes sense to install Proxmox VE on top of a running Debian Jessie 64-bit, especially if you want a custom partition layout. For this HowTO the following Debian Jessie ISO was used: [http://cdimage.debian.org/debian-cd/8.5.0/amd64/iso-cd/debian-8.5.0-amd64-netinst.iso debian-8.5.0-amd64-netinst.iso].


=Install a standard Debian Jessie (amd64)=
== Install a standard Debian Jessie (amd64) ==
Install a standard Debian Jessie (amd64), for details see [http://www.debian.org Debian], go for a fixed IP.
Install a standard Debian Jessie, for details see [http://www.debian.org Debian], and select a fixed IP.
It is recommended to only install the "standard"  package selection and nothing else, as Proxmox VE brings its own packages for qemu, lxc.
During installation you have to manually partition the Hard Disk and  use the choice "Configure the Logical Volume Manager" to create a volume group called "pve" and 3 logical volumes called "swap", "root" and "data". The mount point for "root" will be "/" and for "data" select the manual option and enter "/var/lib/vz". You can format with ext4.


==Check /etc/hosts==
You can also create empty partitions during installation and then create [[ZFS]] pool on them.
The suggested partition layout with LVM is like that:
 
Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1        122      975872  83  Linux
/dev/sda2            122        5222    40965120  8e  Linux LVM
 
LVM:
root@pvedebian:~# lvs
  LV  VG  Attr      LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data pve  -wi-ao---- 68.25g
  root pve  -wi-ao---- 29.75g
  swap pve  -wi-ao----  7.00g
 
=== Add an /etc/hosts entry for your IP address ===


Please make sure that your hostname is resolvable via /etc/hosts, i.e you need an entry in /etc/hosts which assigns an IPv4 address to that hostname.
Please make sure that your hostname is resolvable via /etc/hosts, i.e you need an entry in /etc/hosts which assigns an IPv4 address to that hostname.


'''Note''': Make sure that no IPv6 address for your hostname is specified in /etc/hosts
'''Note''': Make sure that no IPv6 address for your hostname is specified in `/etc/hosts`


Example /etc/hosts file:
For instance if your IP address is 192.168.15.77, and your hostname prox4m1, then your <tt>/etc/hosts</tt> file shoud look like:


<pre>root@proxmox-6-177:~# cat /etc/hosts
<pre>
 
127.0.0.1       localhost.localdomain localhost
127.0.0.1 localhost.localdomain localhost
192.168.15.77  prox4m1.proxmox.com prox4m1 pvelocalhost
192.168.6.177 proxmox-6-177.proxmox.com proxmox-6-177 pvelocalhost


# The following lines are desirable for IPv6 capable hosts
# The following lines are desirable for IPv6 capable hosts
 
::1    localhost ip6-localhost ip6-loopback
::1    ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
</pre>
</pre>


=Install Proxmox VE=
You can test if your setup is ok using the '''hostname''' command:
==Adapt your sources.list==
<pre>
 
hostname --ip-address
Adapt your sources.list and add the Proxmox VE repository:
192.168.16.77 # should return here your IP adress
</pre>


<pre>nano /etc/apt/sources.list</pre>
== Install Proxmox VE ==
=== Adapt your sources.list ===


<pre>deb http://ftp.at.debian.org/debian jessie main contrib
Add the Proxmox VE repository:
echo "deb http://download.proxmox.com/debian jessie pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list


# PVE test repository provided by proxmox.com
<b>NOTE:</b> If you have enabled other arch (typically, i386 to run some older software) and apt-get complains about not being able to find /binary-i386: "Unable to find expected entry 'pve/binary-i386/Packages'" you need to remove other arch or use insted the row:
deb http://download.proxmox.com/debian jessie pvetest
<pre>deb [arch=amd64] http://download.proxmox.com/debian jessie pve-no-subscription</pre>
this because Proxmox repository does not have other arch then amd64; more info on multiarch on debian on: https://wiki.debian.org/Multiarch/HOWTO .


# security updates
If it does not work for '''apt-get''' of some files, then replace '''http://''' with '''ftp://''' especially in the first two urls above.
deb http://security.debian.org jessie/updates main contrib
</pre>


Add the Proxmox VE repository key:
Add the Proxmox VE repository key:
<pre>wget -O- "http://download.proxmox.com/debian/key.asc" | apt-key add -</pre>
wget -O- "http://download.proxmox.com/debian/key.asc" | apt-key add -


Update your repository and system by running:
Update your repository and system by running:
<pre>apt-get update && apt-get dist-upgrade</pre>
apt-get update && apt-get dist-upgrade


==Install Proxmox VE packages==
=== Install Proxmox VE packages ===
Install the Proxmox VE packages:
Install the Proxmox VE packages


  apt-get install proxmox-ve ntp ssh postfix ksm-control-daemon open-iscsi
  apt-get install proxmox-ve ssh postfix ksm-control-daemon open-iscsi systemd-sysv


Accept the suggestion to remove Exim and configure postfix according to your network.
Accept the suggestion to remove Exim and configure postfix according to your network.
If you have a mail server in your network, you should configure postfix as a '''satellite system''',
and your existing mail server will be the 'relay host' which will route the emails send by the
proxmox server to the end recipient.
If you don't know what to enter here, choose '''local only'''.
Finally, reboot your system, the new Proxmox VE kernel should be automatically selected in the GRUB menu.


Finally, reboot into your new Proxmox VE kernel.
==== Recommended: remove the os-prober package ====


Optional: Remove the Debian kernel:
The os-prober package scans all the partitions of your host
apt-get remove linux-image-amd64 linux-image-3.16.0-4-amd64 linux-base
including those of you guests VMs to create dual-boot GRUB entries.
This can cause [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788062 file system corruptions in VMs]. If you didn't install Proxmox VE as a dual boot besides another
Operating System you can safely remove the os-prober package.


Check grub2 config by running:
  apt-get remove os-prober
  update-grub


=Connect to the Proxmox VE web interface=
== Connect to the Proxmox VE web interface ==
Connect to the admin web interface (<nowiki>https://youripaddress:8006</nowiki>) and configure the vmbr0 and review all other settings, finally reboot to check if everything is running as expected.
Connect to the admin web interface (<nowiki>https://youripaddress:8006</nowiki>), create a bridge called '''vmbr0''', and add your first network interface to it. If you have a fresh install and didn't add any users yet, you should use the root account with your linux root password, and select "PAM Authentication" to log in.


[[Image:Screen-vmbr0-setup-for-pve2.png||Adapt vmbr0 settings]]
[[Image:Screen-vmbr0-setup-for-pve2.png||Adapt vmbr0 settings]]


=Configure apt to use the new packages repositories=
== Configure apt to use the new packages repositories ==
In order to get latest updates, you need to add one of the new package repositories, see [[Package repositories]]
In order to get latest updates, you need to add one of the new package repositories, see [[Package repositories]]


=Optional: Developer Workstations with Proxmox VE and X11=
== Troubleshooting ==
=== resolv.conf gets overwritten ===
The PVE4 GUI expects to control DNS management and will no longer take its DNS settings from /etc/network/interfaces
Any package that autogenerates (overwrites) /etc/resolv.conf will cause DNS to fail.
e.g. packages 'resolvconf' for IPv4 and 'rdnssd' for IPv6.
 
== Optional Steps ==
=== Optional: Remove the Debian kernel ===
apt-get remove linux-image-amd64 linux-image-3.16.0-4-amd64 linux-base
 
Check grub2 config by running:
update-grub
 
=== Optional: Developer Workstations with Proxmox VE and X11 ===
Proxmox VE is primarily used as virtualization platform with NO additional software installed. In some case it makes sense to have a full desktop running on Proxmox VE, for example for developers using Proxmox VE as their primary workstation/desktop.
Proxmox VE is primarily used as virtualization platform with NO additional software installed. In some case it makes sense to have a full desktop running on Proxmox VE, for example for developers using Proxmox VE as their primary workstation/desktop.


Line 88: Line 121:
  apt-get purge network-manager
  apt-get purge network-manager


[[Category: HOWTO]][[Category: Installation]]
[[Category: Archive]][[Category: Installation]]

Latest revision as of 15:50, 18 July 2019

Yellowpin.svg Note: Article about the old stable Proxmox VE 4.x releases

Introduction

The installation of a supported Proxmox VE server should be done via Bare-metal_ISO_Installer. In some case it makes sense to install Proxmox VE on top of a running Debian Jessie 64-bit, especially if you want a custom partition layout. For this HowTO the following Debian Jessie ISO was used: debian-8.5.0-amd64-netinst.iso.

Install a standard Debian Jessie (amd64)

Install a standard Debian Jessie, for details see Debian, and select a fixed IP. It is recommended to only install the "standard" package selection and nothing else, as Proxmox VE brings its own packages for qemu, lxc. During installation you have to manually partition the Hard Disk and use the choice "Configure the Logical Volume Manager" to create a volume group called "pve" and 3 logical volumes called "swap", "root" and "data". The mount point for "root" will be "/" and for "data" select the manual option and enter "/var/lib/vz". You can format with ext4.

You can also create empty partitions during installation and then create ZFS pool on them. The suggested partition layout with LVM is like that:

Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         122      975872   83  Linux
/dev/sda2             122        5222    40965120   8e  Linux LVM

LVM: root@pvedebian:~# lvs

 LV   VG   Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
 data pve  -wi-ao---- 68.25g
 root pve  -wi-ao---- 29.75g
 swap pve  -wi-ao----  7.00g

Add an /etc/hosts entry for your IP address

Please make sure that your hostname is resolvable via /etc/hosts, i.e you need an entry in /etc/hosts which assigns an IPv4 address to that hostname.

Note: Make sure that no IPv6 address for your hostname is specified in `/etc/hosts`

For instance if your IP address is 192.168.15.77, and your hostname prox4m1, then your /etc/hosts file shoud look like:

127.0.0.1       localhost.localdomain localhost
192.168.15.77   prox4m1.proxmox.com prox4m1 pvelocalhost

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

You can test if your setup is ok using the hostname command:

hostname --ip-address
192.168.16.77 # should return here your IP adress

Install Proxmox VE

Adapt your sources.list

Add the Proxmox VE repository:

echo "deb http://download.proxmox.com/debian jessie pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list

NOTE: If you have enabled other arch (typically, i386 to run some older software) and apt-get complains about not being able to find /binary-i386: "Unable to find expected entry 'pve/binary-i386/Packages'" you need to remove other arch or use insted the row:

deb [arch=amd64] http://download.proxmox.com/debian jessie pve-no-subscription

this because Proxmox repository does not have other arch then amd64; more info on multiarch on debian on: https://wiki.debian.org/Multiarch/HOWTO .

If it does not work for apt-get of some files, then replace http:// with ftp:// especially in the first two urls above.

Add the Proxmox VE repository key:

wget -O- "http://download.proxmox.com/debian/key.asc" | apt-key add -

Update your repository and system by running:

apt-get update && apt-get dist-upgrade

Install Proxmox VE packages

Install the Proxmox VE packages

apt-get install proxmox-ve ssh postfix ksm-control-daemon open-iscsi systemd-sysv

Accept the suggestion to remove Exim and configure postfix according to your network. If you have a mail server in your network, you should configure postfix as a satellite system, and your existing mail server will be the 'relay host' which will route the emails send by the proxmox server to the end recipient. If you don't know what to enter here, choose local only.

Finally, reboot your system, the new Proxmox VE kernel should be automatically selected in the GRUB menu.

Recommended: remove the os-prober package

The os-prober package scans all the partitions of your host including those of you guests VMs to create dual-boot GRUB entries. This can cause file system corruptions in VMs. If you didn't install Proxmox VE as a dual boot besides another Operating System you can safely remove the os-prober package.

apt-get remove os-prober

Connect to the Proxmox VE web interface

Connect to the admin web interface (https://youripaddress:8006), create a bridge called vmbr0, and add your first network interface to it. If you have a fresh install and didn't add any users yet, you should use the root account with your linux root password, and select "PAM Authentication" to log in.

Adapt vmbr0 settings

Configure apt to use the new packages repositories

In order to get latest updates, you need to add one of the new package repositories, see Package repositories

Troubleshooting

resolv.conf gets overwritten

The PVE4 GUI expects to control DNS management and will no longer take its DNS settings from /etc/network/interfaces Any package that autogenerates (overwrites) /etc/resolv.conf will cause DNS to fail. e.g. packages 'resolvconf' for IPv4 and 'rdnssd' for IPv6.

Optional Steps

Optional: Remove the Debian kernel

apt-get remove linux-image-amd64 linux-image-3.16.0-4-amd64 linux-base

Check grub2 config by running:

update-grub

Optional: Developer Workstations with Proxmox VE and X11

Proxmox VE is primarily used as virtualization platform with NO additional software installed. In some case it makes sense to have a full desktop running on Proxmox VE, for example for developers using Proxmox VE as their primary workstation/desktop.

For example, just install XFCE4 desktop and Firefox/Iceweasel browser:

apt-get install xfce4 iceweasel lightdm

If you prefer LXDE desktop instead just do:

apt-get install lxde iceweasel

Make sure network-manager is not used, else pve-cluster will not start in some cases

apt-get purge network-manager