Install Proxmox VE on Debian Stretch: Difference between revisions

From Proxmox VE
Jump to navigation Jump to search
(Remove LVM partioning instructions as it does not match what we create by default (lvm-thin) anymore + update link for Stretch ISO)
(Remind that PVE 5/Debian9 is EOL)
 
(8 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Note|Article about the old stable Debian 9 and Proxmox VE 5.x releases, which are both End-of-Life since July 2020.}}
== Introduction ==
== 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 Stretch 64-bit, especially if you want a custom partition layout. For this HowTO the following Debian Stretch ISO was used: [https://cdimage.debian.org/mirror/cdimage/release/9.0.0/amd64/iso-cd/debian-9.0.0-amd64-netinst.iso].
NOTE: We recommend using the article for the current stable release: [[Install Proxmox VE on Debian Buster]]
 
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 Stretch 64-bit, especially if you want a custom partition layout. For this HowTO the following Debian Stretch ISO was used: [https://cdimage.debian.org/mirror/cdimage/release/9.0.0/amd64/iso-cd/debian-9.0.0-amd64-netinst.iso].


== Install a standard Debian Stretch (amd64) ==
== Install a standard Debian Stretch (amd64) ==
Install a standard Debian Stretch, for details see [http://www.debian.org Debian], and select a fixed IP.
Install a standard Debian Stretch, 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.
It is recommended to only install the "standard"  package selection and nothing else, as Proxmox VE brings its own packages for qemu, lxc.
Line 9: Line 13:
=== Add an /etc/hosts entry for your IP address ===
=== 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 <tt>/etc/hosts</tt>, <i>i.e</i> you need an entry in <tt>/etc/hosts</tt> 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 <tt>/etc/hosts</tt>


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:
For instance if your IP address is <tt>192.168.15.77</tt>, and your hostname <tt>prox4m1</tt>, then your <tt>/etc/hosts</tt> file should look like:


<pre>
<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.15.77  prox4m1.proxmox.com prox4m1


# The following lines are desirable for IPv6 capable hosts
# The following lines are desirable for IPv6 capable hosts
Line 25: Line 29:
</pre>
</pre>


You can test if your setup is ok using the '''hostname''' command:
You can test if your setup is ok using the <tt>hostname</tt> command:
<pre>
<pre>
hostname --ip-address
hostname --ip-address
192.168.15.77 # should return here your IP adress
192.168.15.77 # should return here your IP address
</pre>
</pre>


Line 39: Line 43:
Add the Proxmox VE repository key:
Add the Proxmox VE repository key:
  wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
  wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
chmod +r /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg  # optional, if you have a changed default umask


Update your repository and system by running:
Update your repository and system by running:
Line 61: Line 66:


Finally, reboot your system, the new Proxmox VE kernel should be automatically selected in the GRUB menu.
Finally, reboot your system, the new Proxmox VE kernel should be automatically selected in the GRUB menu.
'''Note''': If you have a subscription key don't forget to switch to the enterprise repository after installation, see [[Package repositories]].


==== Recommended: remove the os-prober package ====
==== Recommended: remove the os-prober package ====
Line 72: Line 79:


== 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>), 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.
Connect to the admin web interface (<nowiki>https://youripaddress:8006</nowiki>). 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.
 
Once logged in, create a '''Linux Bridge''' called '''vmbr0''', and add your first network interface to it.


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


== Configure apt to use the new packages repositories ==
== Configure apt to use the new packages repositories ==
Line 87: Line 96:
== Optional Steps ==
== Optional Steps ==
=== Optional: Remove the Debian kernel ===
=== Optional: Remove the Debian kernel ===
  apt remove linux-image-amd64 linux-image-4.9.0-2-amd64
  apt remove linux-image-amd64 linux-image-4.9.0-3-amd64


Check grub2 config by running:
Check grub2 config by running:

Latest revision as of 16:35, 27 November 2020

Yellowpin.svg Note: Article about the old stable Debian 9 and Proxmox VE 5.x releases, which are both End-of-Life since July 2020.

Introduction

NOTE: We recommend using the article for the current stable release: Install Proxmox VE on Debian Buster

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 Stretch 64-bit, especially if you want a custom partition layout. For this HowTO the following Debian Stretch ISO was used: [1].

Install a standard Debian Stretch (amd64)

Install a standard Debian Stretch, 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.

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 should look like:

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

# 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.15.77 # should return here your IP address

Install Proxmox VE

Adapt your sources.list

Add the Proxmox VE repository:

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

Add the Proxmox VE repository key:

wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
chmod +r /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg  # optional, if you have a changed default umask

Update your repository and system by running:

apt update && apt dist-upgrade

NOTE: If you have enabled other another arch (typically, i386 to run some older software) and apt 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 instead the row:

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

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

Install Proxmox VE packages

Install the Proxmox VE packages

apt install proxmox-ve postfix open-iscsi

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.

Note: If you have a subscription key don't forget to switch to the enterprise repository after installation, see Package repositories.

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. If you didn't install Proxmox VE as a dual boot besides another Operating System you can safely remove the os-prober package.

apt remove os-prober

Connect to the Proxmox VE web interface

Connect to the admin web interface (https://youripaddress:8006). 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.

Once logged in, create a Linux Bridge called vmbr0, and add your first network interface to it.

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 PVE GUI expects to control DNS management and will no longer take its DNS settings from /etc/network/interfaces Any package that auto-generates (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 remove linux-image-amd64 linux-image-4.9.0-3-amd64

Check grub2 config by running:

update-grub