VMware Virtual Disk Use Cases
Collecting virtual disk use cases in VMware might be helpful to find what kind of support is valuable or useful to VMDK image in QEMU. So I checked out some documents today, trying to find something. Besides creating types of disks and attach them as block device in guest OSes, there are several topics on VMDK images:
- Snapshots
- Defragment disk Like physical disk drives, virtual disks can become fragmented. Defragmenting disks rearranges files, programs, and unused space on the virtual disk so that programs run faster and files open more quickly.
- Compact disk Compacting a virtual disk reclaims unused space in the virtual disk. If a disk has empty space, this process reduces the amount of space the virtual disk occupies on the host drive.
- Expand disk Expanding a virtual disk adds storage space to the virtual machine. Attach disk to VM in independent mode: Persistent or Nonpersistent, as modifiable or revert to the original state after per VM shutdown.
- Map as a host drive. It is very useful for accessing guest data directly from host OS.
- Stream Optimizing disk data for transporting.
The grain compression feature, doesn’t have much material except for the very brief introduction in VMDK specification, and according to a thread in VMware community, is said to be not configurable by user and only used when “transporting disk files”. As QEMU has already linked to zlib, deflate compressing clusters is fairly simple (all that’s needed is a call to compress/uncompress).
There’s also a VMware provided Virtual Disk API, which I’ll get into it and see if it can serve as a reference for our driver development.