Date : 2026-04-03
Auteur : Daniel Caron
Version OS : HAOS 14.2 (Home Assistant Operating System)
Rôle : Serveur domotique — Home Assistant
VLAN : 65 (Domotique)
IP : 10.21.65.10
FQDN : whvh3000.home.carontech.net
URL interne : https://ha.home.carontech.net
URL externe : https://ha.carontech.net
⚠️ HAOS — exception au standard de nommage
Le hostname interne de la VM est imposé par HAOS et ne peut pas être changé sans risque : il demeurehomeassistant. L'entrée DNS Awhvh3000.home.carontech.netpointe vers l'IP10.21.65.10selon le standard du lab, mais le hostname réseau réel esthomeassistant(accessible via mDNS àhomeassistant.local).
⚠️ HAOS 17.x — incompatibilité SeaBIOS
HAOS 17.x utilise une table de partition GPT/EFI incompatible avec SeaBIOS (Legacy BIOS). Il faut obligatoirement utiliser OVMF (UEFI) avec un EFI disk séparé. La version 14.2 a été utilisée pour l'installation initiale — HAOS se met à jour automatiquement depuis l'interface web.
⚠️ VLAN 65 — bridge Proxmox
Le VLAN 65 doit être explicitement ajouté dans/etc/network/interfacessurphhv01(paramètrebridge-vids) et le port trunk UniFi dephhv01doit autoriser ce VLAN. Sans ces deux configurations, HAOS ne reçoit pas d'IP DHCP.
.qcow2 (téléchargée manuellement)whvh3000zfs-datazfs-data (obligatoire avec OVMF)Connexion à phhv01 :
ssh -i ~/.ssh/id_ed25519_proxmox [email protected]
Téléchargement de l'image :
mkdir -p /var/lib/vz/template/haos
cd /var/lib/vz/template/haos
wget https://github.com/home-assistant/operating-system/releases/download/14.2/haos_ova-14.2.qcow2.xz
unxz haos_ova-14.2.qcow2.xz
Note : Vérifier la dernière version stable sur https://github.com/home-assistant/operating-system/releases avant de télécharger. Toujours préférer une version stable éprouvée plutôt que la toute dernière release.
Dans Proxmox UI → Create VM :
Onglet General
| Champ | Valeur |
|---|---|
| Node | phhv01 |
| VM ID | 3000 |
| Name | whvh3000 |
Onglet OS
| Champ | Valeur |
|---|---|
| Media | Do not use any media |
| Guest OS Type | Linux |
| Version | 6.x - 2.6 Kernel |
Onglet System
| Champ | Valeur |
|---|---|
| Machine | i440fx |
| BIOS | OVMF (UEFI) |
| EFI Storage | zfs-data |
| Pre-enroll keys | ❌ Décoché |
| SCSI Controller | VirtIO SCSI single |
| Qemu Agent | ✅ Coché |
Onglet Disks
Supprimer le disque par défaut (corbeille rouge) — laisser la liste vide.
Onglet CPU
| Champ | Valeur |
|---|---|
| Sockets | 1 |
| Cores | 4 |
| Type | host |
Onglet Memory
| Champ | Valeur |
|---|---|
| Memory | 4096 MB |
| Ballooning | ❌ Décoché |
Onglet Network
| Champ | Valeur |
|---|---|
| Bridge | vmbr0 |
| VLAN Tag | 65 |
| Model | VirtIO (paravirtualized) |
| Firewall | ❌ Décoché |
Onglet Confirm
⚠️ Décocher "Start after created" — le disque doit être importé avant le premier démarrage.
qm importdisk 3000 /var/lib/vz/template/haos/haos_ova-14.2.qcow2 zfs-data
Note : Le nom du stockage ZFS dans Proxmox est
zfs-data(vérifier avecpvesm status). Le pool ZFS sous-jacent s'appelledata-store— ces deux noms sont distincts.
Dans Proxmox UI → VM 3000 → Hardware → Unused Disk 0 → double-clic :
| Champ | Valeur |
|---|---|
| Bus/Device | SCSI → scsi0 |
| Discard | ✅ Coché |
| SSD emulation | ✅ Coché |
Cliquer Add.
Dans Options → Boot Order → Edit :
scsi0, le placer en premierDans Options → Start at boot → Yes
Vérifier que le VLAN 65 est présent dans /etc/network/interfaces :
grep bridge-vids /etc/network/interfaces
La ligne doit inclure 65 :
bridge-vids 1,60,65,70
Si absent, ajouter 65 et appliquer :
ifreload -a
Vérifier que le port trunk UniFi de phhv01 autorise le VLAN 65 (UniFi → Devices → R138-USW-24 → Ports → port phhv01).
qm start 3000
Dans la console Proxmox, observer le démarrage. HAOS effectue une configuration initiale au premier boot (~2-3 minutes). À la fin, l'IP DHCP assignée s'affiche :
Home Assistant is running at http://10.21.65.X:8123
BC:24:11:F4:C7:B8 (visible dans Hardware → Network Device)10.21.65.10| Type | Nom | Valeur |
|---|---|---|
| A | whvh3000.home.carontech.net |
10.21.65.10 |
| CNAME | ha.home.carontech.net |
whvu1010.home.carontech.net |
Note split horizon : Le CNAME
ha.home.carontech.netpointe verswhvu1010(pas directement verswhvh3000) pour que le trafic passe par la chaîne proxy complète, identique au trafic externe.
| Source | Destination | Port | Action |
|---|---|---|---|
whvu1515 (10.21.60.14) |
whvh3000 (10.21.65.10) |
8123 | Allow TCP |
| VPN-Admin (10.21.99.0/24) | VLAN 65 (10.21.65.0/24) | All | Allow |
Note WireGuard : Ajouter
10.21.65.0/24dans lesAllowedIPsdu profil WireGuard surLaptop-Danielpour accéder au VLAN Domotique via VPN.
HAOS doit être informé qu'il est derrière un proxy. Dans la console HAOS :
login
vi /mnt/data/supervisor/homeassistant/configuration.yaml
Ajouter :
http:
use_x_forwarded_for: true
trusted_proxies:
- 10.21.60.14
- 127.0.0.1
Redémarrer le core :
ha core restart
Le certificat de whvu1515 couvre plusieurs services via SAN. Ajouter ha.carontech.net lors du prochain renouvellement ou immédiatement.
Procédure :
whvd9998 (CA intermédiaire)whvd9998sign-cert.ps1 depuis Laptop-Daniel avec le nouveau SAN ajoutéSANs du certificat whvu1515 (version actuelle)
| # | SAN |
|---|---|
| 1 | whvu1515.home.carontech.net |
| 2 | wiki.carontech.net |
| 3 | photos.carontech.net |
| 4 | ha.carontech.net |
Fichier : /etc/nginx/sites-available/ha.conf
#---------------------------
# Home Assistant - proxy depuis whvu1010 et acces admin direct
#---------------------------
server {
listen 443 ssl;
server_name ha.carontech.net;
ssl_certificate /etc/pki/certs/whvu1515-fullchain.crt;
ssl_certificate_key /etc/pki/private/whvu1515.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
proxy_pass http://10.21.65.10:8123;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Note : Les headers
UpgradeetConnectionsont obligatoires pour Home Assistant — il utilise WebSocket pour les mises à jour temps réel de l'interface.
Activation :
sudo ln -s /etc/nginx/sites-available/ha.conf /etc/nginx/sites-enabled/ha.conf
sudo nginx -t
sudo systemctl reload nginx
sudo certbot certonly --dns-cloudflare \
--dns-cloudflare-credentials ~/.secrets/cloudflare.ini \
-d ha.carontech.net
Fichiers générés :
/etc/letsencrypt/live/ha.carontech.net/fullchain.pem/etc/letsencrypt/live/ha.carontech.net/privkey.pemFichier : /etc/nginx/sites-available/ha.carontech.net
# Force HTTP → HTTPS
server {
listen 80;
server_name ha.carontech.net;
location /.well-known/acme-challenge/ {
root /var/www/html;
}
location / {
return 301 https://$host$request_uri;
}
}
# Serve Home Assistant via HTTPS
server {
listen 443 ssl;
server_name ha.carontech.net;
client_max_body_size 100M;
ssl_certificate /etc/letsencrypt/live/ha.carontech.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ha.carontech.net/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
proxy_pass https://whvu1515.home.carontech.net:443;
proxy_set_header Host ha.carontech.net;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Activation :
sudo ln -s /etc/nginx/sites-available/ha.carontech.net /etc/nginx/sites-enabled/ha.carontech.net
sudo nginx -t
sudo systemctl reload nginx
Ajouter ha.carontech.net dans le tunnel b710043f-c5c9-48ad-8678-a99197c1f6e2 sur whvu1010 :
| Service | Public Hostname | Type | URL |
|---|---|---|---|
| Home Assistant | ha.carontech.net |
HTTPS | https://whvu1010.home.carontech.net |
Accéder à http://10.21.65.10:8123 et suivre l'assistant :
Une fois l'installation complète, mettre à jour vers la dernière version depuis l'interface HA :
Settings → System → Updates
Accepter toutes les mises à jour disponibles (HAOS, Supervisor, Core). Laisser redémarrer entre chaque mise à jour si demandé.
Accès externe :
Cloudflare Tunnel → whvu1010:443 (Let's Encrypt) → whvu1515:443 (PKI interne) → whvh3000:8123 (HTTP)
Accès interne :
Station → whvu1010:443 (Let's Encrypt) → whvu1515:443 (PKI interne) → whvh3000:8123 (HTTP)
# Statut VM
qm status 3000
# Démarrer / Arrêter / Redémarrer
qm start 3000
qm stop 3000
qm reboot 3000
# Console HAOS (depuis phhv01)
qm terminal 3000
# Statut Home Assistant (depuis console HAOS)
ha core status
ha supervisor status
ha host info
# Redémarrer le core HA
ha core restart
# Logs core HA
ha core logs
# Logs supervisor
ha supervisor logs
# Info réseau HAOS
ha network info
# Mise à jour depuis CLI
ha core update
ha supervisor update
ha os update
| Paramètre | Valeur |
|---|---|
| VM ID | 3000 |
| Hostname HAOS | homeassistant (exception — voir note) |
| FQDN DNS | whvh3000.home.carontech.net |
| OS | HAOS 14.2+ |
| BIOS | OVMF (UEFI) |
| Machine | i440fx |
| vCPU | 4 |
| RAM | 4096 MB |
| Disque OS | zfs-data:vm-3000-disk-2 (32G) |
| EFI Disk | zfs-data:vm-3000-disk-1 (1M) |
| Réseau | VirtIO, vmbr0, VLAN 65 |
| MAC | BC:24:11:F4:C7:B8 |
| IP | 10.21.65.10 |
| Start at boot | Oui |
| URL interne directe | http://10.21.65.10:8123 |
| URL interne proxy | https://ha.home.carontech.net |
| URL externe | https://ha.carontech.net |
| Problème | Cause | Solution |
|---|---|---|
| "Booting from Hard Disk" figé | HAOS 17.x incompatible avec SeaBIOS | Utiliser OVMF (UEFI) + EFI disk |
| Pas d'IP DHCP au démarrage | VLAN 65 absent du bridge Proxmox | Ajouter 65 dans bridge-vids dans /etc/network/interfaces et ifreload -a |
| Pas d'IP DHCP (2) | Port trunk UniFi de phhv01 ne passait pas VLAN 65 | Ajouter VLAN 65 dans le port profile du switch |
storage 'data-store' does not exist |
Nom du stockage Proxmox ≠ nom du pool ZFS | Utiliser pvesm status pour obtenir le nom exact (zfs-data) |
ha core ne démarre pas |
Désynchronisation versions supervisor/core (HAOS 17.1) | Réinstaller avec HAOS 14.2 — version stable et éprouvée |
| Port 8123 inaccessible depuis VPN | VLAN 65 absent des AllowedIPs WireGuard |
Ajouter 10.21.65.0/24 dans la config WireGuard de Laptop-Daniel |
sign-cert.ps1 dans un fichier de config séparérevoke-cert.ps1 pour automatiser la révocationwhvd0001)