An easy way to quickly migrate a VMware VM to Synology VMM

When it comes to virtualization, I’m working with VMware products in my homelab, alongside (hardware) products from other manufacturers. But some special circumstances made a special solution to a problem necessary. Due to a month of military duty, when I was at home only for the weekend, I shut down my homelab. Not also due to this fact, but also because I’m currently building my own customized rack, where I will install my homelab hardware. Be sure to check my blog frequently to get more information about the rack, as I will blog about it soon!

What’s the reason for this migration?

I’m using Ubiquiti hardware for my networking (lab switches, home networking, including wireless), and also a Pi-Hole as my ad-blocker. These are the only “business-critical” services in my home network. And they were running on my homelab. But what should I do when I shut down everything? Well, VMware Workstation to the rescue! I’m (actually, I was) running an ESXi on VMware Workstation on my gaming computer. This ESXi server was managed with vCenter as a replication target for Veeam Backup and Replication. Quickly migrate the VMs to that virtual ESXi host, and that’s it. But what when I accidentally shut down this PC? Or I want to shut it down? I need another solution which is more like 24/7!

What’s the solution?

That made me think about Synology. I knew that at least some Synology NAS systems can run virtual workloads directly, either as a virtual machine or within Docker. I didn’t want to go with Docker because of the lack of knowledge, and I have only limited system resources on that NAS box. So it will be two VMs running on my Synology box! But how?

You can’t just vmotion your VMware VM to Synology VMM (Virtual Machine Manager). You can export the VMDK files or create an OVF, which you then import into Synology VMM. But that took to long, somehow (in certain circumstances I can be impatient …).

This blog post will show you how you can easily backup your VMware VMs to a Synology box, with their own toolset, and restore it directly into Synology VMM. It might come in handy, in case you’re searching also for a nifty solution to run a Pi-Hole or a Ubiquiti controller. Or some other small VMs.

To be honest, the Synology box isn’t a Ferrari, or a Fright Liner in terms of performance and / or capacity. Such a NAS is always somehow limited in CPU resources and memory. In my case, I was happy that I maxed-out the memory when I initially bought the NAS box. My current NAS looks like this:

You can see, there are not many resources, but it should be fine for some tiny Linux VM. A domain controller can even run on it if the resources are used sparingly. But don’t expect too much… And let’s dive into the topic now.

First, the backup

tl;dr – We have to back up the VMs first from our ESXi host to the Synology box, and then we do a restore of the VM directly to Synology VMM before we can run them on the box. The next steps will describe how you use Synology Active Backup for Business and create a backup of your VMs. Hint: it’s free! You only have to enable the feature with your Synology account.

Preparation

To have everything ready, you have to download two software packages on your Synology NAS. You can directly install these packages through the Synology Package Center. We need the “Virtual Machine Manager” and also “Active Backup for Business”:

Create a backup of your VMs

As mentioned, we will now first create a backup of our virtual machines. To do so, open the Active Backup for Business. You have to “activate” it in the first step with your Synology account. No worries, it’s free.

Click the “VMware vSphere” tab and click “Manage Hypervisor” to add your ESXi host. Simply add the FQDN / IP address, username and password to connect to the ESXi host. If all is fine, you’ll get a green notification bar. To mention, this notification bar is always there and refreshes automatically. So you will see immediately if there’s something wrong with your ESXi host.

NOTICE: this post will be updated as soon as I’ve got my homelab back up and running. I’ll check if I can add vCenter as well and how this works.

After adding your ESXi host, you will see a list of VMs running on your host. To create a backup task, click the “Create Task” button above the VM list and follow the assistant.

First, we select the backup destination. This is a folder on your Synology box. I’ve created one, called “SYNOBACKUP”.

Select the virtual machine(s) you’d like to back up.

Set the task settings according to your needs. More information about the settings here, and the Active Backup for Business in general, are available at the Synology knowledge base.

In our case, we only want to migrate a VM from a VMware ESXi host to a Synology NAS, we’re not going to create a scheduled backup. But please, feel free to do so if you fancy!

I’m just clicking through the assistant, I’m going to keep all versions. In my case, I have only one because I’ve set up a manual backup task.

Next, enable a user with restoration privilege. This user will be able to do a restore.

Check the task summary to review if everything is as you like to configure it. If all is fine, click “Apply”.

You will be asked if you’d like to back up now. Why not? It’s a manual task in my example here, and I would start it anyway after the configuration.

On the “Task List” tab you can see the progress of the backup. We will wait until the backup has been completed successfully.

Restore the VM now to Synology VMM

Now we’ve got a fine backup of our VM(s). To be able to run them in Synology VMM, we have to restore it. And we can restore it directly into VMM. How cool is that?

Click the VM you just clicked to create a backup task. Click the “Restore” button above the VM list. The restore wizard will start and guide your through this task.

Mark the radio button to instant restore the VM to Synology VMM.

Select the appropriate restore point. In my case there’s just one because I only have one due to the migration project.

Select the storage where the VM should be restored. I only have one volume on my test NAS.

Enter a name for the VM and adjust CPU and memory settings. The restore wizard will show the same values the VM had initially. But that might be too much for a Synology NAS…

Set the disk size of that VM. Also this value is the original value the VM had on ESXi.

Next, select the appropriate network for your VM. I’ve excluded the part of creating a network when installing and configuring Synology VMM. More information regarding Synology VMM is available on their knowledge base.

Some other settings can be adjusted, but in our example here it’s not necessary. You could, for example, attach an ISO file to boot a VM from it, or change the start-up behavior.

Assign now user permissions which will enable a user to power on/off or restart a virtual machine through VMM.

Check the summary to review all settings, and click “Apply”. The restore will start now.

In my example, it was only a small VM, and the restore was done like immediately. When I wen’t back to the VMM, I already saw that the VM is waiting there for me to be powered on.

Finishing tasks

Networking issues

When you’re in the Synology Virtual Machine Manager, you can now power on the VM. Just a second later, you can click the “Connect” button to open the VM web console and see what’s going on. It will look similar to this:

In my case, I had networking issues, with both virtual machines after doing the restore. The VM was offline and didn’t get a DHCP IP address. The reason was the network interface. When the VM was running on my ESXi host, the interface was named “ens192”. That was the reason the VM didn’t come online and didn’t get an IP address. I had to rename the interface to bring it back online.

In my example, a CentOS 8.2 VM, I was able to do this with the GUI tool “nmtui”. I had to edit

Installing Synology Guest Agent

VMware provides the VMware Tools, and Microsoft provides their Guest Integration Components. Synology also provides their own guest tools, at least for Windows, through an ISO file. For Linux, as in my example, you can just download it through the Linux package manager.

Installing Synology Guest Tool on your virtual machines in Virtual Machine Manager (VMM) can help enhance their performance and make managing easier. After the installation, you will be able to do the following:

  • Shut down/restart virtual machines in VMM
  • Detect IP addresses of guest operating systems
  • Take file system consistent snapshots (Refer to this article for more information)

You can find more information about the Synology Guest Tools in their knowledge base article.

I’m using a CentOS 8.2 Linux, in my case I had to execute this command:

yum install qemu-guest-agent

For Ubuntu, this command will help (as my “production” VMs are based on Ubuntu):

apt-get install qemu-guest-agent

A restart is usually not needed, you should get the visible feedback in Synology VMM closely after installing the guest tools. There you should see that the guest tools are now installed (Guest Agent: Running) and when you see the IP address.

And that’s basically it. This guide should help you creating a backup of your VM, running on an ESXi host, to a Synology NAS, and restore it directly into Synology Virtual Machine Manager.