Storm season is back, bringing with it the potential for significant weather events. If you have clients in areas prone to infrastructure disruption, visit the Disaster Recovery Resources guide for preparedness information. Datto recommends performing proactive disaster recovery testing to mitigate potential downtime. See our articles about the importance of disaster recovery testing and Preparing For A Cloud Virtualization Test: Policies, Procedures, And Partner Responsibilities to learn more. For live updates, follow @datto on Twitter.

How Do I Restore a VM to VMware vSphere Using a VMDK Image Export?



How do I restore a VM to VMware vSphere using a VMDK image export?


  • Datto ALTO
  • Datto SIRIS


This article explains how to export a backup as a VMDK, and move it back to a permanent storage location within the VMware vSphere environment.


Datto appliances running Ubuntu 16.04 do not use VMX files. When creating the virtual machine, if you see a boot.vmdk file in the export, this needs to be the first disk in your boot sequence, followed by C.vmdk.
Before this procedure, you must follow the steps in the Export Image article to make the VMDK export available on the network via NFS.
Do NOT use the "upload file/folder" button on the datastore browser to upload the vmdk and .datto image file to your VMware vSphere environment. This could prevent certain vSphere features from working on a virtual machine associated with these files. Instead, please use the process outlined in this article.

Once you've shared the recovery point as a VMDK over an NFS share from the Datto, this procedure will guide you through the following overall steps:

  1. Add the NFS share from the Datto to VMware as a datastore.
  2. Identify or create a new datastore to house the new VM.
  3. Copy the VMDK from the Datto NFS share to its permanent home on VMware. If you use the copy/paste method as described below, it will copy as thick provisioned.
  4. Create and start a new VM from the VMDK.

If you want a thin-provisioned copy and have access to the VMware console command-line tools, you can use the command as described in the Copying the VMDK to a permanent datastore section below, rather than the copy/paste method. If you desire a thin-provisioned copy but do not have access to the command line, you can use VMware converter to copy the data.

Add the NFS share from the Datto to VMware as a datastore.

1. Launch the VMware vSphere Client to connect to the VMware ESXi Host or vCenter server, and log in.

Figure 1: Client Login

2. Once logged in to the vSphere Client, click Storage. Click the name of the host where you want to restore the VM, and then click the Datastore tab.

Figure 2: Selecting the Datastore tab in the vSphere Client 

4. From the Datastore tab, right-click on the hostname, and click Storage → New Datastore.

5. Follow the New Datastore Wizard prompts.

In Step 3 of the wizard, you can name the datastore anything you like. The default used in this example is Datastore.

You can find the Server and Folder parameters on the Datto appliance, at the Manage Restore page of the VMDK export you created. The Server parameter is the IP address to the left of the colon. The Folder parameter is the full path to the right of the colon. If your host is connecting to the Datto appliance on a different subnet, the Server IP is the interface on the device configured to that subnet, as shown in the below example.

Check the configuration, and click Finish to create the datastore.

Figure 3: New Datastore Wizard

Copying the VMDK to a permanent datastore

If you have access to the VMware command line:

To copy the datastore from the temporary Datto recovery to a permanent datastore on VMware with thin disk provisioning:


vmkfstools -i /vmfs/volumes/<SourceDataStoreName>/<DriveLetter>.vmdk -d thin /vmfs/volumes/<DestinationDataStoreName>/<DriveLetter>.vmdk


vmkfstools -i /vmfs/volumes/Datastore/C.vmdk -d thin /vmfs/volumes/HostStorage001/C.vmdk

To copy the datastore from the temporary Datto recovery to a permanent datastore on VMware with thick disk provisioning:


vmkfstools -i /vmfs/volumes/<SourceDataStoreName>/<DriveLetter>.vmdk /vmfs/volumes/<DestinationDataStoreName>/<DriveLetter>.vmdk


vmkfstools -i /vmfs/volumes/Datastore/C.vmdk /vmfs/volumes/HostStorage001/C.vmdk
The SourceDataStoreName is the datastore you created which references the NFS share on the Datto appliance. The DestinationDataStoreName is the datastore on your environment where the disk images will be copied to.

If you DO NOT have access to the command line:

The following method copies a VMDK with thick-provisioning due to limitations of the vSphere software.

1. Right-click on the datastore you just created, and click Browse Files. You will use this as the Source Datastore in the next steps.

Figure 4: Browse Files

2. Repeat the previous step on the datastore you wish to use for the permanent location of the restored virtual machine. You will use this datastore as the "destination datastore" in the next steps.

Figure 5: Browse Files view

3. In the destination datastore, create a new folder and name it accordingly.

Figure 6: New folder creation

4. From the source datastore, select the VMDK, and select Copy. Paste the VMDK into the destination datastore. A progress window will appear while the VMDK copies to the destination datastore.

Figure 7: Copy progress to destination datastore 

The disk image provided by the vmdk export is thick-provisioned. Using the method above to copy the vmdk from the temporary NFS datastore to the permanent storage location will result in a thick-provisioned vmdk in the permanent destination datastore. If you wish wish to copy the vmdk as thin-provisioned, this must be done from the vSphere CLI using vmkfstools, or using VMWare Converter.
Do NOT copy the .vmx file if it is present. The .vmx file is only useful when using VMWare Converter and should not be used to manually restore the system. Please follow the steps below to create a new virtual machine and attach the recovered .vmdk files to the new virtual machine.

Creating a New Virtual Machine

1. Right-click on the host at the top of the list of virtual machines, and select New Virtual Machine → New Virtual Machine.

Figure 8: New Virtual Machine

2. Go through the wizard and configure the virtual machine appropriately.

3. When you reach the Customize Hardware section, select Existing Hard Disk → Add.

Figure 9: Using an Existing Virtual Disk

4. Select the datastore where the VMDK is located. Select the VMDK of the boot volume (this is typically C).

If you see a boot.vmdk file, this needs to be the first disk in your boot sequence, followed by C.vmdk.

Figure 10: Browsing a datastore for a VMDK

5. Once the VMDK has been mapped from the data store, click OK.

6. Click Next, and click Finish.

7. Attach more existing disks as necessary by editing the virtual machine settings.

8. Boot the virtual server.

If the virtualization fails after the first attempt, try another storage controller for the virtualization. It also may be necessary to run HIR from the StorageCraft recovery environment in the event that the boot device is found inaccessible due to storage controller changes. Please contact support if this is the case.  

Was this article helpful?

5 out of 5 found this helpful

You must sign in before voting on this article.

Calling all Partners! We want to hear your feedback! Please participate in this quick survey and help us build a better, more-relevant Knowledge Base!

Want to talk about it? Head on over to our Community Forum!