Bug 1949486
Summary: | Expose disk serial number in virDomainGetGuestInfo() | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Michal Privoznik <mprivozn> |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
Status: | CLOSED ERRATA | QA Contact: | Lili Zhu <lizhu> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 8.5 | CC: | jdenemar, lmen, virt-maint, xuzhang |
Target Milestone: | rc | Keywords: | Triaged, Upstream |
Target Release: | 8.5 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-7.3.0-1.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-11-16 07:52:40 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | 7.3.0 |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1919857 |
Description
Michal Privoznik
2021-04-14 12:07:02 UTC
Merged upstream as: commit 3bf8dfd56faedd23cce9ec1b723b7f167817a94b Author: Michal Prívozník <mprivozn> AuthorDate: Wed Apr 14 10:09:35 2021 +0200 Commit: Michal Prívozník <mprivozn> CommitDate: Wed Apr 14 13:56:09 2021 +0200 qemu: Expose disk serial in virDomainGetGuestInfo() When querying guest info via virDomainGetGuestInfo() the 'guest-get-disks' agent command is called. It may report disk serial number which we parse, but never report nor use for anything else. As it turns out, it may help management application find matching disk in their internals. Signed-off-by: Michal Privoznik <mprivozn> Reviewed-By: Tomáš Golembiovský <tgolembi> Reviewed-by: Peter Krempa <pkrempa> v7.2.0-187-g3bf8dfd56f Verify this bug with: libvirt-daemon-7.3.0-1.module+el8.5.0+11004+f4810536.x86_64 1. prepare a guest with guest agent device # virsh list --all Id Name State -------------------------------- 14 avocado-vt-vm1 running 2. attach a disk with serial num # virsh attach-disk avocado-vt-vm1 /var/lib/libvirt/images/a.img vdb --serial ytriet Disk attached successfully 3. check the serial num of the attached disk # virsh guestinfo avocado-vt-vm1 --disk disk.count : 6 disk.0.name : /dev/vda1 disk.0.partition : yes disk.0.dependency.count: 1 disk.0.dependency.0.name: /dev/vda disk.1.name : /dev/vda2 disk.1.partition : yes disk.1.dependency.count: 1 disk.1.dependency.0.name: /dev/vda disk.2.name : /dev/vda disk.2.partition : no disk.2.serial : WD-WMAP9A966149 disk.2.alias : vda disk.3.name : /dev/dm-0 disk.3.partition : no disk.3.dependency.count: 1 disk.3.dependency.0.name: /dev/vda2 disk.3.guest_alias : rhel-root disk.4.name : /dev/vdb disk.4.partition : no disk.4.serial : ytriet <== serial number been reported disk.4.alias : vdb disk.5.name : /dev/dm-1 disk.5.partition : no disk.5.dependency.count: 1 disk.5.dependency.0.name: /dev/vda2 disk.5.guest_alias : rhel-swap As the testing result matches with the expected result, marked the bug as verified Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (virt:av bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:4684 |