This needlessly hits the network too much. The places where it's
important to have up to date info will either manually call pool
refresh, or give the user an refresh button.
We would unconditionally read VM description/hotplug from the inactive
domain XML, this allowed us to emulate metadata hotplug where it wasn't
implemented. However this means we end up doing many needless XMLDesc
calls, which slows down connection startup for low latency connections.
Since SetMetadata has been in libvirt for 2 years now, drop this hack.
Make a new class _OsVariantType which contains only the minimum
information shared between a OS type and an OS variant.
As it is not possible anymore to specify the type as the variant name,
define some alias names.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
libvirt often passes devices with vendor and product information missing or
malformed, making the USB sharing dialog ugly or useless to the point it's
impossible to identify the device.
This aims to fix pretty-printing of weird textural identification and fall
back to numeric product and device id (in case textual represetations are
not present in the descriptor and device is too new to be in device
database).
If the logfile is owned as root, like could happen if the first run of
virt-manager is done via 'su -c' or similar, virt-manager refustes to
start on subsequent runs under reduced privs. Just log an error and
skip the logfile setup if that happens.
Since we already determine the distro store ahead of time via
check_location and detect_distro, cache the result in the installer
class to save us some network traffic.
This streamlines virt-manager and virt-install implementations, requiring
installer.distro_detect to be called if we want distro detection. As
a side effect, we now get CDROM detection for free.
Many old OSes don't have an EOL date tracked with libosinfo, and
we just treat them as 'supported'. So the default distro list in
the create wizard is wayyy too huge and contains all sorts of
crazy options.
Assume lack of EOL date means 'unsupported', and add a manual whitelist
for some still common distros. We will fix this at the libosinfo level.
We used to enable this for Fedora 18+, because systemd would
autostart a getty on /dev/hvc0 which made 'virsh console' work
out of the box for a login prompt. However now in Fedora
virtio-console is compiled as a module, and systemd doesn't
detect it in time to start a getty. So the benefit of using
it as the default is erased, and we reverted to this.
More info: https://bugzilla.redhat.com/show_bug.cgi?id=1039742
The previous setup of having an OS register a preferred videomodel is
overly simplistic and doesn't cover all our needs. Rework it without any
logic change for now, we will alter the logic in subsequent commits.