xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH 10/14] docs: update xl-disk-configuration.txt to describe new syntax
Date: Thu, 12 May 2011 15:36:40 +0100	[thread overview]
Message-ID: <1305211004-31687-11-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1305211004-31687-10-git-send-email-ian.jackson@eu.citrix.com>

---
 docs/misc/xl-disk-configuration.txt |  221 +++++++++++++++++++---------------
 1 files changed, 123 insertions(+), 98 deletions(-)

diff --git a/docs/misc/xl-disk-configuration.txt b/docs/misc/xl-disk-configuration.txt
index 58332a9..90ba54e 100644
--- a/docs/misc/xl-disk-configuration.txt
+++ b/docs/misc/xl-disk-configuration.txt
@@ -1,57 +1,99 @@
+                     ---------------------
+                     XL DISK CONFIGURATION
+                     ---------------------
 
+This document specifies the xl config file format disk configuration
+option.  It the following form:
 
-                         ----------------------------
-                         xl Disk Configuration Option
-                         ----------------------------
+    disk = [ '<diskspec>', '<diskspec>', ... ]
 
-This document provides a brief description of xl disk configuration
-option, different attributes that can be passed through it and the
-format in which they need to be specified.
+where each diskspec is in this form:
+    
+   [<key>=<value>|flag]*,
+     [<target>, [<format>, [<vdev>, [<access>]]]],
+     [<key>=<value>]*,
+     [target=<target>]
 
-At a higher level, xl disk configuration option takes the following
-format:
 
-    disk = [ '[format:][path],vdev[:type],attrib',
-             '[format:][path],vdev[:type],attrib', ... ]
+For example, these strings are equivalent:
 
-Not all attributes are required (the attributes enclosed within square
-brackets above are optional) and some are deprecated.  Following is a
-brief description of each of the attribute along with information on
-whether or not they are mandatory.
+  /dev/vg/guest-volume,,hda
+  /dev/vg/guest-volume,raw,hda,rw
+  format=raw, vdev=xvda, access=rw, target=/dev/vg/guest-volume
+  raw:/dev/vg/guest-volume,hda,w   (deprecated, see below)
 
+As are these:
 
-------------------
-Attribute Details
-------------------
+  /root/image.iso,,hdc,cdrom
+  /root/image.iso,,hdc,,cdrom
+  /root/image.iso,raw,hdc,devtype=cdrom
+  format=raw, vdev=hdc, access=ro, devtype=cdrom, target=/root/image.iso
+  raw:/root/image.iso,hdc:cdrom,ro   (deprecated, see below)
 
+These might be specified in the domain config file like this:
 
-format:
-------
+  disk = [ '/dev/vg/guest-volume,,hda', '/root/image.iso,,hdc,cdrom' ]
 
-Description:           Specifies the format of image file.
-Supported values:      raw, qcow, qcow2, vhd
-Deprecated values:     None
-Mandatory:             No.  When not specified raw format is assumed.
-                       For a physical block device the format must be
-                       raw and need not be explicitly specified.  For
-                       an image file the format could be one of the
-                       supported values and when not specified assumed
-                       to be raw.
-path:
-----
 
-Description:           Block  device or image file path.  For a
-                       physical block device a /dev  will be prepended
+More formally, the string is a series of comma-separated keyword/value
+pairs, flags and positional parameters.  Parameters which are not bare
+keywords and which do not contain "=" symbols are assigned to the
+so-far-unspecified positional parameters, in the order below.  The
+positional parameters may also be specified explicitly by name.
+
+Each parameter may be specified at most once, either as a positional
+parameter or a named parameter.  Default values apply if the parameter
+is not specified, or if it is specified with an empty value (whether
+positionally or explicitly).
+
+Whitespace may appear before each parameter and will be ignored.
+
+
+=====================
+POSITIONAL PARAMETERS
+=====================
+
+target
+------
+
+Description:           Block device or image file path.  For a
+                       physical block device a /dev will be prepended
                        when not specified and when the path doesn't
-                       start  with a '/'.
+                       start with a '/'.
 Supported values:      N/A
 Deprecated values:     N/A
-Mandatory:             No.  While a path is provided in most cases
-                       there is an exception.  For a cdrom device, lack
+Default value:         None.  While a path is provided in most cases
+                       there is an exception: for a cdrom device, lack
                        of this attribute would imply an empty cdrom
                        drive.
 
-vdev:
+Special syntax:
+
+   When this parameter is specified by name, ie with the "target="
+   syntax in the configuration file, it consumes the whole rest of the
+   <diskspec>.  Therefore in that case it must come last.  This is
+   permissible even if an empty value for the target was already
+   specifed as a positional parameter.  This is the only way to
+   specify a target string containing metacharacters such as commas
+   and (in some cases) colons, which would otherwise be
+   misinterpreted.
+
+   Future parameter and flag names will start with an ascii letter and
+   contain only ascii alphanumerics, hyphens and underscores, and will
+   not be legal as vdevs.  Targets which might match that syntax
+   should not be specified as positional parameters.
+
+
+format
+------
+
+Description:           Specifies the format of image file.
+Supported values:      raw, qcow, qcow2, vhd
+Deprecated values:     None
+Default value:         raw
+
+
+vdev
 ----
 
 Description:           Virtual device as seen by the guest (also
@@ -60,95 +102,78 @@ Description:           Virtual device as seen by the guest (also
 Supported values:      hd[x], xvd[x], sd[x] etc.  Please refer to the
                        above specification for further details.
 Deprecated values:     None
-Mandatory:             Yes
+Default Value:         None, this parameter is mandatory.
 
-type:
-----
 
-Description:           Qualifies virtual device type.
-Supported values:      cdrom
-Deprecated values:     None
-Mandatory:             No
-
-attrib:
-------
+access
+-------
 
 Description:           Specified access control information.  Whether
                        or not the block device is provided to the
                        guest in read-only or read-write mode depends
                        on this attribute.
-Supported values:      'r', 'w'
+Supported values:      ro, r   (specifies read-only)
+                       rw, w   (specifies read/write)
 Deprecated values:     None
-Mandatory:             Yes
+Default value:         rw
+                       unless devtype=cdrom, in which case r
 
 
---------------
-Example usages
---------------
 
-disk = [ 'vhd:/path/to/dev,hda,w', '/path/to/iso,hdc:cdrom,r' ]
-disk = [ 'path/to/phy/dev,hda,w', '/dev/cdrom,hdc:cdrom,r' ]
-disk = [ 'qcow:/path/to/file,hda,w' ]
-disk = [ 'qcow2:/path/to/file,hda,w', 'raw:/path/to/dev,hdc:cdrom,r' ]
+==========================
+OTHER PARAMETERS AND FLAGS
+==========================
 
 
--------------------------
-Miscellaneous Information
--------------------------
+devtype=<devtype>
+-----------------
 
----------------------
-Deprecated Attributes
----------------------
+Description:           Qualifies virtual device type.
+Supported values:      cdrom
+Deprecated values:     None
+Mandatory:             No
 
-Deprecated values are acceptable and will work the way they did
-earlier except with a warning message printed to the xl log or screen.
-However it's usage is supported purely for backward compatibility
-purpose and not recommended. Also, support for these deprecated
-attributes are likely to be dropped in future versions of xl.
 
-The block-dev-type and access-type deprecated attributes described
-below are prepended to the format attribute.  Example - tap:aio:qcow
-Further details on the deprecated attributes are below:
+cdrom
+-----
 
-block-dev-type:
---------------
+Convenience alias for "devtype=cdrom".
 
-Description:           Specifies the block device type.
-Supported values:      phy,file, tap, tap2
 
-access-type:
------------
+script=<script>
+---------------
+
+Specifies that <target> is not a normal host path, but rather
+information to be interpreted by /etc/xen/scripts/block-<script>.
 
-Description:           Backend implementation option to choose from
-                       while accessing block device.
-                       Example: tap:aio:vhd:/path/to/file
-Supported values:      'aio', 'tapdisk', 'ioemu'
 
----------------------
-Impementation Details
----------------------
 
-Backend Details:
----------------
+==================================
+DEPRECATED PARAMETERS AND PREFIXES
+==================================
 
-For 'phy' block device type, blkback is always used as the backend.
-When the running dom0 instance does not support blkback, block device
-access will fail.  For block device type 'file' with format raw or
-when no format specfied, tapdisk2 is used when present otherwise qemu
-fallback option is used.  For 'file', 'tap' or 'tap2' block device
-type with format 'vhd', only tapdisk2 is used as qemu does not support
-vhd format.  Absence of tapdisk2 support in this case will result in
-failure.  When it comes to image format and how that affects the
-backend choice, for qcow/qcow2 qemu backend is used as tapdisk2 does
-not work with these formats. For raw format image file, tapdisk2 is
-used and when not available qemu backend is used as fallback.  For vhd
-format, as mentioned earlier tapdisk2 is used and tapdisk2
-unavailability will result in failure as qemu fallback option does not
-support vhd file format.
+Deprecated values are acceptable and are intended work compatibly with
+xend and xl from xen 4.1.  In future they may print a warning.
+Support for deprecated parameters and syntaxes are likely to be
+dropped in future versions of xl.
 
+There is also support for a deprecated old syntax for <diskspec>:
 
+  [<format>:][<target>],<vdev>[:<devtype>],<access>   (deprecated)
 
+This syntax also supports deprecated prefixes, described below.  These
+are found prepended to the format parameter - eg "tap:aio:qcow:".
 
+<block-dev-type>:
+-----------------
 
+Description:           Specifies the block device type.
+Supported values:      phy,file, tap, tap2
 
+<access-type>:
+--------------
 
+Description:           Backend implementation option to choose from
+                       while accessing block device.
+                       Example: tap:aio:vhd:/path/to/file
+Supported values:      'aio', 'tapdisk', 'ioemu'
-- 
1.7.2.5

  reply	other threads:[~2011-05-12 14:36 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-12 14:36 [PATCH/RFC 00/14] libxl: disk configuration handling Ian Jackson
2011-05-12 14:36 ` [PATCH 01/14] libxl: add missing copyright notices to some files Ian Jackson
2011-05-12 14:36   ` [PATCH 02/14] libxl: add missing copyright notices to autogenerated files Ian Jackson
2011-05-12 14:36     ` [PATCH 03/14] libxl: provide TOSTRING in libxl_internal.h and libxlu_internal.h Ian Jackson
2011-05-12 14:36       ` [PATCH 04/14] libxl: make libxl_ctx_free tolerate NULL ctx argument Ian Jackson
2011-05-12 14:36         ` [PATCH 05/14] libxl: disks: expose new "script" parameter for external block scripts Ian Jackson
2011-05-12 14:36           ` [PATCH 06/14] libxl: disks: rename disk param "unpluggable" to "removable" Ian Jackson
2011-05-12 14:36             ` [PATCH 07/14] libxl: disks: Make LIBXL_DISK_BACKEND_UNKNOWN work Ian Jackson
2011-05-12 14:36               ` [PATCH 08/14] libxl: disks: new xlu_disk_parse function Ian Jackson
2011-05-12 14:36                 ` [PATCH 09/14] libxl: disks: commit libxlu_disk_l.[ch] flex output Ian Jackson
2011-05-12 14:36                   ` Ian Jackson [this message]
2011-05-12 14:36                     ` [PATCH 11/14] xl: disks: replace config file disk spec parser with call to xlu_disk_parse Ian Jackson
2011-05-12 14:36                       ` [PATCH 12/14] xl: disks: replace block-attach disk config parser with call to xlu_parse_disk Ian Jackson
2011-05-12 14:36                         ` [PATCH 13/14] libxl: disks: allow specification of "backendtype=phy|tap|qdisk" Ian Jackson
2011-05-12 14:36                           ` [PATCH 14/14] xl: xl block-attach -N (dry run) option Ian Jackson
2011-05-13 12:56                             ` Ian Campbell
2011-05-13 12:53                           ` [PATCH 13/14] libxl: disks: allow specification of "backendtype=phy|tap|qdisk" Ian Campbell
2011-06-02 16:57                             ` Ian Jackson
2011-05-12 14:42                         ` [PATCH 12/14] xl: disks: replace block-attach disk config parser with call to xlu_parse_disk Ian Jackson
2011-05-13 12:50                         ` Ian Campbell
2011-05-13 12:49                       ` [PATCH 11/14] xl: disks: replace config file disk spec parser with call to xlu_disk_parse Ian Campbell
2011-05-13 12:45                     ` [PATCH 10/14] docs: update xl-disk-configuration.txt to describe new syntax Ian Campbell
2011-05-18 10:31                       ` Ian Jackson
2011-05-20  9:27                         ` Ian Campbell
2011-05-20 10:21                           ` Ian Jackson
2011-05-20 10:26                             ` Ian Campbell
2011-05-13 10:49                   ` [PATCH 09/14] libxl: disks: commit libxlu_disk_l.[ch] flex output Ian Campbell
2011-05-13 10:48                 ` [PATCH 08/14] libxl: disks: new xlu_disk_parse function Ian Campbell
2011-06-02 16:50                   ` Ian Jackson
2011-05-13 10:38               ` [PATCH 07/14] libxl: disks: Make LIBXL_DISK_BACKEND_UNKNOWN work Ian Campbell
2011-06-02 16:48                 ` Ian Jackson
2011-05-13 10:36             ` [PATCH 06/14] libxl: disks: rename disk param "unpluggable" to "removable" Ian Campbell
2011-05-13 10:35           ` [PATCH 05/14] libxl: disks: expose new "script" parameter for external block scripts Ian Campbell
2011-06-02 16:48             ` Ian Jackson
2011-05-13 10:33 ` [PATCH/RFC 00/14] libxl: disk configuration handling Ian Campbell
2011-06-02 16:57   ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1305211004-31687-11-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).