- Install template - Debian 8.7 stable (Jessie) (6.4)
- Select [ x ] Custom installation
/ 80000MB
/home 100000MB
/swap 512M
- Customized hostname: myhost
- SSH Key: soyoustart.com
- [ x ] Use the distribution kernel
Review your settings and install
... Waiting ...
- Connect to the server using ssh
# ssh ....
Linux ns501375.ip-198-27-67.net 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux
Update packages
# apt-get update
Install linux v4.x from backports
# apt-get install -t jessie-backports linux-image-amd64
Make sure it works
# reboot
# ssh ....
Linux ns501375.ip-198-27-67.net 4.9.0-0.bpo.2-amd64 #1 SMP Debian 4.9.18-1~bpo8+1 (2017-04-10) x86_64 GNU/Linux
OK, We have kernel v4.x. Lets install ZFS. We need to create additional partitions for ZFS. My server has 2x2TB HDDs.
# cfdisk /dev/sda
- Select 'free space',
- Hit 'new' button
- Partition size: All available (in my case 1.7T) and hit enter
- Hit 'primary button
- Hit 'type' and select a new partition type: fd - Linux raid autodetect (optional)
- Hit 'write' and confirm: yes
- quit
Do the same for /dev/sdb
# echo "deb http://download.proxmox.com/debian jessie pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
# wget -O- "http://download.proxmox.com/debian/key.asc" | apt-key add -
# apt-get update
# apt-get dist-upgrade
During upgrade, select use package version of grub...
# reboot
# apt-cache search pve | grep Image | sort
...
pve-kernel-4.4.49-1-pve - The Proxmox PVE Kernel Image
....
# apt-get install pve-firmware pve-kernel-4.4.49-1-pve
Make sure that GRUB_DEFAULT (/etc/default/grub) is correct, in my case it should be 1. To make grub flat you could set GRUB_DISABLE_SUBMENU=y in the /etc/default/grub and run update-grub and check /boot/grub/grub.cfg again
For linux entry number check /boot/grub/grub.cfg file and find the following line: menuentry 'Proxmox Virtual Environment GNU/Linux, with Linux 4.9.0-0.bpo.2-amd64' It is second menuentry in the file. It is 0 based, so it's 1.
# update-grub
Activate pve kernel
# reboot
# ssh ...
Linux ns501375.ip-198-27-67.net 4.4.49-1-pve #1 SMP PVE 4.4.49-86 (Thu, 30 Mar 2017 08:39:20 +0200) x86_64 GNU/Linux
Good!
Update backports repo in the /etc/apt/source.list to use original debian backports instead of ovh
deb http://ftp.debian.org/debian jessie-backports main contrib
# apt-get install -t jessie-backports zfs-dkms
At that point you should be able to run zfs
# zfs
missing command
usage: zfs command args ...
where 'command' is one of the following:
create [-p] [-o property=value] ... <filesystem>
...
Create a mountpoint, it is a default Proxomox path for all data
# mkdir -p /var/lib/vz
Create zfs pool and mount it to /var/lib/vz
# zpool create -m /var/lib/vz tank mirror /dev/sda4 /dev/sdb4
# zpool status
pool: tank
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
sda4 ONLINE 0 0 0
sdb4 ONLINE 0 0 0
Finally install Proxmox-ve and related packages
# apt-get install proxmox-ve ssh postfix ksm-control-daemon open-iscsi systemd-sysv
# reboot
Open in the browser xxx.xxx.xxx.xxx:8006 and use your root/pass to get into the admin panel.
Add ISO images to the proxomox:
# cd /var/lib/vz/template/iso
# wget http://releases.ubuntu.com/16.04/ubuntu-16.04.2-server-amd64.iso
Now you could create yout first VM!
Don't forget to add a new MAC address for your IP_FAILOVER in the Control Panel (see Manage IPs) and configure your network device.
$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address IP_FAILOVER
netmask 255.255.255.255
broadcast IP_FAILOVER
dns-nameservers 213.186.33.99 8.8.8.8 8.8.4.4
post-up route add MAIN_IP.254 dev eth0
post-up route add default gw MAIN_IP.254
pre-down route del default gw MAIN_IP.254
pre-down route del MAIN_IP.254 dev eth0
to avoid freeze while network interface is not configured, add the following grub options to the /etc/default/grub file.
$ cat /etc/default/grub
...
# GRUB_CMDLINE_LINUX=""
# update to
GRUB_CMDLINE_LINUX="noapic acpi=off net.ifnames=0 biosdevname=0"
# noapic acpi=off - to avoid boot freeze
# net.ifnames=0 biosdevname=0 - rename iface to ethX