Installation on Synology Virtual Machine Managager

It’s me again with the EFI boot issues. It is really getting strange now:

Today I had the time to do a full re-install of just everything. I uninstalled VMM and all VMs, and deleted the cluster as well.

And hey, I could import ova 13, launch it, and after 15 minutes or so home assistant was up and running :muscle:.

Before configuring HA in detail, I wanted to make sure that the VM with HA will start up properly next time.

(1) I hit connect to observe what will happen
(2) I chose “Restart” instead of “Shutdown”
(3) I did add Guest Agent, but only after powering on VM HA (maybe this is the issue?)

In the “Connect” tab of the browser, I saw the shutdown signal being processed (nice shutdown messages in the console) and I was confident that the shutdown will be successful. It was indeed but afterwards the restart itself ends in the same hiccup as reported earlier (same stage of EFI boot loader, MBR cannot be read …, see Installation on Synology Virtual Machine Managager - #168 by gjesch)

Has anybody an explanation for this?

  • I can get the HA VM work one time during initial setup
  • It will never boot a second time
  • When restarting the VM, I did not use “Force Shutdown”, all seemed to work like an orderly shutdown (also without Guest Agent).

If I remember correctly, @BeardedConti had to work without the Guest Agent in the beginning too?

I used original image for video recording, but for my main setup, I used image that’s linked in first post - that one has already agent installed from fredrick. Now it’s upgraded to latest available version and agent is still there.
Installing agent in HA OVA acn be a bit difficult as it requires you to install some stuff using CLI. That can be done, but I didn’t do it myself.

The problem is not that the guest tool is not running (as it actually is running). The problem is that Synology’s VMM can’t find the guest tool with the machine type defined in the official OVA.

I’ve changed the machine type in “my” OVA, and the discussion is here: Update ovf:id to get Synology VMM detect Guest Agent by fredrike · Pull Request #1233 · home-assistant/operating-system · GitHub

1 Like

So let me ask you and @BeardedConti this directly (it may be a pretty stupid question, I have really no expertise in all this):

If (a) VMM cannot find the Guest Agent, I cannot (b) shutdown the HA VM properly, which will (c) lead to break the VM?

The strange thing is that after installing HA the first time with ova, it was version 5.12 (5 weeks ago, no guest agent installed). Updating my VMM 4 weeks ago forced me to shutdown this ova 12 based HA the first time and it didn’t reboot after this action. Then I tried “your” 5.11 (start of this thread) and also the new 5.13, both of them were not able to boot.

Yesterday I deleted the VMM cluster, re-installed VMM and imported successfully the same (!) ova 5.13. But first restart - bummer! Synology notifying me again about Guest Agent not being installed - well it was installed, but VMM couldn’t see (?) it, although it was version 5.13.

Is the Guest Agent my main problem? Which topic should I dive into to make it finally work in a stable manner?

Thanks for all your patience.

In the last hour, I repeated all the de-installation steps of yesterday, and reinstalled all from scratch, like yesterday, but this time with Frederik’s ova 5.11. Doesn’t boot after power-on, neither does a second attempt with 5.13. Why did it work yesterday with 5.13?

This is so frustrating; I want to start exploring/using HA but instead I am completely stuck with Synology :face_with_raised_eyebrow:. It was so promising at the beginning, my 218+ is running anyhow, it is faster than a Raspi…

Correct!

If it can’t boot it is due to to wrong bios. You must choose UEFI bios.

It is just the linked 5.11 OVA at the first post that have the Synology fix for Guest Addon, so you can try with whatever OVA you find but I only think it is “mine” that really works.

I’m not sure, what is your problem?

Are you really following my steps with “Autostart → Yes, BIOS → UEFI & Virtual USB Controller to USB 3.0” (second to last picture in post #1)?

Hi @fredrike ,

Many thanks for your detailed reply.

This is a bit embarrassing for me. I really thought I had used your ova patch. I had a copy of the 5.11 which I even renamed after you. But apparently I got a wrong copy (don’t know where after 4 weeks, the import proposed the VM name “ha-test”). Now I downloaded afresh the patch from your dropbox.

And :partying_face::

  • It boots
  • The IP is displayed in the VM list
  • I can shutdown it
  • I can reboot
  • … 10 minutes later HA is running

Now some more facts (about me having no clue):

  • I always chose UEFI, USB 3.0 etc. The only difference was Autostart not turned on?
  • What made no sense to me, and why I was so lost: re-importing any ova 5.11/12/13 (OK, not yours) sometimes worked (a single initial startup, then it broke because of the shutdown), but most of the time a fresh install with the same ova files got already stuck at boot time, see Installation on Synology Virtual Machine Managager - #168 by gjesch. With the exact same boot messages of a broken VM after shutdown.
  • As a result, I began to act completely frantic and confused.
  • I do not understand too much about VMM and Guest Tools etc. (probably nothing), that’s why I thought adding “Synology_VMM_Guest_Tool_1.5.3-0015” to the ISO section of the VMM would help to solve this part.
    …I stop it here

I can hardly express how grateful I am for your support!
Now I can finally start to learn HA.

2 Likes

Has anyone some hint how I can make my SSH conenction from DSM to HA VM work, please? (referring to my above post around 11 days ago…)
Or any other ideas how to share some SSL cert. between DSM and HA VM?
How do you handle the secured connection topic in your environments?

Many thanks.

I’ve decided on this setup to avoid SSL completely. I would have preferred full SSL traffic inside my home network, but there were just too many issues with GET/POST and things like that, so - no SSL in VM.

And yes, my HA is available through SSL only on the other hand since I use Synology’s Reverse proxy for that - on the outside, I’ve published it on something like https://fake.mydomain.com, and this get redirected to http://IP_ADDRESS:8123.
This did require me to fix some of the integratins that expected HA on different domain and port, but that took no time to fix.
And yes, this also works internally too - because of NAT loopback.

How do you use addons that require SSL then?

It looks ok. There is not many clues on your terminal, and in the sshd (that is on ha side) the message:

Postponed publickey for admin from 192.168.178.74 port 58386 ssh2 [preauth]
Connection closed by authenticating user admin 192.168.178.74 port 58386 [preauth]

Is new to me.

I did try it myself and this works fine (iotop is a folder in my home directory):

fer@SynHome:~$ scp -r -P 22 iotop [email protected]:/ssl/
post-update.sample                                                            100%  189    18.6KB/s   00:00    
prepare-commit-msg.sample                                                     100% 1492   553.4KB/s   00:00    
pre-rebase.sample                                                             100% 4898   107.9KB/s   00:00    
pre-push.sample                                                               100% 1348   609.8KB/s   00:00  

Also, to test the connection:

fer@SynHome:~$ ssh [email protected]

| |  | |                          /\           (_)   | |            | |  
| |__| | ___  _ __ ___   ___     /  \   ___ ___ _ ___| |_ __ _ _ __ | |_ 
|  __  |/ _ \| '_ \ _ \ / _ \   / /\ \ / __/ __| / __| __/ _\ | '_ \| __|
| |  | | (_) | | | | | |  __/  / ____ \\__ \__ \ \__ \ || (_| | | | | |_ 
|_|  |_|\___/|_| |_| |_|\___| /_/    \_\___/___/_|___/\__\__,_|_| |_|\__|

Welcome to the Home Assistant command line.

System information
  IPv4 addresses for enp0s3: 192.168.1.5/24
  IPv6 addresses for enp0s3: fe80::df13:b323:208a:5be5/64

  OS Version:               Home Assistant OS 5.13
  Home Assistant Core:      2021.4.6

  Home Assistant URL:       http://hassio.local:8123
  Observer URL:             http://hassio.local:4357
➜  ~ 

Perhaps you could test with:

scp -r -P 22 -v /volume1/SSL [email protected]:/ssl/

Thanks for the hint with a verbose output… I think this gives the insight why it’s not working. It’s because of too “weak” permission rights that are set to 0777 for some reason for the files incl. id_rsa.pub
To be honest, I’ve no clue to which permission level those shall be set instead.
Furhermore I did not set them to 0777.

chmod 600 ~admin/.ssh/*

I think we’re coming closer, but still not successful… :slight_smile:

What add-ons for ex.?

Question - If I have already been running Home Assistant OS on my Synology without guest tools support, what would be the best way to upgrade it to detect the guest tools without having to reinstall Home Assistant from scratch?

Update: Seems if I shutdown and restart via VMM it now detects it… weird.

The Virtual Machine pane of the Virtual Machine Manager doesn’t display the IP address of the VM. Is there a way to get this to work without logging into my router and getting the IP there? I also am not sure what the Guest Tools do and if I should install it somehow.

You should use the OVA I’ve created to get guest tools to show up.

Dear Fredrike,
I’ve been using Home Assistant on Synology on VMM since before your patched ova.
I see two options for existing users of this approach:

1: Wait until 5.13 will be released: will the guest agent ‘automagically’ start working, or should I do a fresh install at that moment?

2: Use your OVA (in the first post in this thread). As I understand it this means backing up my home assistant, doing a fresh install using your OVA. Upgrading that to the latest version of Home Assistant (I imagine that there could be problems if I skip this step). Then restoring my backup into this fresh install. Is that correct?

@fitim did you happen to contact Synology about this issue?

:clap:

I don’t think upgrading to 6.0-RC2 (which is the first version with my patch) will cut it, as it is an OVA issue not a filesystem issue.
The only solution for you is to backup (create a snapshot), start a new VM with haos_ova-6.0.rc2.ova and restore your snapshot. Hopefully everything should work from there.

1 Like