qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH] Add interactive mode to qemu-img command


From: Programmingkid
Subject: Re: [Qemu-block] [PATCH] Add interactive mode to qemu-img command
Date: Tue, 31 Jul 2018 09:27:22 -0400

> On Jul 31, 2018, at 6:48 AM, Kevin Wolf <address@hidden> wrote:
> 
> Am 30.07.2018 um 22:27 hat Programmingkid geschrieben:
>> On Jul 30, 2018, at 3:39 PM, Max Reitz <address@hidden> wrote:
>>> On 2018-07-30 21:14, John Arbuckle wrote:
>>> What comes to my mind is this: Why don't you write a front-end for
>>> qemu-img?  It'd be trivial to write a script that performs the
>>> interactive mode, offers nice features such as tab completion (because
>>> you can write it in a scripting language, which makes such things easy),
>>> and then feeds the result to qemu-img.
>> 
>> Interesting idea. A cross platform solution could be made using something
>> like Tkinter. 
>> 
>>> The drawback of course is the following: It wouldn't be in qemu-img.  So
>>> you'd need "advertising" for it.  Putting it in the qemu source tree
>>> would be a bit out of the question, because it'd basically be a
>>> management tool, so it should be separate.  And when we're talking about
>>> management tools...  Well, there are already management tools that allow
>>> you image creation with bells and whistles, so, well.
> 
> We do have things like the QMP shell in scripts/, so I don't think
> having this script in the QEMU git tree is completely out of question,
> but I agree that it's not obvious that we should do it.
> 
>> I got the idea of the interactive mode from bochs. It has a very extensive
>> set of options that it walks the user thru. I really liked how complete
>> it was. A management tool would be helpful to the user, but it wouldn't
>> be included with qemu-img. That was my goal.
> 
> That's my biggest problem with your approach: It's not complete at all.
> It only provides the most basic options without which image creation
> would fail.

The three questions are enough to make an image file. I made a image file 
of each of the formats that are listed in the patch.

> But the real advantage in an interactive user interface would be to make
> advanced options more discoverable. All of them. As long as you don't
> provide that, it's useless.

I won't say useless. There are plenty of people who use it to create image
files. But it is very limited in what it can do interactively. Having the
user be able to select any one of the commands available to qemu-img 
would make this patch more useful.

> Everybody knows how to do the basic
> 'qemu-img create -f qcow2 test.qcow2 8G' (and if they don't, they'll
> know after reading the help text or searching the internet for 10
> seconds).

I want to make qemu-img easy enough to use that googling how to use it
becomes a thing of the past.

> Also, it's completely unclear to me why 'qemu-img' without any arguments
> should mean creating an image and not one of the other operations.

I agree now. This patch should provide the user with the full list of 
commands available.

> 
> Kevin

Thank you for reviewing my patch.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]