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:

Read on →

Status Update: Multi Flat/sparse Support

Lately an updated patch set has been posted to list, which is splitted and improved according to Kevin’s instructions, The patches included monolithicFlat and monolithicSparse support.

Read on →

Status Update: Splitting Patches for Mono Flat

The big monolithic flat patch will be split into small ones, I have the split in mind as:

Read on →

Status Update: ESX Server Sparse Extent

The ESX Server Sparse Extent has the same magic number and very similar header fields, with the existing VMDK3Header. Most code can be reused to add support for this format. Only a few fields are extra to VMDK3Header, they are used to save the extent name/description and detect the unclean shutdown.

Read on →

Managing Dev Code and Patch Series

These are notes of chatting with Kevin on managing patch in qemu development.

It is a practice that code submitted to qemu are split to small patches, so that they are easy to review. If the code to submit is long, it will be difficult to separate at the end of the development. A better approach is to dev along the will-be series of patch, i.e. when developing a new part create one commit for each patch that will be submitted in the end. Every commit is a logical change, if need to adjust anything on it, we can use rebase command of git.

So the important part to keep handling things easy is that never mix two logically different things in one commit. Changing commits afterwards, or merging them is easy, just splitting is hard.

Patch: Monolithic Flat Image Support

VMDK multiple file images can not be recognized for now. This patch is adding monolithic flat support to it, that is the image type with two files, one text descriptor file and a plain data file. This type of image can be created in VMWare, with the options “allocate all disk space now” and “store virtual disk as a single file” checked.

A VmdkExtent structure is introduced to hold the image extent information, which makes further adding multi extents support of VMDK easy. An image creating option “flat” is added for creating flat (preallocated) image.

Status Update: Mono Flat Almost Ready

After one week’s work, our mono-flat support is now bound into vmdk. The support includes probe, open, read, write, is_allocated and also backing_hd of monolithicFlat type images.

Read on →

Status Update: Mono-sparse Is Recovering

So far mono flat support is almost complete, and I’ve started to recover mono-sparse operations. Open and read are basically back, tomorrow write should be finished too.

After coding these two formats’ support I’ll turn to build more useful test suites. The qemu-io commands ‘read’ and ‘write’ might need to be enhanced to support dump in/out external files, in order to power up auto test scripts.

Preview Image Disk Size Counted by Block Driver

In multiple file vmdk disk, qemu-img info doesn’t count any file allocation other than descriptor file (the file pointed by bs->file). A field is added to BlockDriverState to hold actual disk size if block driver itself has its method to count the disk size. If the field is not set by block driver, qemu-img will still query the file size from OS, and ignore the ‘zero’.

The new field is

1
int64_t disk_size;

And now used by vmdk driver to pass the sum of file sizes to qemu-img.

Status Update: Vmdk open and Qemu-img Info on Multi File Images

The BlockDriver of vmdk is defined as

Read on →