This adds vmdk support to x-blockdev-create command. Unlike other formats, several VMDK subformats consists of multiple files (extents). In the QAPI interface we use an array of BlockdevRef to pass in. The management tool need to figure out how many extent files are needed but that is simple enough. There is a convention how VMware (as well as qemu-img) builds the extents' file names, but that isn't standardized, therefore it is not documented as part of this API. Extraneous extents in the end of the provided array are ignored.
A big part of the patch is refactoring so that BlockdevRef parsing can be hooked in. Please review! Thanks. Fam Zheng (5): qapi: Add qapi_enum_parse_full vmdk: Refactor vmdk_create_extent vmdk: Implement .bdrv_co_create callback iotests: Filter cid numbers in VMDK extent info iotests: Add VMDK tests for blockdev-create block/vmdk.c | 550 ++++++++++++++++++++++++++++----------- include/qapi/util.h | 2 + qapi/block-core.json | 67 ++++- qapi/qapi-util.c | 20 +- tests/qemu-iotests/214 | 268 +++++++++++++++++++ tests/qemu-iotests/214.out | 304 ++++++++++++++++++++++ tests/qemu-iotests/common.filter | 1 + tests/qemu-iotests/group | 1 + 8 files changed, 1053 insertions(+), 160 deletions(-) create mode 100755 tests/qemu-iotests/214 create mode 100644 tests/qemu-iotests/214.out -- 2.14.3