At the beginning of this year I wrote a small guide on how to “Install Synology DSM in a ESXi 5.x virtual machine“. Now that XPEnology has been updated to support version 5.2 of DSM, I though it was a good idea to update my previous post.



In this update I’m assuming that you have a working virtual environment running such as ESXI and knows how to configure a new machine.

Please note that I cannot be held responsible for any damage or loss of data this procedure may cause.

Backup

The most important part of the upgrade procedure is to take proper backup. Please note that upgrading to Synology DSM 5.2 will reset all the settings in DSM such as user accounts and network configuration. In order to avoid a lot of unnecessary work you should follow this checklist:

Create a backup of DSM Settings

Login to your DiskStation and go to Control Panel->Update & Restore->Configuration Backup.

Click “Backup Configuration” to save a .dss file somewhere safe. Download a copy of @appstore

If you are on Windows, I suggest to use WinSCP for the next task. First of all make sure that “Enable SSH Service” is enabled in Control Panel->Terminal & SNMP. Start WinSCP and change the file protocol to SCP. Next enter the IP-address of your DiskStation and login as root with your admin-password. Once logged in, navigate to /volume1 and download the folder @appstore. This folder contains all data related to your addon and will save your life in case the upgrade procedure kills a package. Backup your personal data

While I had no issues upgrading, I highly recommend that you make a proper backup of all your personal data stored on you raid.

The upgrade will not delete any data unless you tell it to, but I used CrashPlan myself as a disaster recovery plan and you should consider something similar as well.

Preparing the new boot image

Time to take preparing for the install or upgrade. Download the latest boot image and be sure to download the IMG format as we will have to modify it. The reason for this is that we want to associate a valid MAC/Serial pair to our virtual DiskStation in order to be able to use services requiring communication with myds.synology.com (such as Synology DNS).

Modify the boot image

First download OSFmount, launch it and mount the downloaded IMG file using “Mount new…”. Make sure that “Read-only drive” is unchecked, select the image and click “OK”. A popup should appear asking you to select a partition in the image. Select Partition 0 – 16.0MB… as this contains the file defining the boot parameters. Open the new drive that just appeared and open the file syslinux.cfg in Notepad++ or similar.

In order to calculate a valid serial number and mac address, just open the following Excel spreadsheet and make a note of the serial number and MAC-address it generated. Now go back to syslinux.cfg and add sn=SERIAL_NUMBER mac1=MAC_ADDRESS after every instance of syno_hw_version=DS3615xs . For example if your serial number would be A8LWN04562 and your MAC 00-11-32-CF-A4-13, use the following: sn=A8LWN04562 mac1=001132CFA413 . This is what your syslinux.cfg should look like.

I also recommend to add rmmod=ata_piix to the list of parameters. This will disable IDE devices and prevent the boot image from taking up one HDD slot in DSM. Once syslinux.cfg has been updated you may close all open files and dismount the image using OSFMount.

Converting the boot image

Next up is to convert the boot image from .img to .vmdk so ESXI is able to boot from it. The easiest way to do that is by downloading StarWind V2V Converter. This awesome tool is really simple. Select your .img file and be sure to select “VMware pre-allocated image” as image format. Click next and choose “IDE” as virtual disk type. You should now have two .vmdk files.

Configure your VM to use the new boot image

Now all the fun starts! If you are installing from scratch, I recommend you to create a new VM using this guide, but if you already have a XPEnology VM running, you can safely upgrade it. First step would be to turn off your DiskStation the proper way (using the web UI). In the mean time you may upload both .vmdk files previously generated to your datastore. Please note that after uploading these two files will merge into one file. Now that your VM is off, go ahead and edit its settings. Upgrading the boot image is as easy as removing your current one and replacing it with the new. I also recommend to update the MAC-address of your VM to match the MAC used in syslinux.cfg. After replacing the boot image, close the settings page and prepare for the next section!

Upgrading or installing DSM 5.2

It’s time to booth the server with the new boot image. I recommend to open the console in ESXI first and boot the VM from here. The reason for that is that the boot image will boot XPEnology 5.2 by default, but this first time is different… we have to upgrade to it first. Once you see the blue boot menu hit the arrow down key twice in order to select “XPEnology DSM 5.2-5565 Install/Upgrade” (or similar, don’t mind the image).

Open Synology Assistant or use find.synology.com in order to find your DiskStation. Connect to your DiskStation and select “Migration” as installation type. When prompted to download DSM, select manual install and download the correct version of Synolgy DSM from here. Download the main PAT file for now since the Update-X packages are not supported at this point. Continue to follow the on-screen instructions until your DiskStation reboots.

Restore settings

Almost done! Since upgrading resets all of your DSM settings and we’ve changed the MAC address of the VM, your DiskStation will now have a different IP-address as it used to have. Open Synology Assistant once more in order to find your DiskStation and you should be able to connect to it using the web ui. First off you should go back into Control Panel->Update & Restore->Configuration Backup and restore the previously download backup .dss file. Choose to restore all settings, overwriting conflicting settings and most of your settings should be restored. LAN-settings may not be restored, but have to be changed manually using the control panel. The next step would be to verify installed packages (if any). In case some are removed or not working you can simply copy back the backup from your local @appstore folder to /volume1/@appstore after re-enabling the missing packages.

Optional: Is it safe to update DSM?

Well… that depends on the update and what got changed. Small updates tend to be working without any issues, while larger revisions require a new boot image. Whenever a new update is released, you should head over to the XPEnology’s forum and see if others have confirmed that the update is indeed working without a new boot image.

You should now have XPEnology 5.2 running and working! Congratulations!

If that’s not the case or you have any suggestions or questions, please leave a comment. If this guide helped you out, please subscribe by liking my blog on Facebook.