[virt-what] AWS bug

Stuart Cooper stuart.mic.cooper at microfocus.com
Wed May 26 10:49:25 UTC 2021


Hi Rich,

Tested the patch on AWS versions that I can see : 4.2 and 4.11.  
It's returning expected results on both
	xen
	xen-hvm
	aws

Nice easy fix to start the day :)

Regards,

Stuart

-----Original Message-----
From: Richard W.M. Jones <rjones at redhat.com> 
Sent: Wednesday, May 26, 2021 11:34 AM
To: Stuart Cooper <stuart.mic.cooper at microfocus.com>
Cc: virt-tools-list at redhat.com; hanxiaobupt at bupt.edu.cn
Subject: Re: [virt-what] AWS bug

On Tue, May 25, 2021 at 01:45:44PM +0000, Stuart Cooper wrote:
> 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

[See also other thread on this mailing list]

>     # 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

Ah yes that's a bug.  Can you try out this fix:

http://git.annexia.org/?p=virt-what.git;a=commit;h=b1eae421ff3fdbac0f9ec5b300259c16ff7b1d93

>     # Check for AWS
>     if echo "$dmi" | grep -q 'Version: [0-9]*\.[0-9]*\.amazon'; then
>         echo aws
>     fi
...
> 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.

Yeah I think + is better than *

Thanks,

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html





More information about the virt-tools-list mailing list