[virt-tools-list] [virt-manager PATCH] virt-install: add --partition support for resource partitioning

Cole Robinson crobinso at redhat.com
Wed May 28 12:18:19 UTC 2014


On 05/27/2014 10:54 PM, Chen Hanxiao wrote:
> This patch will enable setting resource partitioning configuration.
> 
> Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> ---
>  man/virt-install.pod                                        |  6 ++++++
>  .../cli-test-xml/compare/virt-xml-edit-simple-partition.xml | 10 ++++++++++
>  tests/clitest.py                                            |  1 +
>  tests/xmlparse-xml/change-guest-out.xml                     |  3 +++
>  tests/xmlparse.py                                           |  1 +
>  virtinst/cli.py                                             | 13 +++++++++++++
>  virtinst/guest.py                                           |  3 ++-
>  7 files changed, 36 insertions(+), 1 deletion(-)
>  create mode 100644 tests/cli-test-xml/compare/virt-xml-edit-simple-partition.xml
> 
> diff --git a/man/virt-install.pod b/man/virt-install.pod
> index 8aa7ead..f1d44c2 100644
> --- a/man/virt-install.pod
> +++ b/man/virt-install.pod
> @@ -129,6 +129,12 @@ Specify events values for the guest. Possible options include on_poweroff, on_re
>  
>  Use --events=? to see a list of all available sub options. Complete details at L<http://libvirt.org/formatdomain.html#elementsEvents>
>  
> +=item --partition=VAL
> +
> +Specify resource partitioning values for the guest.
> +
> +Use --partition=? to see a list of all available sub options. Complete details at L<http://libvirt.org/formatdomain.html#resPartition>
> +

Hmm. I realize that libvirt only exposes /domain/resource/partition, and the
docs are called resPartition, etc. But --partition is a potentially misleading
name, my first thought is 'disk partition'. And if anything else is ever added
to the <resource> XML block, we are kind of stuck with the --partition syntax.

So I suggest making it

--resource partition=/foo/bar

In practice very few people are likely to use this option so it's okay if they
have to do more typing :)

Thanks,
Cole




More information about the virt-tools-list mailing list