Login to the UI
To get started you can head to https://publicip:8006 or https://customdomain.tld:8006 if you’ve configured this. You will now be presented with a login screen, use the username ofroot and the password that was sent via email.
Change the default password
Once you’re logged in, in the top right corner selectroot@pam where you will see a dropdown for ‘password’. At this screen you can define a new password and confirm it once before you are able to use it. While you can also configure 2FA at this stage you will have issues with joining clusters, once AAD authentication is configured we will be disabling the root account anyways so it will not be configured during this tutorial.
Configuring SAML / AAD Authentication
:::info This step is entirely optional but as we have a dev enviornment for testing it makes sense to utilise as much as we can from it. :::Azure Portal Setup
First thing we need to do is configure ourselves a new ‘Enterprise Application’ within the AAD Portal. Once logged into the azure portal you’ll need to do the following steps:- Go to ‘App Registrations’ on the left-hand menu
- Select ‘New Registration’
- A new window will appear, you’ll need to complete the following bits of information
- Application Name - ‘Proxmox Console’
- Supported Account Types - ‘Single Tenant’
- Redirect URL - ‘https://vs01.public.ip:8006’ (This will be the domain you wish to access the proxmox interface from)
- A new window will appear, you’ll need to complete the following bits of information
- Select ‘Register’ to create the Application
- Optional: You can now add additional proxmox interfaces for the other servers if you so chose
- Select ‘Certificates & Secrets’ from the left-hand menu, this is where we generate the app-secret
- Select ‘New Client Secret’
- Define a ‘name’ and ‘duration’ (The name does not matter but duration will depend when you need to issue a new secret)
Proxmox OpenID Connect Setup
To make changes to authentication on the left-hand menu select ‘Datacentre’. Once you’ve selected the datacentre tab a new UI with another menu will appear, find ‘Permissions’ and then select the ‘Realms’ sub option.- Select ‘Add’ at the top of the page and from the dropdown select ‘OpenID Connect’
- Ensure your page has the following information filled out
- Issuer URL - ‘https://login.microsoftonline.com/{TenantID}/v2.0’
- Realm - ‘AzureAD’
- Client ID - ‘Copied Application ID’
- Client Key - ‘Copied Client Secret’
- Default - Enable tickbox
- Autocreate Users - Enable (disable after your first admin user has logged in)
- Username Claim - ‘Default / Username’ (either option should work without isssues)
- Scopes - ‘Blank’
- Prompt - ‘Blank’
- Log out of the
root@PAMuser account and attempt to login using theAzureADrealm at logon
Proxomx Users and Groups
The following changes are made under the ‘Groups’, ‘Roles’ and ‘Users’ tabs within the ‘Permissions’ section on the Proxmox interface, if you’ve just tested out your OpenID authentication you’ll need to login with theroot@PAM account a few more times before everything is as needed.
When you’re logged in you should do the following:
- Select ‘Create’
- Name the group something informative, we will use ‘GlobalAdmin’ in this instance
- Select ‘Permissions’ on the left-hand menu and select ‘Add’
- Select ‘Group Permission’
- Ensure your page has the following information filled out
- Path - ’/’
- Group - ‘GlobalAdmin’
- Role - ‘Administrator’
- Propagate - ‘Enable’
- Select ‘Add’
- Select ‘Users’ on the left-hand menu
- Find your recently logged in AzureAD realm user
- Double click to bring up the properties field
- Select the ‘Groups’ dropdown
- Select the ‘GlobalAdmin’ group created
- Press ‘OK’ to apply changes
Configuring SSL
Currently our Proxmox servers are using self-signed SSL certifictates but we will be utilising lets encrypt that lets us issue certificates for free.ACME Configuration
Within ‘Datacentre’ select ‘ACME’ which will be our provisioning tool of choice, under ‘Accounts’ select ‘Add’- Ensure your page has the following information filled out
- Account Name - ‘ProxmoxACME’
- Email - ‘you@example.com’
- ACME Directory - ‘Lets Encrypt V2’
- Accept ToS - ‘Enable’
- Select ‘Register’
- Ensure your page has the following information filled out
- Plugin ID - ‘CloudflareDNS’
- Validation Delay - ‘30 (default)’
- DNS API - ‘Cloudflare Managed DNS’
- Depending on the API module used you will need to provide certain information from your DNS provider, this will normally be an email address and api key
- Select ‘Add’ once you have provided the required information
Generate Certificate
In order to generate the certificate we need to ensure ‘VS01’ is selected then under ‘System’ go to ‘Certificates’ The following is configured under the ‘ACME’ heading- Select ‘Add’
- Ensure your page has the following information filled out
- Challenge Type - ‘DNS’
- Plugin - ‘(One You Just Configured)’
- Domain - ‘FQDN Without HTTPS://’
- Select ‘Add’
- Next to the words ‘Using Account: None’ press the ‘Edit’ button
- From the dropdown select ‘ProxmoxACME’
- Press ‘Apply’
- Press ‘Order Certificates Now’
- Wait for the steps to finish on the screen, wait until you see the words ‘TASK OK’
Adding Another Host
Now we have Azure auth and SSL configured we can now create a cluster and add another server to datacentre, this will allow you to Migrate VMs between hosts and allows for high-availability. :::info This step is entirely optional if you either have a single host server or prefer complete isolation of your host devices. :::Patching
It’s recommended that you update all of your VS host devices before joining them into a cluster to ensure no package mismatches.- Select ‘VS01’ from the left-hand menu
- Select ‘Updates’
- Select ‘Refresh’
- Wait for the ‘TASK OK’ prompt before pressing ‘Upgrade’
- Select ‘Upgrade’
- Press ‘Y’ on your keyboard and then press ‘Enter’
- Press ‘Enter’ on any yes prompts to install / reboot your PC
Creating a Cluster
Clusters are created at ‘Datacentre’ level, you will then see a ‘Cluster’ option on the left hand menu.- Select ‘Create Cluster’
- Cluster Name ‘(Name of Choice)’
- Cluster Network - ‘Link 0 (ensure public ip is listed)’
- Select ‘Create’
- Select ‘Join Information’
- Copy this somewhere safe, you’ll need it to add other nodes to your cluster
Joining a Cluster
You will need to open a new tab, navigate to the second host and login with theroot@PAM account. You will need to navigate to the same page you was previously at, ‘Datacentre’ > ‘Cluster’
- Select ‘Join Cluster’
- Paste the ‘Join Information’ key into the box provided
- Enter your
root@PAMpassword in the box highlighted red - Cluster Network - ‘From the dropdown select the public IP of VS02’
- Select ‘Join (Cluster Name)’
Virtual Networking Configuration
Unfortunately, the following steps will need to be created on a per host level, we now need to create a virtual adapter that sits on the OVH vRACK MAC Address. This will allow us for across host communication within our cluster but without going over the public internet.- Select ‘VS0X’ from the left-hand menu
- Select ‘System’ > ‘Network’
- Select ‘Create’
- Select ‘Linux Bridge’
- Name - ‘vmbr1’
- Autostart - ‘Tick’
- Bridge Ports - ‘(second network adapter name here that isn’t already bridged)’
- Select ‘Create’
- Select ‘Apply Configuration’