Installation on Synology Virtual Machine Managager

I went the SSH way as enabling NFS on Synology is not considered very secure (as I read somewhere). I managed to create a scheduled task on Synology that regularly copies updated Synology fullchain.pem and privkey.pem to HA SSL folder. So far so good. The only thing that I can’t figure out is how to remotely restart HA core after the cert is updated. I tried:

ssh user@ha_ip "ha core restart"

but that returns

Unexpected server response. Status code: 401

In supervisor log there is

WARNING (MainThread) [supervisor.api.security] No API token provided for /core/restart

Is there any way how can I restart HA core via SSH from DSM? Or does it even needs to be restarted in order to load new cert files?

What exact modules you are running on 918+? I used some about a year ago and the NAS was not stable. 4GB is not enough for this setup I am currently preparing.

It looks that everybody does not have any troubles, unfortunately I am stuck just at the beginning

Scroll back to the posts on 21-2, you will see this exact error mentioned.

HyperX Impact 16GB (Kit 2x8GB) 1866MHz DDR3L CL11 SODIMM 1.35V

Works perfect without any issues.

Worked like a charm and the NAS has been running for several days without any issues. The VM does increase disk usage though, creating small activity every few seconds. Maybe I’ll add an SSD in one of the bays and move it there…

My synology freezed after one year being up. I dont believe it’s even possible, but it seems that vmm let me alocate more memory over the minimum the nas needed. I am not sure whether having HA, which tends to be hungry for resources, on nas is a good idea. Tell me I am wrong and I will give it another shot

How much RAM does your Syno have and how much of it did you give to VM?

DS918+ with 4GB and I gave 1,5GB to the VM. Original mem as those I bought year ago made the NAS unstable.

I would expect VMM would not let me to allocate too much to freeze the NAS. Or am I wrong?

DS220+ 18GB (i know CPU has official 8 GB limit) and i made more tests and now i am use for VMM 1 CPU and 3GB RAM (HA use 9 addon packages and 2 in docker )

Hi, I also installed HA in Synology VMM and everything is fine, but I have a strange loop in the supervisor log:

21-03-08 08:12:14 INFO (MainThread) [supervisor.plugins.audio] Starting Audio plugin
21-03-08 08:12:14 INFO (SyncWorker_2) [supervisor.docker.interface] Cleaning hassio_audio application
21-03-08 08:12:15 INFO (SyncWorker_2) [supervisor.docker.audio] Starting Audio homeassistant/amd64-hassio-audio with version 2021.02.1 - 172.30.32.4
21-03-08 08:13:15 WARNING (MainThread) [supervisor.misc.tasks] Watchdog found a problem with PulseAudio plugin!
21-03-08 08:13:15 INFO (MainThread) [supervisor.plugins.audio] Starting Audio plugin
21-03-08 08:13:15 INFO (SyncWorker_3) [supervisor.docker.interface] Cleaning hassio_audio application
21-03-08 08:13:16 INFO (SyncWorker_3) [supervisor.docker.audio] Starting Audio homeassistant/amd64-hassio-audio with version 2021.02.1 - 172.30.32.4
21-03-08 08:14:16 WARNING (MainThread) [supervisor.misc.tasks] Watchdog found a problem with PulseAudio plugin!

Anyone here with the same loop? Can the pulse audio be disabled? Or at least stop the endless start-crash loop?

Also a few recomendations of what i have optimized (I have DS620slim):

  • I have allocated 2 GB of RAM and 1 CPU (with 2 cpus it made my host to crash a couple of times, and with 1 the performance is fine)
  • As I have 6 bays, I have 4 with HDDs for data and 2 SSDs for working apps libraries (Plex, Moments, etc…). Adding this 2 SSDs (in SHR or RAID1) and moving the VMM storage to the SSDs was a huge improvement in performance.
  • I also installed Maria-DB in Synology and connected HA to Maria-DB instead of using the internal DB also helped to feel everything faster.

Hello @fredrike,
may I ask why I see “You are running an unsupported installation” also here with the VM environment?
My plan was to migrate from the Synology HA package based on Docker you created since it is no more supported.
Do we have the same issue he with VMM? Thanks!

I’ve had his package in docker, it was unsupported, too. From my understanding the main problem is that Synology doesn’t update it’s docker addon, while old one is not good for newest HA anymore.
I transferred all into VM in Synology and all is fine, running and supported. Just do according to first post in this thread. Of course you need btrfs partition…

@gerosaf

i also came from docker to vmm. (DS918 4 GB with update to 8 GB) With the instruction in this post it is very easy. Important is to save your snapshot from docker-hassio. It is necessary to restore your system in vmm. Be patient when you install the ova-file. It last a time, please wait. When it is installed, the speed of updating the system, backup and restore is much better. It runs perfect.

Hi @peerkn,
Thanks for the suggestions. I have done many snapshot but unfortunately I don’t know how to download them since the HACS and Supervisor are no more working. Can you suggest me where to find snapshot and how to restore into the new VM HA environment? Thanks

@gerosaf
you find your snapshots in the homeassistant-folder on your synology. You have to search through this folder. If you find the folder copy it to your PC.
To restore it i described it here:
Installation on Synology Virtual Machine Managager.
To upload the snapshot go to supervisor -> snapshot then click the three dots in the upper right edge and choose upload.

1 Like

If you were running HA on Docker then you have a “homeassistant” folder, which is accessed through file station in Synology.There’s subfolder “backup”, too and in there are compressed backups. But i advice you to copy whole “homeassistant” folder (or whole Docker folder, wherever your files are stored). In that folder you’ll find your *.yaml files, too.
If you don’t have latest snapshot then it’s even more essential to copy your HA folder, because you can “kinda” restore from that, too: after new installation you just overwrite configuration.yaml, sensor.yaml, automation.yaml… with your saved ones and restart - after that only thing you would have to do is set visibility of each lovelace panel again.

1 Like

@Protoncek, @peerkn,

thanks a lot I was able to migrate my complete environment.
I just miss the path to access my particulate sensor using a serial-to-USB dongle (HL-340). Where I find how it is exposed after having mounted it in VMM?
Cheers

@gerosaf
go on you disktstation. Shut down your vmm. After shutting down goto action (middle tab). Take edit. Go to others, then to usb-device to the + (for to add) and search yor device. I hope your virtual usb-device is set on usb 3.0. Click ok and restart your vmm.

I have already done that for my USB devices and they appear as mounted.

I have now to change this sensor configuration:

  • platform: serial_pm
    serial_device: /dev/serial/by-id/usb-1a86_USB2.0-Serial_ffffffd8ffffffb9ffffffd0ffffffa2-if00-port0

with the new path which I don’t know which one it is in the HA VM.

BTW, the “/serial/by-id” path disappeared after installing VMM.

Thanks again