Announcement

Collapse
No announcement yet.

Proxmox 5 on Hetzner Root-Server with Dual-Stack IPv4/IPv6 for Host and Guests

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Proxmox 5 on Hetzner Root-Server with Dual-Stack IPv4/IPv6 for Host and Guests

    Introduction

    In an earlier blog post i wrote about a standard Debian installation with KVM, IPv4 and IPv6 for both the host and it's guests. This time we will setup Proxmox 5.x on a Hetzner Root-Server also using Debian and IPv4 and IPv6 for the Host and Guests.
    Since the old blog post was missing some more explanations, i'll try to answer them here. The network setup for this guide can be used for a standard Debian as well with some minor modifications like naming the network bridge br0 instead of vmbr0 for example.

    We will also mimic a default Proxmox 5.x installation with LVM-Thin Provisioning and the similar hard-disk layout.



    Installing Debian Stretch

    At first, we have to boot the Rescue-System in the Hetzner Robot for our new Root-Server. In this post i'll use a PX61-SSD Root-Server but the instructions should work the same for almost all other Hetzner Root-Servers available, like EX- or AX-series.

    Use Linux with 64bit for the Rescue-System and reboot your server in order to start it. Remind the root password for the Rescue-System login if you haven't used your own public-key, which i always recommend.

    After logging into the booted rescue image simply run installimage and choose Debianand the latest minimal Debian Stretch image available.



    Partition Layout

    In the installation configuration you can simply use the defaults but only set your own Hostname to your desired FQDN of your Host and the following partition layout which mimics the default Proxmox 5.x ISO installer.

    At first comment out all defaults for PART and LV lines with a # and then add the following lines:

    Code:
    PART /boot ext4 512M
    PART lvm pve all
    
    LV pve swap swap swap 8G
    LV pve root / ext4 100G
    We will add the LVM-Thin Volume manually later, so press F10 to save and finish the configuration. Afterwards press yes twice to overwrite both /dev/sda and /dev/sdb with the new configuration and let it install our new Debian.

    When it's done, simply reboot the machine.


    Installing Proxmox 5.x over Debian Stretch

    Now that we have a minimal Debian Stretch installation, we can continue installing Proxmox 5.x on top of it. For that, first run apt-get update && apt-get -y upgrade to install remaining upgrades, so we have a fully patched Debian.

    Now let's add the Debian Stretch based Proxmox APT Repository by simply run the following command as root (or with sudo):

    Code:
    echo "deb http://download.proxmox.com/debian stretch pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
    There are now two ways to get the current GPG key. First you can get it by issuing the following command as root

    Code:
    wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
    or you can do it manually and get the key from a trusted keyserver like below:

    Code:
    ~$ apt-get -y install dirmngr
    ~$ gpg --recv-key --keyserver pool.sks-keyservers.net 0D9A1950E2EF0603
      gpg: /root/.gnupg/trustdb.gpg: trustdb created
      gpg: key 0D9A1950E2EF0603: public key "Proxmox Virtual Environment 5.x Release      Key " imported
      gpg: Total number processed: 1
      gpg:               imported: 1
    ~$ gpg --export -a 0D9A1950E2EF0603 | apt-key add -
      OK
    Now update your APT Repository and do a full dist-upgrade using apt-get update && apt-get -y dist-upgrade

    If GRUB asks for replacing the config, choose to install the maintainers version instead of keeping the locally modified one.

    Now our system is prepared for the Proxmox Installation which we will start now by issuing apt-get -y install proxmox-ve ssh postfix ksm-control-daemon open-iscsi systemd-sysv.

    If postfix asks for the type of your site, simply stick to the default Internet site and use the pre-filled FQDN as your System mail name.

    After the installation, reboot your Server to your shiny new Proxmox 5.x to continue with the configuration



    Configuring Proxmox 5.x

    If you don't know the root password (for ex. if you used the public-key authentication) simply set a new one after the reboot by running passwd as root.

    Also after rebooting the server, Proxmox added a new Enterprise APT Repository which we don't want, since we don't have any subscription. If you have one, leave it there, if not, remove it with rm /etc/apt/sources.list.d/pve-enterprise.list && apt-get update

    Add the LVM-Thin storage

    At first, we will add the LVM-Thin storage to our new Proxmox Server. For that, create a new logical volume named data using the following commands. Since it's LVM, i'll only use 100G of space but this can be made larger at any time.

    Code:
    ~$ lvcreate -L 100G -n data pve
    ~$ lvconvert --type thin-pool pve/data
    Last edited by DaMysterious; 08-03-2019, 12:41 PM.
Working...
X