automatically starting KVM

Joel W. Shea jwshea at gmail.com
Wed Dec 30 01:11:30 AEDT 2015


On Tue, Dec 29, 2015 at 02:24:39PM +1100, Trent W. Buck wrote:
>
> On 27/12/2015 6:57 PM, Andrew McGlashan wrote:
> >
> > virsh is very simple, no XML editing required.
> 
> Without using "virsh edit" or "virsh dumpxml", how do you do things
> like...

I would also argue that virsh's CLI isn't that simple, either. Given
that there are 223 commands across 12 groups, each with their own set of
arguments and options. Often with an inconsistent interfaces, e.g.

+ list, <command>-list, <command>list, <command> --list

+ which take individual --options to filter results (rather than one
  --filter option, or not at all, and just pipe to a filter command)

+ Separate commands for essentially the same function, could be
  condensed into one command with options; e.g. define, create,
  create-as, create-from, 

+ vol-* commands take either a <vol> or <pool> argument, many commands
  to display vol attributes, rather than one command with options, or
  filters

+ blkdeviotune vs blkiotune vs block* commands

+ Some commands take XML file as an argument, but others to print the
  XML configuration

+ Probably some more I've forgotten, or haven't noticed.

Although the following would be more verbose, it would go a long way
towards consistency, using a "command verb object options" pattern;

$ virsh create [domain|volume|etc] --name <name> <options>
$ virsh create domain --file <xml-file>
$ virsh info domain <domain> --dumpxml <xml-file>
$ virsh create snapshot <domain>
$ virsh clone volume <volume> [options]
$ virsh list network --filter active [options]
$ virsh edit [domain|network|pool|etc]

Just a thought... any one else think that'd be a good idea?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.luv.asn.au/pipermail/luv-main/attachments/20151230/d0e04584/attachment.sig>


More information about the luv-main mailing list