Installation on Synology Virtual Machine Managager

Tags: #<Tag:0x00007f32666d3d38> #<Tag:0x00007f32666d3c70>

Here are a quick guide to get Home Assistant OS running in Synology VMM.

  1. Install Synology VMM (only supported on some models but I managed to get it to run on my DS716+II by downloading directly from Synology dsm6, dsm7)
  2. Download the Home Assistan OS .ova image from here: https://www.dropbox.com/s/1ev7g9xhck5bhw5/hassos_ova-5.11_syn-patch.ova?dl=1 (it is patched according to this discussion)
  3. Start up VMM and create a Storage pool.
  4. Create a network interface (Choose Type External and select the primary Network Interface).
  5. Click on Virtual Machine -> Create -> Import
  6. Here you select Import from OVA files and select the downloaded OVA file from above


    Adjust CPU and memory according to how much you can spare.


    Choose the network interface you created before.

    Change Autostart -> Yes, BIOS -> UEFI & Virtual USB Controller to USB 3.0

    Assign some users (Synology users that are allowed to start/stop the VM).

    Press Next, Apply and Start the Virtual Machine.
  7. Follow the on-boarding on https://www.home-assistant.io/installation/alternative#start-up-your-virtual-machine
  8. Buy me a :beer:.

Updates:

2021-02-26, the patch for official support have been merged, hopefully the 5.13 version of Homeassistant OS will have direct support.

13 Likes

Thanks for yet another great tutorial!

I would love to go the VM way, but sadly enough Synology only allows VMM to work with btrfs volumes and my DS920+ has one big ext4 volume. To use the VM I would have to backup the whole ext4 volume, delete, re-create a new btrfs volume and restore everything. Not something I am looking forward to, but I’m slowly starting to get used to the idea…

3 Likes

Just a quick note for those that already migrated to DSM7 and package from step 1 can’t be installed because it’s running service as root.
You have to download VMM from the DSM7 download center.
It’s again package for DS220+ but I was able to install it on my DS216+ which is officially not supported probably due to just 1GB of RAM by default. But I upgraded mine to 8GB and see no reason not to use virtualization on it :wink:

1 Like

Did my guide work for you (the ova edition)?

Importing vm while typing these words… will let you know soon :wink:

1 Like

Import worked fine however I can’t connect to host:8123 after VM bootup from outside of Synology.
I’ve got impression it’s something with vSwitch.
Still investigating as this is my first time with vSwitch so takes so time :wink:

What does that mean?

VMM will show the assigned IP-addresses like this (the 172 addresses are for internal HA use and my instance is available on http://192.168.1.5:8123)

1 Like

Well it means it went fine :wink:
Simply no issues during import.

Isn’t guest agent needed for that functionality? I don’t have IP listed for running machine.
But I managed to get that IP from ha cli. Somehow I thought that with vSwitch HA will be available on the same address as host but it got different IP from DHCP.

Anyway I’m now able to connect to my fresh HA instance running on VM :wink:

No, the vSwitch creates a new network-card so your router can give it an address.

You should be-able to import a snapshot and just continue like nothing happened from the “fresh installation” (I did that from my hassio instance, now just trying to figure out if I dare to move my “production” HA to this VM too)

  1. So, no addresses shown in VMM (like my screenshot)?
  2. Did you use the ova file approach?
  3. Can you access the installation as http://homeassistant.local:8123?

Ad1) No. It doesn’t show IPs
image
But as you can see I also have no guest agent running. Did you install it somehow manually?
Ad2) Yeah it’s imported from ova.
Ad3) Yep it works this way.

1 Like

Ah it must have come with the .qcow2 file… Perhaps that is an better option than ova then.

Perhaps that’s why you mentioned in your tutorial to extract image first? :slight_smile:
ova is not compressed while qcow2 is xz compressed.

I’m downloading qcow2 and I will retry install to confirm.

Ok I did some tests. Using ova image is easier as it can be used in first step when creating VM but we’re loosing guest agent support this way.
Using qcow2 image needs extra steps as VMM doesn’t support them directly.
Image needs to be extracted first and added in image area of VMM.
It also means upload of 1.5G+ file instead of ~350MB but well… after installing from qcow2 it’s more functional than from ova.

1 Like

Also I can speak only about DSM7. Maybe on DSM6 it behaves differently.

It is possible to extract an ova image from the qcow2 installation. But, perhaps we should poke the hass-os guys to include guest-tools in the official ova build instead.

Yeah that would probably be the easiest way. Not sure why they didn’t include guest agent in these images.
But for now we shouldn’t probably ask people to use ova with Synology as it not only breaks reporting of IPs. It also means no possibility to shutdown / reboot VM without breaking stuff. VMM can’t shutdown VM cleanly without guest addon.

Been digging around the hass-os code and found this: https://github.com/home-assistant/operating-system/blob/1a6dcbbf5b7b06c11d1e444707609a189dec9bce/buildroot-external/board/intel/ova/hassos-hook.sh#L17

If that is the code that is used to build the ova it does not make sense that there is no guest addon in the ova image.

Installed on DS416Play. All Ok. OVA option boot properly but CPU usage is very high. All of time over 75-90%. Best settings for the VM is with 1 or 2 Cpu?

@frenck, do you know why the qmeu guest addon are starting from the qcow2 image but not from the official ova image? (I’ve built my own ova from the qcow2 image and as long as uefi is enabled the guest addon starts fine.)

Edit: nevermind, I think there is something in the ovf file that mess things up for Synology VMM… (Built an ova with the vmdk from the official one and that gets working guest addon).

I also have high CPU usage but only for first few minutes then it settles down and sticks closer to 8-15%.
I’m using two CPU setting.