Hi all.
I'm curious about the output order of virsh guestinfo --filesystem.
Is the output random?
E.g
Guest info
```
[root@localhost ~]# lsblk -Jp -o KNAME,FSTYPE,TYPE,MOUNTPOINT,PKNAME,SERIAL
{
"blockdevices": [
{"kname": "/dev/sr0", "fstype": null,
"type": "rom",
"mountpoint": null, "pkname": null, "serial":
"drive-scsi0-0-0-0"},
{"kname": "/dev/vda", "fstype": null,
"type": "disk",
"mountpoint": null, "pkname": null, "serial": null},
{"kname": "/dev/vda1", "fstype": "vfat",
"type": "part",
"mountpoint": "/boot/efi", "pkname": "/dev/vda",
"serial": null},
{"kname": "/dev/vda2", "fstype": "xfs",
"type": "part",
"mountpoint": "/boot", "pkname": "/dev/vda",
"serial": null},
{"kname": "/dev/vda3", "fstype":
"LVM2_member", "type": "part",
"mountpoint": null, "pkname": "/dev/vda",
"serial": null},
{"kname": "/dev/vdb", "fstype": null,
"type": "disk",
"mountpoint": null, "pkname": null, "serial": null},
{"kname": "/dev/vdb1", "fstype": "xfs",
"type": "part",
"mountpoint": "/mnt/test1", "pkname": "/dev/vdb",
"serial": null},
{"kname": "/dev/vdb2", "fstype": "xfs",
"type": "part",
"mountpoint": "/mnt/test2", "pkname": "/dev/vdb",
"serial": null},
{"kname": "/dev/vdb3", "fstype": "xfs",
"type": "part",
"mountpoint": "/mnt/test3", "pkname": "/dev/vdb",
"serial": null},
{"kname": "/dev/dm-0", "fstype": "xfs",
"type": "lvm",
"mountpoint": "/", "pkname": "/dev/vda3",
"serial": null},
{"kname": "/dev/dm-1", "fstype": "swap",
"type": "lvm",
"mountpoint": "[SWAP]", "pkname": "/dev/vda3",
"serial": null}
]
}
```
virsh guestinfo output.
It is not sorted by name or total-bytes/used-bytes
```
[root@hpe-apollo80-01-n00 ~]# virsh guestinfo fj-kvm-vm --filesystem
fs.count : 6
fs.0.name : dm-0
fs.0.mountpoint : /
fs.0.fstype : xfs
fs.0.total-bytes : 7946108928
fs.0.used-bytes : 3202314240
fs.0.disk.count : 1
fs.0.disk.0.alias : vda
fs.0.disk.0.device : /dev/vda3
fs.1.name : vda2
fs.1.mountpoint : /boot
fs.1.fstype : xfs
fs.1.total-bytes : 1063256064
fs.1.used-bytes : 180252672
fs.1.disk.count : 1
fs.1.disk.0.alias : vda
fs.1.disk.0.device : /dev/vda2
fs.2.name : vda1
fs.2.mountpoint : /boot/efi
fs.2.fstype : vfat
fs.2.total-bytes : 627900416
fs.2.used-bytes : 7065600
fs.2.disk.count : 1
fs.2.disk.0.alias : vda
fs.2.disk.0.device : /dev/vda1
fs.3.name : vdb2
fs.3.mountpoint : /mnt/test2
fs.3.fstype : xfs
fs.3.total-bytes : 204111872
fs.3.used-bytes : 12185600
fs.3.disk.count : 1
fs.3.disk.0.alias : vdb
fs.3.disk.0.device : /dev/vdb2
fs.4.name : vdb3
fs.4.mountpoint : /mnt/test3
fs.4.fstype : xfs
fs.4.total-bytes : 751706112
fs.4.used-bytes : 39084032
fs.4.disk.count : 1
fs.4.disk.0.alias : vdb
fs.4.disk.0.device : /dev/vdb3
fs.5.name : vdb1
fs.5.mountpoint : /mnt/test1
fs.5.fstype : xfs
fs.5.total-bytes : 99254272
fs.5.used-bytes : 6213632
fs.5.disk.count : 1
fs.5.disk.0.alias : vdb
fs.5.disk.0.device : /dev/vdb1
```
--
Best Regards.
Yiding Liu