----- Original Message ----- > From: "Kevin Wolf" <kw...@redhat.com> > To: "Francesco Romani" <from...@redhat.com> > Cc: qemu-devel@nongnu.org, "Stefan Hajnoczi" <stefa...@gmail.com>, > mdr...@linux.vnet.ibm.com, "Luiz Capitulino" > <lcapitul...@redhat.com>, "Stefan Hajnoczi" <stefa...@redhat.com> > Sent: Friday, November 21, 2014 11:11:26 AM > Subject: Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold > reporting for block devices [...] > > 1. I'm running a simple test using the attached script - > > which is a qemu command line adapted from libvirt ouput driven > > by oVirt. There is a way to attach a name at this stage, using a QMP > > command? > > No, node-name is assigned at the BlockDriverState (BDS) creation and > can't be changed later on.
Makes sense to me. > > 2. (related to the former) it seems from a not-so-deep look that the > > blessed (only?) > > way to set a proper node_name is using blockdev-add. > > If so, I'm not sure I follow how the qemu boot flow would look like. > > It will not be anymore as simple as crafting a command line and run the > > qemu, right? > > IIUC some interaction with QMP will be needed (sorry for asking silly > > question, > > trying to fill gaps in my knowledge). > > -drive on the command line can do everything that blockdev-add can do. > So let's assume you have a qcow2 image on a filesystem. Then you end up > with two BDSes, one for the format driver and one for accessing the > filesystem: > > BlockBackend (virtual device) -> qcow2 BDS -> file BDS (raw-posix.c) > > For assigning a node name to the qcow2 BDS, you simply specify it in the > obvious way: > > -drive file=test.qcow2,node-name=foo > > Now if you want to assign a node name to the file BDS as well, you would > get nested dicts in the blockdev-add call. In -drive a dot syntax is > used to represent this: > > -drive file=test.qcow2,node-name=foo,file.node-name=bar > > Are things a bit clearer with this? Yes, thanks a lot. I was a bit misleaded by the lack of the reference (after a very quick look) in the man page. Maybe the manpage is out of date, but this is a different story -and maybe a different patch :) New revision will come in a few days. Bests, -- Francesco Romani RedHat Engineering Virtualization R & D Phone: 8261328 IRC: fromani