Back in 2011, I ordered myself a Synology Disk Station DS410 4-bay NAS in order to have a centralized and private storage solution for my files. I have to admit, the user interface and support from Synology superseded everything else at that time. Even now, four years later, I get free updates that provide many new features like running your own “Dropbox” clone. However, while the software continues to evolve, the hardware in the device sadly does not.
A few years later I began to look at the opportunities to build a new server to be able to use virtualization without having to run this on my laptop. I jumped between using Ubuntu Server, Open Media Vault, FreeNAS and Windows Server, but was never particularly happy with the result.
After some back and forth, I found a forum that specializes in virtualizing Synology DSM, the operating system Synology uses. Some weeks later with careful testing, I was extremely pleased with the solution. At that time I used Hyper-V as my operating system, which turned out to not be as flexible as ESXi when it came to virtualizing Synology DSM. Did I mention that ESXi is free and easy to install as well? 🙂
Overview of steps:
In this guide I assume that you already have ESXi running. I’m not going to cover that part here, but let me know in the comment section if you need help with that.
While I use the video above and the written version as a foundation, I’ve made a few changes and additions on my install which I want to emphasize. Follow the steps 1-10 in order to define the basic VM configuration, but don’t create a new virtual disk and skip to step 14.
In case the guide above is changed, here is a summary of the steps you should do:
- Give the VM any name you want.
- Select where you want to store it, use SSD storage if available.
- Choose Virtual Machine Version 8.
- Choose Linux and then Other 2.6.x Linux (64-bits).
- Configure CPU/RAM according to what you have. I used 2 cores per virtual socket and 8GB of RAM, but 4GB should be sufficient for most tasks.
- Set the number of NICs to 1 and use VMXNET 3 as the adapter
- Choose LSI Logic Parallel as controller
- Choose Do not create disk
- Check “Edit the virtual machine…” and then Finish
- While not needed, I suggest to remove the CD and Floppy Drive
The reason why I do not recommend to create virtual drives or use RDM for storage is that S.M.A.R.T and temperature monitoring will not work. It’s not a requirement in any way, but I highly suggest to get yourself a dedicated SATA controller such as the LSI SAS 9201-16i I got.
1. Creating the boot image
In order to create the boot image for DSM, start WinImage. Navigate to File->Open and select the img file you downloaded earlier. Find and right click on syslinux.cfg and select “Extract”. Open syslinux.cfg with notepad and add “rmmod=ata_piix” behind every instance of sn=XXXXXXXXXX entry so it looks like this:
... sn=XXXXXXXXXX rmmod=ata_piix ...
Save the modified syslinux.cfg file and “Inject” it back to the img file using WinImage (overwrite the file when asked). Save the image and exit WinImage. This will ensure that all drives are loaded and accessible. If not added you’ll have the virtual IDE controller of VM taking your first few drive slots.
2. Convert the boot image to VMDK
Start Starwind V2V converter and choose the img file you want to convert and follow the on-screen instructions. Make sure to choose “VMware pre-allocated image and IDE as type. This process will create two vmdk files which you will need to upload to your ESXi data store. I suggest you upload the files in the same directory as your VM resides in.
3. Adding boot and hard drives to your VM
Now you’ll need to edit your virtual machine setting. Right click on your VM and select “Edit settings”. Click “Add”, select “Hard Disk”->”Use existing virtual disk” and select the vmdk file you just uploaded. Be sure to add it as a IDE hard disk and don’t change any other settings. Now your boot disk is set and done! Congratulations!
If you are like me and brought a dedicated LSI (or similar) SATA controller, I highly suggest to dedicate that pci-card to the VM. In order to do so, go to Configuration->Advanced Settings and click “Edit”. Check your SATA controller, click OK and reboot your server when prompted. Once you are logged into vSphere again, go to your VM and edit it’s settings. Now you should be able to choose “Add”, “PCI Devices” and select your SATA controller. All drives connected to it will automatically be available for Synology DSM (max 12 drives).
4. Start and install
Now it’s time to start your virtual machine for the first time. The rest of the install is no different then installing an ordinary Synology Disk Station. Just download the Synology Assistant and follow it’s instructions to download and install DSM.
I recommend to change the MAC address of your NIC to anything else but Automatic. I’ve notices that some stuff like e-mail notification might not work until you do. For example: 00:11:32:XX:XX:XX. The first numbers specify that it’s a Synology NIC. 🙂
You’ll notice that EXSI complains about VMware Tools missing. Don’t worry, you don’t need it, but if you really want to install it you can do so by manually installing this packing from the Package Installer in DSM.