Re: [PATCH] virsh: add --start option to the define command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 8, 2013 at 5:41 PM, Eric Blake <eblake@xxxxxxxxxx> wrote:
> On 01/08/2013 02:36 PM, Doug Goldstein wrote:
>> I often find myself doing virsh "define blah.xml; start blah". I figured
>> adding this would be a easier^Hlazier way to do it.
>> ---
>>  tools/virsh-domain.c |   20 ++++++++++++++++++--
>>  1 files changed, 18 insertions(+), 2 deletions(-)
>
> Offhand, I like it.  However,
>
> We have virDomainDefineXML with no flags, but we have virDomainCreateXML
> with flags; maybe the better approach is to add a new creation flag that
> says that in addition to starting the domain, we also make it persistent
> at the same time.
>
> But if we do that, it would argue that 'virsh create --persistent
> blah.xml' is nicer than 'virsh define --start blah.xml', at least in
> that the former needs only 1 API call for new libvirt (but falls back to
> 2 API calls when talking to older libvirt), while the latter always
> needs 2 API calls.
>
> Or maybe it means we need to add virDomainDefineXMLFlags().
>
> Anyone else want to throw some paint on the bikeshed on how best to make
> the user experience nicer?
>

I'm good with either. Honestly from an ease of use, virsh create
--persistent might make more sense. Just trying to think of how I have
to support libvirt use by the other engineers in the office. I'll
resubmit the patch shortly.

To go off on a tangent a bit, it feels like sometimes we're hindered
with virsh by compatibility. Originally the interface was more aligned
to demo the API of libvirt but now we're leaning towards more user
friendly use. I've kicked around in my head hashing out a virsh 2.0
command line that would be more inline with end users and not
necessarily libvirt API users.

-- 
Doug Goldstein

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]