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.
Before this procedure, you must follow steps in previous topic Export Image to make the VMDK export available on the network via NFS.
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.
2.1. Starting vSphere
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.
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.
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/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.
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.
3. In the destination datastore, create a new folder and name it accordingly.
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.
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.
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.
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.