diff options
author | Cole Robinson <crobinso@redhat.com> | 2022-02-11 15:54:01 -0500 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2022-02-16 12:25:13 -0500 |
commit | 26ecf8a5e3e4721488159605afd10e39f68e6382 (patch) | |
tree | bb5d4405a0e6799d58035d7492e88924bab48ddf /man | |
parent | c57b0f7d46bda79fbb5351ae539b731160989b56 (diff) | |
download | virt-manager-26ecf8a5e3e4721488159605afd10e39f68e6382.tar.gz |
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>
Diffstat (limited to 'man')
-rw-r--r-- | man/virt-install.rst | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/man/virt-install.rst b/man/virt-install.rst index 03438035..47fbe531 100644 --- a/man/virt-install.rst +++ b/man/virt-install.rst @@ -48,7 +48,7 @@ argument, example: virt-install --disk=? Most options are not required. If a suitable --osinfo value is specified or detected, all defaults will be filled in and reported in the terminal -output. If an --osinfo is not specified. minimum required options are --memory, +output. Otherwise, minimum required options are --memory, guest storage (--disk or --filesystem), and an install method choice. @@ -974,14 +974,13 @@ GUEST OS OPTIONS ``--os-variant``, ``--osinfo`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -**Syntax:** ``--osinfo`` [OS_VARIANT|OPT1=VAL1,...] +**Syntax:** ``--osinfo`` [OSNAME|OPT1=VAL1,...] -Optimize the guest configuration for a specific operating system (ex. -'fedora29', 'rhel7', 'win10'). While not required, specifying this -options is HIGHLY RECOMMENDED, as it can greatly increase performance -by specifying virtio among other guest tweaks. +Optimize the guest configuration for a specific operating system. +For most cases, an OS must be specified or detected from the install +media so performance critical features like virtio can be enabled. -The simplest usage is ``--os-variant OS-NAME`` or ``--osinfo OS-NAME``, +The simplest usage is ``--os-variant OSNAME`` or ``--osinfo OSNAME``, for example ``--osinfo fedora32``. The supported suboptions are: ``name=``, ``short-id=`` @@ -1012,17 +1011,23 @@ Some interesting examples: Attempt OS detection from install media, but if that fails, use OSNAME as a fallback. - -By default, virt-install will do ``--osinfo detect=on,name=generic``, -using the detected OS if found, and falling back to the stub ``generic`` -value otherwise, and printing a warning. - If any manual ``--osinfo`` value is specified, the default is -all settings off or unset. +all other settings off or unset. + +By default, virt-install will always attempt ``--osinfo detect=on`` +for appropriate install media. If no OS is detected, we will fail +in certain common cases (x86 KVM for example). This fatal error was +added in 2022. You can work around this by using the fallback example +above, or disabling the ``require`` option. If you just need to get back +to the old non-fatal behavior ASAP, set the environment variable +VIRTINSTALL_OSINFO_DISABLE_REQUIRE=1. Use the command ``virt-install --osinfo list`` to get the list of the accepted OS variants. See ``osinfo-query os`` for even more output. +Note: ``--os-variant`` and ``--osinfo`` are aliases for one another. +``--osinfo`` is the preferred new style naming. + STORAGE OPTIONS |