A VMware VM is a set of files containing all of the necessary information about a virtualized operating system. These files include the primary configuration file (VMX), which keeps VM settings, the centralized file for storing information about VM snapshots (VMSD) and other. The data of the VM is contained in the VMDK file, the VMware virtual disk format. By way of analogy with physical servers, each VMware VM can have one or more virtual disks, which mean that your VM can contain several VMDK files or otherwise said, can contain several “hard drives”.
Data protection
Now let’s imagine that you have a VMware VM with two or more hard disk drives. Assuming you are the best virtualization admin that the world has ever known, you, of course, follow the 3-2-1 backup rule and backup your VM on a regular basis and store your backup files on different media in several separated locations. As an admin, you never really know when disaster will strike, but you are fully prepared in case it does!
Disaster and recovery of VM hard disks
Now let’s imagine that something has gone wrong and you need to recover one or several virtual disks from a VM backup – to different locations. Hopefully, you used Veeam Backup & Replication or its free edition, because (surprise, surprise!) not all backup solutions offer this functionality for VMware.
Why? When backup software requests a VMware vSphere hypervisor (ESXi) to take a snapshot of a VM with multiple virtual disks, it returns a system state of the VM at the time it was taken, and meaning all attached non-independent disks are snapshotted simultaneously. There is one delta file per VM disk and per snapshot, and all these files are stored in the same location. For example, for a VM with two virtual hard disks:
virtual_machine.vmdk: The 1st virtual disk in stored on the datastore 1
virtual_machine_1.vmdk: The 2nd virtual disk is stored on the datastore 2
After the VM snapshot is taken:
virtual_machine-000001.vmdk: (Related to the 1st virtual disk) will be stored on the datastore 1
virtual_machine-000002.vmdk: (Related to the 2nd virtual disk) will be stored on the datastore 1
You may also see VMDK files with a –ctk in the name, this indicates that changed block tracking is enabled on that disk.
Next, the backup software creates a backup file (in short, it uses the server to get an access to VM disks and files inside of the snapshot, captures all data and information about VM configuration, applies deduplication and/or compression to the snapshot data, and sends a command to the ESX(i) server to remove the backup snapshot). Depending on the backup software, there are a number of ways to access the state of the VM in terms of the storage of the VM.
Recovery should work as a backward process from the datastore point of view, and Veeam offers all necessary granularity in the restore process. So, if you use backup from Veeam, don’t worry that some of your datastores doesn’t have enough size to hold the whole recovered VMware VM, including all of its multiple virtual disks, because you will still be able to restore each VM hard disk to a separate location.
How to perform this type of restore?
It is easy! In the Veeam Backup console, click “Restore” and follow a few steps provided by the Restore wizard. You will need to select a VM backup file, the necessary VM, the disks you want to be restored, the restore point, etc. The process itself is explained well here (Restoring VM Hard Disks), with extra details and screenshots:
- Launch the Restore wizard
- Select “Restore VM hard disks” from the list to launch the Hard Disk Restore wizard
- Select a VM in the list of available jobs and necessary restore point for this VM
- Finally, select virtual hard disks to restore and target datastores.
Use cases
The type of restore described above might be helpful in many use cases. For example, historically, the maximum size of a VMDK file was limited to 2TB. In 2013 VMware introduced 62TBs virtual machine disk files for VMware vSphere 5.5. This announcement was well received by the majority of virtualization experts because it allowed even more data to be kept on the same VM! On the other hand, storage space is expensive today and not all organizations can afford good storage devices that offer enough capacity. Ineffective storage could leave you in a situation where you cannot locate all of your virtual disks related to the same VMware VM on one datastore. The only solution there is to keep virtual disk 1 on datastore 1 and virtual disk 2 on datastore 2 – for the same VM. Obviously, in the case of a disaster, you will have to restore these VMDK files to different datastores too.
Final comments:
- All editions of backup from Veeam (even Veeam Backup Free Edition) are able to perform this type of restore.
- Make sure you know which VMDK is which. The file names and the sequence of their inventory in the virtual hardware are not always the same sequence as the guest operating system sees them.
I hope you found this helpful. As always, send me your questions and comments related to this post.
For more information you can always read:
- Veeam Help Center: Veeam Backup & Replication for VMware vSphere
- Veeam Help Center: Veeam Backup & Replication for Microsoft Hyper-V
- Veeam Help Center: Veeam Backup Free Edition
- Veeam Backup & Replication and Veeam Backup Free Edition pages
- Datasheets, user guides, licensing FAQs and other helpful docs
- Veeam University – Free online educational courses for end-users