Restore a VM to VMware vSphere using Image Export


1. Scope

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.

2. Procedure

Datto appliances running Ubuntu 16.04 do not use VMX files.

Before this procedure, you must follow steps in previous topic Export Image 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 in Section 2.3, it will copy as thick provisioned.
If you desire a thin-provisioned copy and have access to the VMware console command line tools, you can use the command as described in Section 2.3, 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.
  1. Create and start a new VM from the VMDK.

2.1. Starting vSphere

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


3. From the Datastore tab, right-click on the hostname, and click Storage → New Datastore. Follow the New Datastore Wizard prompts, and click Finish to create the datastore.

wizard.jpgFigure 3 - New Datastore Wizard

2.2 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/YourDataStoreName/C.vmdk -d thin /vmfs/volumes/DestinationDataStoreName/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/YourDataStoreName/C.vmdk /vmfs/volumes/DestinationDataStoreName/C.vmdk

If you DO NOT have access to the command line:

The following method copies a VMDK with thick provisioning because of limitations to the VMWare GUI.

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


Note: 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.

Warning: 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.

2.3. 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.

Note: 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?

3 out of 3 found this helpful

You must sign in before voting on this article.

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