@Aephir I followed your guide and was able to install HAOS in Ubuntu server 22.04 LTS using kvm. Once I got it up and running, I simply restored a full backup of my RPi4 HAOS. One caveat, I haven’t moved my zwave stick over yet. I will do that next.
Below are some notes from my experience that may be of interest to others.
- I am running this VM on a Beelink EQ12 which has two LAN ports that I want to pass through to the VM. So I used a slightly different
/etc/netplan/00-installer-config.yaml
file. See below.
# This is the network config written by 'subiquity'
network:
ethernets:
enp1s0:
dhcp4: true
enp2s0:
dhcp4: false
version: 2
bridges:
br0:
dhcp4: true
interfaces:
- enp1s0
parameters:
stp: true
br1:
dhcp4: false
interfaces:
- enp2s0
addresses:
- 192.168.50.10/24
nameservers:
addresses: [192.168.1.1]
parameters:
stp: true
- When I applied the netplan above, Ubuntu 22.04 assigned a new mac address to the bridge
br0
. This is really strange because I expected it to be the same as the mac address forenp1s0
. After some googling around I found that this issue is associated with Ubuntu 22.04 but no one seems to know exactly why. In any event, the original mac address can be cloned on the bridge by doing the following.
Change themacaddresspolicy
in/usr/lib/systemd/network/99-default.link
frompersistent
tonone
.
This is important because I want my router to assign a static ip address based on the mac address ofenp1s0
. - To install the VM, I used the following command. Note that I manually assign mac addresses to the VM’s LAN ports. Again, this is because I want to be able to assign static ip addresses using mac addresses. Also, I followed the approach suggested by @poiromaniax and used
--osinfo detect=on,require=off
.
virt-install --import --name haos --description "Home Assistant OS" --osinfo detect=on,require=off --ram=3072 --vcpus=2 --disk /var/lib/libvirt/images/haos-vm/haos_ova-10.3.qcow2,bus=virtio --network bridge=br0,model=virtio,mac=52:54:00:B9:7A:01 --network bridge=br1,model=virtio,mac=52:54:00:B9:7A:02 --graphics none --noautoconsole --boot uefi
-
I followed the instructions provided by @brady, namely to create the
/etc/docker/daemon.json
file and restart docker. But when I went to restart docker, I got a message saying that the service didn’t exist:Failed to restart docker.service: Unit docker.service not found.
. It didn’t seem to interfere with anything I was doing. -
I found that I needed to install the
virtinst
package.