[Guide] Home Assistant on Apple Silicon Mac using HA OS AArch64 Image

You can also resize the virtual disk directly in the UTM disk settings after you imported the .qcow2 file.

Yes, that’s added in a later release, which wasn’t available at the time of writing. Tks!

2 Likes

I think one super minor step is missing, you select “virtualize” and not “emulate” at the beginning :wink: :+1:

Thanks a lot for the guide, helps a lot for beginners! Was searching for M1 macOS guides, it took way too long until I found this one!

I got 2 issues.

Part 1: QEMU

On boot, I got this error here:
image

Then I checked the official guide again and there it said

  • https:// home-assistant . io / installation / macos
  1. Click “Add Hardware” (bottom left), and select “Channel”
  2. Select device type: “unix”
  3. Select name: “org.qemu.guest_agent.0”
  4. Finally select “Begin Installation” (upper left corner)

But did not figure out how to do that on UTM instead of virt-manager until I found this:

So I added this to the Qemu-settings:

-chardev socket,port=4321,host=127.0.0.1,server,nowait,id=qga0
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0

Part 2: Wifi

I thought that did it, but on the next boot 2 more errors appeared:

[FAILED] Failed to start Network Manager Wait Online.
See 'systemctI status NetworkManager-wait-online.service' for details.

So I switched the network from bridged to shared. Will this be a issue? Is it really necessary to have it bridged?

MacOS is connected over Wi-Fi only, which is probably the issue: Network | UTM Documentation

Bridged Interface

Only applicable for “bridged” network mode. Note that bridging with an Wifi interface may require additional configuration.

If so, I need to find the necessary “additional configuration” :smiley:

Many thanks for this guide, have got it setup and imported my rpi4 backup config in under 15mins.

Has anyone tried a USB bluetooth dongle with this setup?

2 Likes

are you on macos with apple silicon? did it work for you in bridged mode? I got errors :frowning:

Yes M1 MacBook Air in bridged mode.
I’ve got a usb-c ethernet adaptor and for me I needed to add en6 to UTM network settings. ( I’ve turn off wifi)

To find which device yours is, open terminal on macOS, run ifconfig then look for your ip address and the en? device will be listed just above it.

I’m not having any joy with bluetooth with HASSOS in UTM.

I’ve added a sabrent USB BT4 dongle and enabled it for UTM but despite the device being seen in HA, it can’t see any BT devices.

This procedure works for Ventura / m1 apple silicon. Thank you for putting this together!

UTM 4.1.5 (74)

Home Assistant 2023.1.5
Supervisor 2022.12.1
Operating System 10.0.dev20230116
Frontend 20230110.0 - latest

great documentation by @edwinwang , thanks for spending time and effort on such thorough guide. I followed a slightly different guide by Siytek, also very good and thorough.

I managed to get HA working in supervised mode on my M1 Mac Mini. I had to apply a few modifications along the way. I also restored from the full back up tar file from my Debian box that I redepoy to run other applications.

The only thing I cannot get it to work is the Sonoff USB dongles Plus (E). I tried plug and play, did not work. I even turned on USB sharing from host. I installed the driver but somehow it was blocked by Ventura. I looked through the Mac settings (aka preference) screen and I cannot find where the driver file was blocked. As usual on Mac Ventura, once it is blocked not matter how many times to re-install the driver, it would not be unblock

Just wondering anyone using UTM on Apple Silicon Mac has this experience and more importantly the solution. For now, all my Zigbee devices are offline :unamused:

Hi I am brand new to HomeAssistant and still wrapping my head around the nuances of OS vs Container vs Core vs Supervised.

I have worked a little with linux, VMs, and a lot of command line stuff within MacOS - but sometimes I know enough to get myself very lost rather than enough to solve my own problems. :smiley:

I was hoping to run in a VM on my M1 Mac rather than get a separate machine, if possible.

I am confused that when I install following this method, on the screen in the virtual machine it says

OS Version: Home Assistant OS 9.4
Home Assistant Core: 2023.1.6

Which led me to believe this is a full Home Assistant OS running in VM, and I should be able to get add ons, but I do not see any way to add add-ons, only integrations.

Specifically I am trying to add this Adaptive Lighting add-on, which wants me to add HACS, but none of the directions I have found work.

The prompt I have within the VM is a “ha >” prompt not a normal linux prompt.

Are there simply some additional steps I need to perform to get these parts running, or have I started down a path with a dead end in terms of add-ons?

just an update. I unplugged the Zonoff USB dongle, then plug in again. I now able to see a pop up window on the UTM terminal and ask me to agree to connect one time or permanent.

I saw no change. After a day or so, I had to restart the UTM session after the HA core update. After that, I found all Zigbee related working again.

So I am happy now

Ok, and this is what fuzzygel said just above me, this thread you end up with “Core” only and not supervisor…so need to follow this other method.

Any chance you got the connection over wifi working? I’m in the same boat at the moment.

Thanks. Getting HA working was easy.

I am unable to get skyconnet working. Any of you have a guide for that?

Thanks.

I am ending with full supported supervisor HA

Thanks for sharing! :slight_smile:

Just note that this tutorial will walk you through installing Debian, but you can also use the Home Assistant OS image (it will also give you Supervised HA).

When you create a new machine, delete the default disk and add a new VirtIO drive, attaching the generic-aarch64 image:

You also need to to make sure UEFI boot is enabled, on the QEMU menu:

just an update. I unplugged the Zonoff USB dongle, then plug in again. I now able to see a pop up window on the UTM terminal and ask me to agree to connect one time or permanent.

Don’t forget that the HA VM Windows must be in focus when you plug in your USB devices. By that I mean you have to click the VM window first, before plugging your USB devices into your Mac. It’s an easy mistake to make, but if the Window is not in focus, UTM will not ask you if you want to attach the device to the VM (it caught me out before!)

The only thing I cannot get it to work is the Sonoff USB dongles Plus (E). I tried plug and play, did not work. I even turned on USB sharing from host. I installed the driver but somehow it was blocked by Ventura.

The Sonoff Zigbee sticks are just a USB-to-serial device and they use class compliant drivers, which are already built into macOS. You should not need to install any additional drivers for it to work on Mac, including the HA VM.

Here is how you can test it:

  1. With the Zigbee stick disconnected, open a Terminal
  2. Enter the command ls /dev/cu*
  3. Note the devices returned (there may be none)
  4. Connect the Zigbee stick to a USB port
  5. Enter the command ls /dev/cu*
  6. You should now see an additional USB Serial device, which is your Zigbee stick

The presence of this USB serial device means your Zigbee stick is connected ok. Now unplug the Zigbee stick, bring your UTM HA VM window into focus (just click it somewhere) and reconnect the Zigbee stick. UTM should ask if you want to connect to the VM. Confirm when prompted and you should be good to go.

For anyone wishing to skip this entire process and just have HA working in a few clicks, I have a pre-installed HA for Mac, for the price of just a couple of beers :beer: :grinning_face_with_smiling_eyes: Home Assistant Supervised For macOS (Easy Installation) – Siytek Shop. I actively provide full priority support and I am also happy to answer your generic HA queries too :slight_smile:

1 Like

How do I upgrade the image to the latest version of core? I can’t upgrade from within home assistant. I’ve tried searching but can’t find any info. Thanks

This is great thank you, but what happens if you have to remotely restart the Mac or the VM?
Zwave will be offline until you can physically unplug and plug it back in right?

True, I am not entirely sure about this, i’ll test it out later. I had a quick look on the UTM support page and couldn’t see any way to attach USB devices with command line arguments or similar, which would have meant that reconnecting devices could have been achieved with a script or using Automator etc.

However I am currently working on something that might be of interest, which will remove the need for UTM entirely and solve this problem with USB devices. It’s still work in progress, but a beta version should be ready pretty soon…

1 Like