Month: November 2018

  • Can’t install/uninstall/repair Synology Virtual Machine Manager – Upgrade DSM not possible

    I was unable to upgrade my DSM from 6.1.7 to 6.2.1 because it was pretending to be member of a Virtual Machine Manager cluster. Which was not correct as Virtual Machine Manager was not installed ‘anymore’.

    Click to Read More

    I used to test the beta version of Virtual Machine Manager a long time ago. But since a while, Virtual Machine Manager is not installed anymore on my Synology and it was clearly visible neither in the DSM menu nor in the Package Center.

    Unfortunately, for some unknown reasons, my DSM thought that it was still part of Virtual Machine Manager cluster. As a consequence I was getting the following warning when upgrading my DSM: “This device is part of a Virtual Machine Manager cluster. Other hosts in the Virtual Machine Manager cluster will also need to be updated“.

    Trying to upgrade was always failing (without breaking my DSM, fortunately).

    I initially thought it could possibly be due to the network Bond I did create. So I tried to remove it via Control Panel > Network. But it failed with the message : “Creating or deleting this bond is prohibited because the operating interfaces includes the cluster interface of Virtualization. Please shutdown these quests and try again: {0}. Creating or deleting the bond is prohibited because of abnormal status of Virtualization cluster, please go to Virtual Machine Manager see the details.”

    Based on this message, and since it was not installed anymore, I tried to reinstall the Virtual Machine Manager. Unfortunately, the installation was failing and the package was stuck in a “repair” status.

    Being unable to ‘repair’ it by clicking on the “Repair” button, I tried to uninstall it. This was also failing, with the following message: “You cannot remove this package because this Synology NAS is a part of a Virtual Machine Manager Cluster. Please remove the host from the cluster to proceed.”

    Argh !!!

    Bref… I tried to ‘erase’ the package using my own Package Manager (See my SSPK server). It’s doing something similar to the trick explained here to delete all files related to the ‘Virtualization’ package.

    Once the package fully erased, I did reinstall it again but still without any success… And again it was stuck in a “repair” status and I was unable to uninstall it properly.


    As I couldn’t find any config file where I could see that my NAS was a member of a Virtual Machine Manager cluster, I tried to fix myself the installation of the package. I couldn’t really fix it (I couldn’t see which step of which installation or upgrade script was failing). But I have been able to force the installation to complete by deleting the file ‘/var/packages/Virtualization/installing’.

    Next, the package Virtual Machine Manager appeared in status ‘Installed’ but ‘stopped’. I was however able to “Start” it without any problem !! I could see in this Manager that my NAS indeed used to be configured as a member of cluster.

    And, miracle (even without deleting the cluster), running now the upgrade of my DSM finally succeeded !!!

    After the upgrade, I did remove my NAS from the cluster.

    Et voilà.

    [PS] I did use the Virtual Machine Manager a long time ago to test how Windows was running in a VM. It was a bit too slow for me so I did remove the Virtual Machine Manager. Probably that the cluster was not deleted at that time. Hence all the problems here above.

    [Edit] Once the DSM upgraded, I did delete the Virtual Machine Manager cluster. But as a consequence, I did lost all connections onto the NAS (ftp, web, plex, ssh, …). I was only able to see the NAS using the Synology Assistant. TO solve the problem I did shutdown the NAS by pressing the power button for a long period. After the reboot, everything as working fine. No, starting the Virtual Machine Manager, it starts a wizard to create a new cluster.


  • Search for file on Linux using grep and find

    Search for files containing a certain text, on my Synology, ignoring warnings like ‘ Permission denied’

    Click to Read More

    Just a note for myself… as I always forgot the syntax :/

    Using grep only

    grep -rnlw ‘/path/to/somewhere/’ -e ‘pattern’ 2>/dev/null

    grep -rnlw ‘text’ ‘/path/to/somewhere/’ 2>/dev/null

    • -r or -R is recursive,
    • -n is line number, and
    • -w stands for match the whole word.
    • -l (lower-case L) can be added to just give the file name of matching files.

    Using find

    find ‘/path/to/somewhere/’ -type f -exec grep “text” ‘{}’ \; -print


  • Find and kill all tasks running for a service/package on a Synology

    I wanted to kill all tasks running on my Synology for a package before uninstalling this one. Here is the how-to:

    Click to Read More

    The tasks running for a service are all listed in /sys/fs/cgroup/cpuacct/[the service]/tasks

    The service can be pgsql, nginx, nmbd, ftpd, sshd, … or synotifyd, synologd, synobackupd, … or a package like pkgctl-CloudSync, pkgctl-AudioStation, pkgctl-SurveilanceStation, …


    • To see all tasks running for Synology’s StorageAnalyzer, type something like: cat /sys/fs/cgroup/cpuacct/pkgctl-StorageAnalyzer/tasks
    • To kill all those tasks, type something like: for task in $(cat /sys/fs/cgroup/cpuacct/pkgctl-StorageAnalyzer/tasks); do kill $task; done