Add 'vhdx' disk format.
This patch adds the Hyper-V 'vhdx' disk format to the Glance configuration. This allows users to upload 'vhdx' images by default. 'vhdx' disks can have much larger storage capacity than the older 'vhd' format [1]. (Plus, anything with 'x' in the name is awesome.) DocImpact: Docs will need to be updated to indicate that the 'vhdx' disk_format is now one of the default disk formats supported by Glance. UpgradeImpact: Adds 'vhdx' to the default list of disk_formats. Operators will no longer need to configure specifically to use 'vhdx' disks. [1] https://technet.microsoft.com/en-us/library/hh831446(v=ws.11).aspx Spec-Lite: https://review.openstack.org/#/c/347626 Change-Id: I4e172c78d7afeb8be5a0123238efe3d8e4b044c9
This commit is contained in:
parent
1af46fe933
commit
fc0b47beb6
@ -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
|
||||
|
@ -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 <formats>`.
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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)
|
||||
|
||||
|
@ -42,7 +42,7 @@ class GlancePlugin(scenario.OpenStackScenario):
|
||||
Acceptable formats: ami, ari, aki, bare, ovf, 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
|
||||
|
11
releasenotes/notes/add-vhdx-format-2be99354ad320cca.yaml
Normal file
11
releasenotes/notes/add-vhdx-format-2be99354ad320cca.yaml
Normal file
@ -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.
|
Loading…
Reference in New Issue
Block a user