Tag Archives: Synology

Some types of Synology are able to run VirtualBox as a hypervisor. With a hypervisor you are able to run a virtualized computer as if it was a physical computer. The Package Center resource http://spk.diablos-netzwerk.de offers a package for Synology DistStations with the following architecture: x86, cedarview, bromolow, evansport, avoton and braswell. If you want to know what architecture your DiskStation has, you can find it out here. Your DiskStation also has to have at least DSM version 5.2-5644. Finally you have to have your web services operational on your DiskStation. This post describes the steps I took to let VirtualBox run on my DiskStation.

Installation

If your DiskStation meets all the requirements mentioned above, you can add the address http://spk.diablos-netzwerk.de to the repositories of your Package Center. You also have to enable the option to see beta packages in your Package Center; the VirtualBox package is still beta. When you finished this VirtualBox will show up in the available packages list of your Package Center. Just click the install button of VirtualBox and complete the wizard. Make sure you select the option to always authenticate when you logon to the management interface phpvirtualbox. This will be published on your web server you might have made available to the internet. If you select not to authenticate everyone has access to your management console and your virtual machines(!). The installation takes a while. It probably downloads additional files. When the installation is done you have to install the VirtualBox Extension pack

VirtualBox Extension pack

The extension pack installs support for USB 2.0 and USB 3.0 devices, VirtualBox RDP and PXE boot for Intel cards. The extension pack has to have the same version number as VirtualBox. If you installed VirtualBox version 5.0.16 you have to download version 5.0.16 of the Extension pack. The version of your VirtualBox is shown in the package center of your DuskStation. In this post version 5.0.16 is used in the examples.

All downloads can be found at http://download.virtualbox.org/virtualbox/. As you can see this folder has a all the history of VirtualBox. Change to the directory of the required version to find the Extension pack of your version. You are now able to reconstruct the URL of the file you need. The following steps guides you to the installation procedure of the extension pack:

Stop all the running virtual machines in the management console of your VirtualBox installation.

Configuration

You have to accomplish a couple of configurations before you should start using VirtualBox. The following paragraphs will show you what to configure.

Change admin password

The management interface is a web interface that can be accessed on http://[ip address or host name of your diskstation]/phpmyadmin. If the installation was successful you have to authenticate here with the default username/password combination admin/admin. As you can see this is an obvious combination that can be guessed or be found by everyone. The least you have to do is to change this accounts password to a strong one. Even better is to create a new administrator account with another username and a strong password and delete the default ‘admin’ account. You also want to consider a regular non-admin account for daily use of the phpmyadmin.

Secure the web interface

The management web interface phpmyadmin is a regular page that can be accessed from everywhere on the world if you made your webserver public accessible. It’s highly unlikely you want everybody having access to your virtual machines, because they also might gain access to your data. To avoid that you have to restrict the access to the management web interface. The first step was forcing to logon every time you want to access the management web interface.

Unfortunately the logon page is accessed through an unsecured http-session. This implies that the username and password you provide in the logon page is send in plain text to the webserver. This is vulnerable to eavesdropping. You can try to force the logon page to a secure https-session, but in my case this leads to errors. This makes why you don’t want to have the management web console accessible from the internet at all.

To deny the access from the internet you can use a .htaccess file in the folder on your webserver that hosts the VirtualBox management console. To do this you have to find the location where the management console is stored and create a textfile in this folder named .htaccess. (Be aware of the leading period in the filename.) The example below is a network based restriction. This means that all hosts from the given network have access, all other will be denied. A host with the ip address 192.168.1.100 will have access to the web management console, 192.168.1.24 too but all others outside the 192.168.1 network haven’t. Put the following lines in the just created .htaccess file and save the file. (Don’t use Windows Notepad.)

order deny,allow
deny from all
allow from 192.168.1.0/24

Now the management console is not accessible from the internet anymore. (Unless you use a VPN.) Now you can start creating virtual machines in VirtualBox. Be aware that Virtual machines are memory and cpu power consuming. A DiskStation is not primary designed to act as a full blown server. Don’t expect miracles from it when it comes to performance.

Guests

This section is not about how to install a guest operating system in VirtualBox. There are plenty sites elsewhere that describes just that. Besides that it is quiet intuitive to install a guest operating system. This section has some paragraphs on how to install the VirtualBox Guest Additions with drivers and software to let the guest operating system optimal as a guest system in VirtualBox. The web management console is not as mature a the management console you have when you install VirtualBox on a Windows system. Below are the descriptions per operating system I used. All descriptions are based on the VirtualBox Guest Additions ISO-file that can be downloaded from the same location as you downloaded the Extension Pack described earlier in this post. (For the example version of this post the location will be http://download.virtualbox.org/virtualbox/5.0.16/VBoxGuestAdditions_5.0.16.iso. Make sure you use the version that fits with your VirtualBox installation and save it somewhere where you can find it back; you’ll need this for almost every new guest operating system you install.)

In all cases connect the ISO file as a DVD to the guest operating system you want to install the VirtualBox Guest Additions to through the web management console before you start.

After more than four years (24/7) of serving my storage needs in my DiskStation, two of my five disks are showing symptoms of being worn out. They started showing bad blocks and therefore became a risk to my precious data. The unit was still working OK and as long as that is the situation I should be able to replace them without data loss. I purchased two new NAS disks and started to replace the disks one by one. (It’s obvious that you have to create a backup of your data on another target than your DiskStation. RAID is not a backup.) You can not replace more disks at once as you have configured the amount of disks for redundancy purposes. Even if you have configured two disks for redundancy, it’s a good idea to replace the disks one by one: it protects your data during the repair of the stripe set.

It’s a little bit tricky to decide witch disk is being replaced first. I decided to start with the one that has the most bad blocks. (Crossing my fingers that not the other one decides to fail during the repair process…) I didn’t dare to replace the disk while the unit was running, so I brought it down and replaced the first disk. After the reboot the DiskStation started complaining (obvious) about a degraded RAID. It has to be repaired.

As you will find all over the internet, those repair actions can take hours or even days. As long as the repair isn’t finished, the data is vulnerable to disk failures. Even in a stripe set. So this situation has to exist as short as possible. After some digging in several forums I found a clue that helps to decrease the repair time of a stripe set:

Turn off file indexing on all shared folders.

It turns out that this increases the speed of repairing dramatically. The exact time of the repair is hard to predict. It depends on the hardware of the DiskStation, the size of the disk and the services running during the repair.

An other good idea is to stop all packages and services that are not really needed and can be missed for a couple of hours. Depending of the amount of disk interaction each package or services has, it can contribute to increase the repair speed when it’s not writing to disk. Candidates might be SymForm (or others), DownloadStation, CloudSync, PhotoStation, MediaServer and VideoStation. Don’t forget to turn them on again when as the repair is done.

On this website there are several descriptions of how to create a virtual Synology DiskStation in VirtualBox. For every new release of DSM there was a new description. The reason to create these descriptions was that there was very little information about how to do this and the information was hard to find. Since then there became more and more sites that specialized them self in just this subject.

There are a couple of sites I use myself to figure out what to do to create a virtual DiskStation for testing purposes:

The descriptions there are more or less like those posted here. Making those descriptions is a couple of hours work and doesn’t bring any extras anymore. That’s why I decided not to create any new descriptions when a new release of DSM occurs. Instead of that you can visit the sources I use mentioned above.

The old descriptions will stay online and can be used for referential purposes. Most of the time the way to virtualize a new DSM more or less the same method of the previous version of DSM is being used. Feel free to use them to help you getting the newest version of DSM working.

With the upcoming release of DSM 6 for Synology DiskStation it seems that you have to say goodbye to Zarafa on your Synology DiskStation. If you don’t own such a high-end DiskStation, you are screwed.

It’s a hard time to have Zarafa running on your DiskStation. It seems that the original developer (Julian Dohle) for the Zarafa packages has abandoned the project. There has been no development for over a year now and it is unlikely that there will be any development in the future. This will leave us with a Zarafa that is at least more than a year old and unmaintained. Despite the fact that Synology has offered you through the package center the installation of Zarafa, doesn’t mean they do the maintenance of it.

With the upcoming release of DSM 6 Zarafa has to be uninstalled from your DiskStation. (This is what the current beta releases shows at the moment.) There are several legitimate reasons for Synology to do so. It might have something to do with the fact that the project is abandoned and it might have something to do with the architecture of the new DiskStations. Synology introduces mailPLUS, mailPLUS server and mobile apps to offer a reliable e-mail solution.

The bad news is that mailPLUS server is (currently) only available for the following models:

Another drawback is the fact that mailPLUS isn’t an Exchange replacement like Zarafa is. Zarafa also lets you manage your contacts and calendar and offers through Z-push an ActiveSync connector to connect all your mobile devices to that support Microsoft Exchange. (Synology offers dedicated apps for the functionality of mailPLUS.) For the calendar and the contacts, I haven’t found any alternative at Synologys website. For this you have to use another third party tool that only will synchronize these items. Last, but not least, you have to migrate your users to the new solution(s).

That brings us to the fact that it’s about time to make some decisions if you host Zarafa yourself. It’s clear that using Zarafa on your Synology DiskStation is a ‘no-go’. The software becomes vulnerable and the newest DSM doesn’t support it any longer. If you haven’t an alternative and rely on Zarafa you shouldn’t update DSM to version 6 until you have migrated your Zarafa users to a new solution. You can consider using Zarafa hosted by a hosting provider. You can even consider to use a hosted Exchange hosting provider, but it’s likely that the Zarafa hosting provider is cheaper. You also can use mailPLUS offered by Synology, but you probably can’t do an inplace upgrade to migrate the users’ mailboxes.

So, self-hosting Zarafa administrators on Synology, there is some work to do!

The out of office function seems not to work on Zarafa installations on Synology. I’ve read multiple posts on several forums from people complaining that this was a fact. Guess what, mine didn’t work too.There is a solution that requires some modifications on the file system and a slight modification in a Zarafa file. You’ll need something like Putty. This is how I did it:

Find out if you have the tr command is available.Type the following command on the console in Putty:

type tr

If you get the reply tr is /usr/bin/tr then the tr command is available. If it doesn’t you have to install the text tools trough ipkg in the console: