qemu-discuss
[Top][All Lists]
Advanced

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

Re: query-block command is missing device name. Deprecated?


From: Max Reitz
Subject: Re: query-block command is missing device name. Deprecated?
Date: Tue, 4 Feb 2020 12:29:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 31.01.20 05:06, Mike Lee wrote:
> Hello All,

Hi Mike,

Most of the changes you’re seeing are probably due to libvirt using node
names to create block devices now.  So every node in the block graph
(e.g. a file node to read a file from the normal filesystem, or a qcow2
node to interpret the qcow2 format) is now created explicitly by
libvirt, and every such node needs a node name.

Before this (very recent) change, libvirt used -drive (I think), which
either creates a guest device along with an attached full block node
tree, or just the tree without the device – but that tree still gets a
name as whole, and that was the name shown by query-block.  (The guest
device name is shown under @qdev.)

With libvirt now using -blockdev instead of -drive and thus creating
single block nodes, there is no such tree name anymore.  That’s why it’s
shown as empty.

> IN CLOSING:
> 1.) I suspect the error I get when starting the backup is simply a bug.
> Am I correct in assuming this, since the backup actually starts?  If
> I'm wrong what do I need to change to not get the error?

This is also related to the libvirt change described above.  You used to
have to specify the tree name (generally called “device name” in QAPI),
but now there is no such name.  As such, you have to specify the node
name now.  You did that, but you also need to specify a job-id then.

The documentation isn’t really clear about this, but job-id will only
default to the device name, not to what @device says.  There is no
device name (or “tree name”, as I’ve called it above), so it cannot
default to anything.  Hence the error message, that an empty job ID is
not permissible.

So long story short, you need to specify something for @job-id.  (And
then all further job commands/events will use that for their respective
@device field.  That will be a bit confusing, but, well, we had to for
compatibility.)

> 2.) Has the "device" attribute in the "query-block" command been
> deprecated and is that why that attribute's value is now blank?  I've
> gone back through all of the QEMU release notes and see no mention of
> this.  

It hasn’t, but when using -blockdev instead of -drive for block devices,
it will be empty.  (And libvirt does use -blockdev now.)

> 3.) What's with the "libvirt-X-format" node name?  The "drive-virtio-
> diskX" seemed more logical.  Is this naming change a libvirt thing and
> not qemu?

That has the same reason, libvirt now uses -blockdev, so it specifies
node names.  “libvirt-X-format” looks like a typical node name (“format”
is a type of node that interprets image formats, like qcow2 or raw),
whereas “drive-virtio-diskX” seems like a name for a whole tree of block
nodes (i.e., a device name).

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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