• Tomoki Sekiyama's avatar
    qga: Add guest-get-fsinfo command · 46d4c572
    Tomoki Sekiyama authored
    Add command to get mounted filesystems information in the guest.
    The returned value contains a list of mountpoint paths and
    corresponding disks info such as disk bus type, drive address,
    and the disk controllers' PCI addresses, so that management layer
    such as libvirt can resolve the disk backends.
    For example, when `lsblk' result is:
        sdb              8:16   0    1G  0 disk
        `-sdb1           8:17   0 1024M  0 part
          `-vg0-lv0    253:1    0  1.4G  0 lvm  /mnt/test
        sdc              8:32   0    1G  0 disk
        `-sdc1           8:33   0  512M  0 part
          `-vg0-lv0    253:1    0  1.4G  0 lvm  /mnt/test
        vda            252:0    0   25G  0 disk
        `-vda1         252:1    0   25G  0 part /
    where sdb is a SCSI disk with PCI controller 0000:00:0a.0 and ID=1,
          sdc is an IDE disk with PCI controller 0000:00:01.1, and
          vda is a virtio-blk disk with PCI device 0000:00:06.0,
    guest-get-fsinfo command will return the following result:
          {"name":"vda1", "mountpoint":"/",
    In Linux guest, the disk information is resolved from sysfs. So far,
    it only supports virtio-blk, virtio-scsi, IDE, SATA, SCSI disks on x86
    hosts, and "disk" parameter may be empty for unsupported disk types.
    Signed-off-by: default avatarTomoki Sekiyama <tomoki.sekiyama@hds.com>
    *updated schema to report 2.2 as initial supported version
    Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
qapi-schema.json 19.5 KB