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.
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:
- Add the NFS share from the Datto to VMware as a datastore.
- Identify or create a new datastore to house the new VM.
- 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.
- Create and start a new VM from the VMDK.
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.
2.1. 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
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/<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
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
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).
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.