vhdx: Support .bdrv_co_create

This adds the .bdrv_co_create driver callback to vhdx, which
enables image creation over QMP.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
Kevin Wolf 2018-03-09 19:53:19 +01:00
parent da23248f27
commit 09b68dab5a
2 changed files with 206 additions and 56 deletions

View file

@ -3844,6 +3844,44 @@
'size': 'size',
'*static': 'bool' } }
##
# @BlockdevVhdxSubformat:
#
# @dynamic: Growing image file
# @fixed: Preallocated fixed-size image file
#
# Since: 2.12
##
{ 'enum': 'BlockdevVhdxSubformat',
'data': [ 'dynamic', 'fixed' ] }
##
# @BlockdevCreateOptionsVhdx:
#
# Driver specific image creation options for vhdx.
#
# @file Node to create the image format on
# @size Size of the virtual disk in bytes
# @log-size Log size in bytes, must be a multiple of 1 MB
# (default: 1 MB)
# @block-size Block size in bytes, must be a multiple of 1 MB and not
# larger than 256 MB (default: automatically choose a block
# size depending on the image size)
# @subformat vhdx subformat (default: dynamic)
# @block-state-zero Force use of payload blocks of type 'ZERO'. Non-standard,
# but default. Do not set to 'off' when using 'qemu-img
# convert' with subformat=dynamic.
#
# Since: 2.12
##
{ 'struct': 'BlockdevCreateOptionsVhdx',
'data': { 'file': 'BlockdevRef',
'size': 'size',
'*log-size': 'size',
'*block-size': 'size',
'*subformat': 'BlockdevVhdxSubformat',
'*block-state-zero': 'bool' } }
##
# @BlockdevCreateNotSupported:
#
@ -3899,7 +3937,7 @@
'ssh': 'BlockdevCreateOptionsSsh',
'throttle': 'BlockdevCreateNotSupported',
'vdi': 'BlockdevCreateOptionsVdi',
'vhdx': 'BlockdevCreateNotSupported',
'vhdx': 'BlockdevCreateOptionsVhdx',
'vmdk': 'BlockdevCreateNotSupported',
'vpc': 'BlockdevCreateNotSupported',
'vvfat': 'BlockdevCreateNotSupported',