The detailed steps of installing Home Assistant Operating System on Ubuntu
Install virt-manager
apt install virt-manager
or sudo apt install virt-manager
Config internet
Check Aephir’s post.
apt install net-tools
or sudo apt install net-tools
ifconfig
Mark the network interface, eno1
, enp1s0
..
Create a netplan yaml
file in the /etc/netplan/
directory with the following content.
# This is the network config written by 'subiquity'
network:
ethernets:
eno1:
dhcp4: true
version: 2
bridges:
br0:
dhcp4: yes
interfaces:
- eno1
parameters:
stp: true
Note replacing eno1
with your bridge interface.
netplan generate
or sudo netplan generate
netplan apply
or sudo netplan apply
apt install bridge-utils
or sudo apt install bridge-utils
brctl show
Mark the bridge adapter name, br0
or something else.
Prepare the image
-
Download the latest image.
-
Decompress it, if needed. Note that some
.xz
files were broken.xz -d -v haos_ova-10.4.qcow2.xz
orunxz haos_ova-10.4.qcow2.xz
360 zip works perfect.
Install the HAOS VM
virt-install --import --name hass --description "Home Assistant OS" --os-variant=generic \
--memory 2048 --vcpus 2 --cpu host \
--disk <path to qcow2 file>,format=qcow2,bus=virtio \
--network bridge=br0,model=virtio \
--osinfo detect=on,require=off \
--graphics none \
--noautoconsole \
--boot uefi \
--autostart
Then wait patiently.
virsh
commands
List domains/VMs:
virsh list
or virsh list --all
Start a domian:
virsh start <domain name>
Immediately shutdown a domain:
virsh destory <domain name>
Gracefully shutdown a domain:
virsh shutdown <domain name>
or virsh destory <domain name> --graceful
Get domain information:
virsh dominfo <domain name>
Connect to the domain’s guest console:
virsh console <domain name>
Remove a domain:
virsh undefine <domain name> --remove-all-storage
virsh undefine <domain name> --remove-all-storage --nvram
(error: Requested operation is not valid: cannot undefine domain with nvram)