qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 12/14] qapi: introduce change-blockdev


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 12/14] qapi: introduce change-blockdev
Date: Thu, 25 Aug 2011 15:47:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

Am 25.08.2011 14:56, schrieb Anthony Liguori:
> On 08/25/2011 07:46 AM, Kevin Wolf wrote:
>> Am 24.08.2011 20:43, schrieb Anthony Liguori:
>>> A new QMP only command to change the blockdev associated with a block 
>>> device.
>>> The semantics of change right now are just plain scary.  This command 
>>> introduces
>>> sane semantics.  For more details, see the documentation in the schema file.
>>
>> Changes to semantics should be mentioned in the commit message, and in
>> more detail than just that they are sane (the documentation in the
>> schema file doesn't describe differences to the old command).
> 
> Right, but the schema describes the old command.
> 
> There are a couple major differences with the new command vs old:
> 
> 1) If you had a block device named 'vnc', the old command is broken.
> 
> 2) For an encrypted device, the old change command returns an error but 
> has semantically completed the operation.  The usage is:
> 
> (qemu) change ide0 foo.img
> Error: device ide0 is encrypted
> (qemu) block_passwd ide0 secret
> 
> Because even though an error is returned, the change operation has 
> actually succeeded.  The new command has transactional semantics.  If an 
> error is returned, nothing has happened.  To set passwords, an 
> additional option is supported to specify the password.  So you would do:
> 
> (qemu) change-blockdev ide0 foo.img
> Error: device ide0 is encrypted
> (qemu) change-blockdev ide0 foo.img secret
> (qemu)

Does it really work like this? We need to improve the HMP implementation
to ask for the password when needed instead of requiring users to put it
as plain text in their command.

> In addition, change-blockdev will not allow you to perform unsafe 
> probing.  You can only change to a raw device if you specify a raw format.

Makes sense for QMP, but I would consider it a bug for HMP. So HMP code
should deal with it and allow using raw without specifying the format.

qemu is getting worse and worse to use without a management tool. :-(

Kevin



reply via email to

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