Hi,
Since the supervised installation method is deprecated now, I needed to move my supervised-on-Xen-VM HA installation to something new.
Something new being another VM on a Debian machine.
Rough steps, assuming that you have Xen setup up and running.
- Backup and shutdown
Make a last backup of your supervised setup (if you have HA running already).
Make sure that the backup file is also available on your local PC (which you use for step 5). And that you have the encryption key.
Shutdown and prevent it from turning on again (e.g. à la /etc/xen/auto).
-
Download the HA image
I used the .qcow2 version from Linux - Home Assistant -
Convert the image to .img
Used Learning Xen: Converting Existing Non-Xen Hypervisor Images for Use in Xen
Let’s assume as output: disk-haos.img
- Xen config (big thanks to Claude, with some tweaking)
name = '<your hostname>'
type = "hvm"
vcpus = '2'
memory = '3072'
bios = 'ovmf'
boot = 'c'
# Architecture specific
arch = "x86_64"
acpi = 1
apic = 1
pae = 1
hap = 1
rtc_timeoffset = 0
localtime = 0
# Memory features
shadow_memory = 16 # Adequate shadow memory
#
# Disk device(s).
#
disk = [ 'file:/<path>/disk-haos.img,xvda,rw' ]
# Networking
#
vif = [ 'mac=00:16:3E:<aa:bb:cc> ,bridge=<your bridge>' ]
serial = 'pty'
#
# Behaviour
#
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
The VM did not boot with more than 3072MB RAM (Grub started but then went into a reboot loop), which might be an issue with my overall setup. Did not bother yet to figure out the details.
-
DHCP setup
Configure your DHCP server to assign a permanent IP, based on the one set in the Xen config file. -
Boot and restore
xl create .cfg
Wait…
Navigate to :8123
When asked, upload the last backup.
Worked immediately for me.
- Additional add-ons installed
Advanced SSH & Web Terminal
Remote syslog support: GitHub - mib1185/ha-addon-syslog: Syslog Home Assistant AddOn - to send your HAOS logs to a remote syslog server