redhat-based EL9 distros not supported?
Prior to Enterprise Linux 9, it seems some Red Hat based distros returned "redhat-based" for inspect-get-distro This allowed things like "virt-customize --firstboot-command" to work as this matched the supported distro list, e.g. | "fedora"|"rhel"|"centos"|"scientificlinux"|"oraclelinux"|"redhat-based" However, it seems some distros, e.g. Rocky9 and AlmaLinux9 are now returning "rocky"/"almalinux" for inspect-get-distro When using virt-install and then virt-customize, I am seeing issues like the following: [Rocky9]$ virt-customize -a disk.qcow2 --firstboot-command /tmp/bootstrap [ 0.0] Examining the guest ... [ 17.1] Setting a random seed [ 17.3] Installing firstboot command: /tmp/bootstrap virt-customize: error: guest type rocky is not supported Is there some way to return "redhat-based" again for inspect-get-distro or does the distro list matching need to be updated? I possibly updated the OS database (osinfo-query os) to support newer OS - is this related to this problem? Harry Harry Bryson | Software Engineer Harry.Bryson@corero.com <mailto:Harry.Bryson@corero.com> 53 Hanover Street, Edinburgh, EH2 2PJ United Kingdom Access Corero Network Security?s Privacy Policy here <www.corero.com/privacy>. We are Corero Network Security plc (?Corero?), registered in England and Wales, with registered company number 02662978, registered office address Regus House Highbridge, Oxford Road, Uxbridge, Middlesex, UB8 1HR. Corero is the parent company for Corero Network Security, Inc. and Corero Network Security (UK) Ltd (a company registered in England and Wales with registered number 04047090, with the same registered office address as above) For information about how we process your data, or to manage your data preferences, click here <info.corero.com/data-preferences.html>.
On Fri, Oct 07, 2022 at 04:33:01PM +0000, Harry Bryson wrote:
Prior to Enterprise Linux 9, it seems some Red Hat based distros returned "redhat-based" for inspect-get-distro This allowed things like "virt-customize --firstboot-command" to work as this matched the supported distro list, e.g.
| "fedora"|"rhel"|"centos"|"scientificlinux"|"oraclelinux"|"redhat-based"
However, it seems some distros, e.g. Rocky9 and AlmaLinux9 are now returning "rocky"/"almalinux" for inspect-get-distro When using virt-install and then virt-customize, I am seeing issues like the following:
[Rocky9]$ virt-customize -a disk.qcow2 --firstboot-command /tmp/bootstrap [ 0.0] Examining the guest ... [ 17.1] Setting a random seed [ 17.3] Installing firstboot command: /tmp/bootstrap virt-customize: error: guest type rocky is not supported
This is just a bug. For reference what versions of libguestfs & guestfs-tools are you using?
Is there some way to return "redhat-based" again for inspect-get-distro or does the distro list matching need to be updated? I possibly updated the OS database (osinfo-query os) to support newer OS - is this related to this problem?
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
[Rocky9]$ virt-customize -a disk.qcow2 --firstboot-command /tmp/bootstrap [ 0.0] Examining the guest ... [ 17.1] Setting a random seed [ 17.3] Installing firstboot command: /tmp/bootstrap virt-customize: error: guest type rocky is not supported
This is just a bug. For reference what versions of libguestfs & guestfs-tools are you using?
Just the native EL9 versions $ rpm -q libguestfs guestfs-tools libguestfs-1.46.1-4.el9_0.alma.x86_64 guestfs-tools-1.46.1-6.el9.0.1.x86_64 (I am running on AlmaLinux9/Rocky9 as well) Not sure if this is the correct fix, but I test patched the distro matching and it seemed to fix this. (Although virt-builder did not link cleanly - fPIE ?) Thanks! Harry [cid:Corero-C-Emblem-Logo_45d4852f-9c54-43bf-890a-87cc840a4439.png]<https://www.corero.com/> Harry Bryson | Software Engineer [cid:1.Email-icon_26b8c770-e81e-4f66-a563-df28e00684aa.png] Harry.Bryson@corero.com<mailto:Harry.Bryson@corero.com> [cid:3.Map-icon_41ce7b53-a7ba-45b0-a0f5-984216110856.png] 53 Hanover Street, Edinburgh, EH2 2PJ United Kingdom [cid:4.Website-icon_66f93fb0-fb56-42b8-879c-68b071f492af.png]<https://www.corero.com>[cid:5.LinkedIn-icon_71e7bc7c-e732-410a-898f-d7fd45115cd4.png]<https://www.linkedin.com/company/corero>[cid:6.Twitter-icon_24fc5112-78a4-4303-af64-9ef3ec89fc44.png]<https://twitter.com/corero>[cid:7.Facebook-icon_a3c6fd35-9f1a-4019-951e-0763954abc5c.png]<https://www.facebook.com/corero.inc/>[cid:8.Youtube-icon_cd676141-8f09-4e1b-893d-da9b396d3d00.png]<https://www.youtube.com/user/corerosecurity/> Access Corero Network Security's Privacy Policy here<https://www.corero.com/privacy>. We are Corero Network Security plc ("Corero"), registered in England and Wales, with registered company number 02662978, registered office address Salisbury House, 29 Finsbury Circus, London, EC2M 5QQ. Corero is the parent company for Corero Network Security, Inc. and Corero Network Security (UK) Ltd (a company registered in England and Wales with registered number 04047090, with the same registered office address as above) For information about how we process your data, or to manage your data preferences, click here<https://info.corero.com/data-preferences.html>.
On Mon, Oct 10, 2022 at 08:51:00AM +0000, Harry Bryson wrote:
[Rocky9]$ virt-customize -a disk.qcow2 --firstboot-command /tmp/bootstrap [ 0.0] Examining the guest ... [ 17.1] Setting a random seed [ 17.3] Installing firstboot command: /tmp/bootstrap virt-customize: error: guest type rocky is not supported
This is just a bug. For reference what versions of libguestfs & guestfs-tools are you using?
Just the native EL9 versions $ rpm -q libguestfs guestfs-tools libguestfs-1.46.1-4.el9_0.alma.x86_64 guestfs-tools-1.46.1-6.el9.0.1.x86_64 (I am running on AlmaLinux9/Rocky9 as well)
What does Alma (as a guest image) return for inspect-get-distro? As far as I can tell we don't really support it in libguestfs so far. Anyway the attached patches should fix the issue for Rocky guest images, although it's not really long-term supportable to keep adding distros like this, we'll have to think of a better way. The bug is: https://bugzilla.redhat.com/show_bug.cgi?id=2133443
Not sure if this is the correct fix, but I test patched the distro matching and it seemed to fix this. (Although virt-builder did not link cleanly - fPIE ?)
You probably need to configure with: ./configure CFLAGS="-O2 -fPIC -g" (or alternatively just rebuild from the CentOS SRPM) Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com nbdkit - Flexible, fast NBD server with plugins https://gitlab.com/nbdkit/nbdkit
What does Alma (as a guest image) return for inspect-get-distro? As far as I can tell we don't really support it in libguestfs so far.
I checked with GenericCloud images (in case it was related to the images I was building with kickstart) http://185.231.100.123/rocky-linux/9/images/x86_64/Rocky-9-GenericCloud-9.0-... https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/AlmaLinux-9-Gener... It looks like the issue is only with Rocky.
<fs> inspect-os /dev/sda5 <fs> inspect-get-distro /dev/sda5 rocky
<fs> inspect-os /dev/sda4 <fs> inspect-get-distro /dev/sda4 redhat-based
I assumed it would also affect AlmaLinux since it affected Rocky - sorry! (Not sure if related but I tested this on AlmaLinux host)
Anyway the attached patches should fix the issue for Rocky guest images, although it's not really long-term supportable to keep adding distros like this, we'll have to think of a better way.
Thanks! Harry [cid:Corero-C-Emblem-Logo_45d4852f-9c54-43bf-890a-87cc840a4439.png]<https://www.corero.com/> Harry Bryson | Software Engineer [cid:1.Email-icon_26b8c770-e81e-4f66-a563-df28e00684aa.png] Harry.Bryson@corero.com<mailto:Harry.Bryson@corero.com> [cid:3.Map-icon_41ce7b53-a7ba-45b0-a0f5-984216110856.png] 53 Hanover Street, Edinburgh, EH2 2PJ United Kingdom [cid:4.Website-icon_66f93fb0-fb56-42b8-879c-68b071f492af.png]<https://www.corero.com>[cid:5.LinkedIn-icon_71e7bc7c-e732-410a-898f-d7fd45115cd4.png]<https://www.linkedin.com/company/corero>[cid:6.Twitter-icon_24fc5112-78a4-4303-af64-9ef3ec89fc44.png]<https://twitter.com/corero>[cid:7.Facebook-icon_a3c6fd35-9f1a-4019-951e-0763954abc5c.png]<https://www.facebook.com/corero.inc/>[cid:8.Youtube-icon_cd676141-8f09-4e1b-893d-da9b396d3d00.png]<https://www.youtube.com/user/corerosecurity/> Access Corero Network Security's Privacy Policy here<https://www.corero.com/privacy>. We are Corero Network Security plc ("Corero"), registered in England and Wales, with registered company number 02662978, registered office address Salisbury House, 29 Finsbury Circus, London, EC2M 5QQ. Corero is the parent company for Corero Network Security, Inc. and Corero Network Security (UK) Ltd (a company registered in England and Wales with registered number 04047090, with the same registered office address as above) For information about how we process your data, or to manage your data preferences, click here<https://info.corero.com/data-preferences.html>.
The fix is upstream in 8858fc63e6 and will be in CentOS Stream soon. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
participants (2)
-
Harry Bryson -
Richard W.M. Jones