
Hello, I would like to know if this behavior is normal. When I create a VM locally using the virt-install command with the argument --osinfo detect=on, it works perfectly and detects the operating system version. However, when I try to do it remotely using virt-install --connect=qemu+tcp://x.x.x.x/system, the following error appears: `--os-variant/--osinfo OS name is required, but no value was set or detected. This is now a fatal error. Specifying an OS name is required for modern, performant, and secure virtual machine defaults. If you expected virt-install to detect an OS name from the install media, you can set a fallback OS name with: --osinfo detect=on,name=OSNAME You can see a full list of possible OS name values with: virt-install --osinfo list If your Linux distro is not listed, try one of generic values such as: linux2024, linux2022, linux2020, linux2018, linux2016 If you just need to get the old behavior back, you can use: --osinfo detect=on,require=off Or export VIRTINSTALL_OSINFO_DISABLE_REQUIRE=1` Both the host machine and the client PC have osinfo updated to the latest version as of today. If I execute the command with --os-variant, it works correctly when done remotely. Is there a way to make it detect the operating system automatically when connected remotely? I’m using libvirtd (libvirt) 10.10.0 on Debian 12. Best regards, and thank you.

On Sat, Jan 25, 2025 at 05:28:59AM -0000, rodrigoprieto2019@gmail.com wrote:
Hello, I would like to know if this behavior is normal. When I create a VM locally using the virt-install command with the argument --osinfo detect=on, it works perfectly and detects the operating system version. However, when I try to do it remotely using virt-install --connect=qemu+tcp://x.x.x.x/system, the following error appears:
`--os-variant/--osinfo OS name is required, but no value was set or detected.
snip
Is there a way to make it detect the operating system automatically when connected remotely?
Operating system detection works by reading the PVD metadata from the header of the ISO image, and then matching values found against the libosinfo database entries. In a remote connection, virt-install can not directly read the ISO image headers, and thus cannot do OS detection. In theory we could enhance virt-install to use the libvirt storage pools to read the ISO image, but that needs someone todo the work.... With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Thank you for your response. Everything is very detailed. Best regards. El lun., 27 de enero de 2025 06:30, Daniel P. Berrangé <berrange@redhat.com> escribió:
On Sat, Jan 25, 2025 at 05:28:59AM -0000, rodrigoprieto2019@gmail.com wrote:
Hello, I would like to know if this behavior is normal. When I create a VM locally using the virt-install command with the argument --osinfo detect=on, it works perfectly and detects the operating system version. However, when I try to do it remotely using virt-install --connect=qemu+tcp://x.x.x.x/system, the following error appears:
`--os-variant/--osinfo OS name is required, but no value was set or detected.
snip
Is there a way to make it detect the operating system automatically when connected remotely?
Operating system detection works by reading the PVD metadata from the header of the ISO image, and then matching values found against the libosinfo database entries. In a remote connection, virt-install can not directly read the ISO image headers, and thus cannot do OS detection.
In theory we could enhance virt-install to use the libvirt storage pools to read the ISO image, but that needs someone todo the work....
With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (3)
-
Daniel P. Berrangé
-
Rodrigo Prieto
-
rodrigoprieto2019@gmail.com