[virt-what] AWS bug
Stuart Cooper
stuart.mic.cooper at microfocus.com
Tue May 25 13:45:44 UTC 2021
virt-what version : 1.18.4.el7 (CentOS)
Although this is a somewhat older version of virt-what I did take a look at the latest 1.21 and the issue persists
I have noticed a bug with virt-what mis-reporting in AWS. The upshot is that it reports as
xen
xen-hvm
only. I took a look at the code and the dmi responses on the systems that were “failing” and found the following.
# Check for AWS
if echo "$dmi" | grep -q 'Version: [0-9]\.[0-9]\.amazon'; then
echo aws
fi
AWS has since updated its versions :
BIOS Information
Vendor: Xen
Version: 4.11.amazon
…
System Information
Manufacturer: Xen
Product Name: HVM domU
Version: 4.11.amazon
Obviously the above pattern match will not succeed. I have updated my virt-what to
# Check for AWS
if echo "$dmi" | grep -q 'Version: [0-9]*\.[0-9]*\.amazon'; then
echo aws
fi
Which restores the output I am expecting
xen
xen-hvm
aws
but wanted to report this back to the project to get a proper fix for all. I’m aware that the * may add a bit too much scope but [0-9][0-9] may also be too restrictive for the future.
Regards,
Stuart Cooper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20210525/c4762d6c/attachment.htm>
More information about the virt-tools-list
mailing list