virt-manager/virtinst
Cole Robinson 26ecf8a5e3 virt-install: Make missing --osinfo fatal for most cases
This was previously discussed here:
https://listman.redhat.com/archives/virt-tools-list/2020-September/msg00017.html

For the x86 + hvm case, failure to specify an --osinfo/--os-variant
OS, and failure to detect an OS from install media, will now throw
a big error:

```
--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: 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
```

The thread goes into more detail, but basically, for x86 VMs at least,
it's unlikely you will _ever_ want the default 'generic' behavior,
which gives gives no virtio, no PCIe, no usb3, IDE disks, slow
network devices, etc.

Many people use virt-install in scripts and CI, and this may now
cause breakage. The environment variable is there to help them
get things back to normal as quick as possible, but it will still
noisy up their logs with the warning to hopefully get them to make
a useful change to their virt-install invocations.

This is limited to x86, since that's where most of our defaults
historically differ, and where we can depend on libosinfo to give
the most accurate device info. This may be relevant to change for
other KVM architectures in the future.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-16 12:25:13 -05:00
..
devices tests: Add grep= annotation for every invalid test 2022-02-12 11:53:09 -05:00
domain cli: Add --launchSecurity kernelHashes=yes|no 2022-01-26 17:08:27 -05:00
install osdict: Simplify os list sorting 2022-02-12 11:53:09 -05:00
__init__.py i18n: globally install also the ngettext function 2020-07-14 11:24:14 -04:00
_progresspriv.py tests: Add full test coverage for progress text output 2021-06-09 16:52:12 -04:00
buildconfig.py Prep for release 3.2.0 2020-11-14 16:15:22 -05:00
capabilities.py i18n: fix string puzzles in capabilities lookup error msgs 2020-09-17 15:38:42 -04:00
cli.py virt-install: Make missing --osinfo fatal for most cases 2022-02-16 12:25:13 -05:00
cloner.py cloner: Improve error message about unimplemented rbd support 2022-01-26 16:58:45 -05:00
connection.py Fix some pylint, exclude some new warnings 2021-10-04 16:04:33 -04:00
diskbackend.py diskbackend: Restrict format->driver_type even more 2022-01-19 14:21:48 -05:00
domcapabilities.py devices: video: Use virtio default more often 2022-02-03 13:42:49 -05:00
generatename.py generatename: Move libvirt collision handling to callers 2019-06-11 17:54:45 -04:00
guest.py osdict: Drop usb-tablet checking 2022-02-12 12:51:05 -05:00
logger.py tests: abide logging options for clitests 2019-12-11 17:57:28 -05:00
network.py hostnets: Remove SR-IOV info listing 2019-06-16 23:48:51 -04:00
nodedev.py nodedev: Move the CLI string format lookup to cli.py 2022-01-21 13:20:46 -05:00
osdict.py osdict: Drop usb-tablet checking 2022-02-12 12:51:05 -05:00
pollhelpers.py objects: Erase the notion of connkey 2020-09-01 14:27:11 -04:00
progress.py progress: Drop tqdm and revert back to local urlgrabber copy 2021-06-09 16:52:11 -04:00
snapshot.py virtinst: move UI only functions into virtManager 2019-06-09 18:33:45 -04:00
storage.py pylint: Fix some deprecation warnings and minor bits 2022-01-11 12:32:23 -05:00
support.py object: nodedev: support isActive state 2022-01-17 14:37:06 -05:00
uri.py xmlutil: add a diff() helper 2020-09-05 15:49:55 -04:00
virtclone.py Remove shebangs from library paths 2021-06-22 19:54:37 -04:00
virtinstall.py virt-install: Make missing --osinfo fatal for most cases 2022-02-16 12:25:13 -05:00
virtxml.py cli: Recommend --osinfo more over --os-variant 2022-02-12 11:53:09 -05:00
xmlapi.py cli: Add --xml xpath option for virt-install and virt-xml 2020-09-11 15:04:37 -04:00
xmlbuilder.py xmlbuilder: Make embedded device XML print correctly 2021-10-12 15:10:39 -04:00
xmlutil.py xmlutil: add a diff() helper 2020-09-05 15:49:55 -04:00