diff --git a/doc/source/formats.rst b/doc/source/formats.rst index c763a77e..d2cabe9b 100644 --- a/doc/source/formats.rst +++ b/doc/source/formats.rst @@ -41,6 +41,11 @@ You can set your image's disk format to one of the following: This is the VHD disk format, a common disk format used by virtual machine monitors from VMWare, Xen, Microsoft, VirtualBox, and others +* **vhdx** + + This is the VHDX disk format, an enhanced version of the vhd format which + supports larger disk sizes among other features. + * **vmdk** Another common disk format supported by many common virtual machine monitors diff --git a/doc/source/glanceapi.rst b/doc/source/glanceapi.rst index 25703f05..e03cc564 100644 --- a/doc/source/glanceapi.rst +++ b/doc/source/glanceapi.rst @@ -510,8 +510,8 @@ The list of metadata headers that Glance accepts are listed below. * ``x-image-meta-disk_format`` This header is required, unless reserving an image. Valid values are one of - ``aki``, ``ari``, ``ami``, ``raw``, ``iso``, ``vhd``, ``vdi``, ``qcow2``, or - ``vmdk``. + ``aki``, ``ari``, ``ami``, ``raw``, ``iso``, ``vhd``, ``vhdx``, ``vdi``, + ``qcow2``, or ``vmdk``. For more information, see :doc:`About Disk and Container Formats `. diff --git a/etc/glance-api.conf b/etc/glance-api.conf index 9362b122..a97ca648 100644 --- a/etc/glance-api.conf +++ b/etc/glance-api.conf @@ -1105,7 +1105,7 @@ # Supported values for the 'disk_format' image attribute (list value) # Deprecated group/name - [DEFAULT]/disk_formats -#disk_formats = ami,ari,aki,vhd,vmdk,raw,qcow2,vdi,iso +#disk_formats = ami,ari,aki,vhd,vhdx,vmdk,raw,qcow2,vdi,iso [keystone_authtoken] diff --git a/glance/common/config.py b/glance/common/config.py index e498b6a8..5d5a95b1 100644 --- a/glance/common/config.py +++ b/glance/common/config.py @@ -48,8 +48,8 @@ image_format_opts = [ deprecated_opts=[cfg.DeprecatedOpt('container_formats', group='DEFAULT')]), cfg.ListOpt('disk_formats', - default=['ami', 'ari', 'aki', 'vhd', 'vmdk', 'raw', 'qcow2', - 'vdi', 'iso'], + default=['ami', 'ari', 'aki', 'vhd', 'vhdx', 'vmdk', 'raw', + 'qcow2', 'vdi', 'iso'], help=_("Supported values for the 'disk_format' " "image attribute"), deprecated_opts=[cfg.DeprecatedOpt('disk_formats', diff --git a/glance/contrib/plugins/image_artifact/v1/image.py b/glance/contrib/plugins/image_artifact/v1/image.py index a084d76c..d842416f 100644 --- a/glance/contrib/plugins/image_artifact/v1/image.py +++ b/glance/contrib/plugins/image_artifact/v1/image.py @@ -21,8 +21,9 @@ class ImageAsAnArtifact(definitions.ArtifactType): file = definitions.BinaryObject(required=True) disk_format = definitions.String(allowed_values=['ami', 'ari', 'aki', - 'vhd', 'vmdk', 'raw', - 'qcow2', 'vdi', 'iso'], + 'vhd', 'vhdx', 'vmdk', + 'raw', 'qcow2', 'vdi', + 'iso'], required=True, mutable=False) container_format = definitions.String(allowed_values=['ami', 'ari', diff --git a/glance/tests/unit/v2/test_images_resource.py b/glance/tests/unit/v2/test_images_resource.py index 3cfc4ddf..776f3ecb 100644 --- a/glance/tests/unit/v2/test_images_resource.py +++ b/glance/tests/unit/v2/test_images_resource.py @@ -3726,8 +3726,8 @@ class TestImagesSerializerDirectUrl(test_utils.BaseTestCase): class TestImageSchemaFormatConfiguration(test_utils.BaseTestCase): def test_default_disk_formats(self): schema = glance.api.v2.images.get_schema() - expected = [None, 'ami', 'ari', 'aki', 'vhd', 'vmdk', 'raw', 'qcow2', - 'vdi', 'iso'] + expected = [None, 'ami', 'ari', 'aki', 'vhd', 'vhdx', 'vmdk', + 'raw', 'qcow2', 'vdi', 'iso'] actual = schema.properties['disk_format']['enum'] self.assertEqual(expected, actual) diff --git a/rally-jobs/plugins/plugin_sample.py b/rally-jobs/plugins/plugin_sample.py index 087593db..6274d85f 100644 --- a/rally-jobs/plugins/plugin_sample.py +++ b/rally-jobs/plugins/plugin_sample.py @@ -42,7 +42,7 @@ class GlancePlugin(scenario.OpenStackScenario): Acceptable formats: ami, ari, aki, bare, ovf, ova and docker. :param image_location: image file location used to upload :param disk_format: Disk format of image. Acceptable formats: - ami, ari, aki, vhd, vmdk, raw, qcow2, vdi, and iso. + ami, ari, aki, vhd, vhdx, vmdk, raw, qcow2, vdi, and iso. :param **kwargs: optional parameters to create image returns: object of image diff --git a/releasenotes/notes/add-vhdx-format-2be99354ad320cca.yaml b/releasenotes/notes/add-vhdx-format-2be99354ad320cca.yaml new file mode 100644 index 00000000..83cf4bc5 --- /dev/null +++ b/releasenotes/notes/add-vhdx-format-2be99354ad320cca.yaml @@ -0,0 +1,11 @@ +--- +prelude: > + - Add VHDX to list of supported disk format. +features: + - The identifier ``vhdx`` has been added to the list of + supported disk formats in Glance. The respective + configuration option has been updated and the default + list shows ``vhdx`` as a supported format. +upgrade: + - The ``disk_format`` config option enables ``vhdx`` as + supported by default.