On Thu, Jul 30, 2009 at 10:54:40AM +0100, Matthew Booth wrote:
On 30/07/09 09:38, Richard W.M. Jones wrote:
>> What is the contract of list_devices supposed to be?
>
> My expectation has been that it would list the devices which were
> added using add_drive* / add_cdrom calls. Certainly not that it would
> list those devices, plus some other random devices that qemu pulled
> out of thin air.
>
> We (sorta) enforced this contract by adding an explicit test that this
> was the case, and this test started to break when we had a version of
> qemu which was adding its own random CD-ROM device.
We already know without interrogation which devices we intended to be
added. Presumably, then, list_devices is giving us some additional,
guest specific information.
Would it not be more robust to iterate over the list of expected devices
looking for them explicitly and individually in the guest?
Unfortunately we don't know this .. We expose the full qemu command
line via
http://libguestfs.org/guestfs.3.html#guestfs_config .
Rich.
--
Richard Jones, Emerging Technologies, Red Hat
http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top