Some OS entries in libosinfo miss the "recommended" resources block.
In this case use the "minimum" resources when available.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
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>
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.
Do not load the devices data for each OS as most of this data will
will not be used by virt-manager. It makes the "Create new VM" wizard
faster on the first time it is accessed (~0.5s faster on my machine).
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
I've noticed that virt-manager took more time to startup after we
started reading OSes data from libosinfo.
Now the libosinfo data is loaded the first time it is accessed,
without pre-loading it.
This could be further improved by not loading completely an _OsVariant
object but only the data that is requested.
With the lazy load optimization (best of 10 attempts):
$ echo yes | time ./virt-xml --connect __virtinst_test__test:////home/gscrivano/src/virt-manager/tests/testdriver.xml,predictable --confirm test --edit --cpu host-passthrough > /dev/null
0.13user 0.02system 0:00.22elapsed 74%CPU (0avgtext+0avgdata 26756maxresident)k
Without (best of 10 attempts):
$ echo yes | time ./virt-xml --connect __virtinst_test__test:////home/gscrivano/src/virt-manager/tests/testdriver.xml,predictable --confirm test --edit --cpu host-passthrough > /dev/null
1.26user 0.04system 0:01.36elapsed 95%CPU (0avgtext+0avgdata 57996maxresident)k
0inputs+16outputs (0major+17499minor)pagefaults 0swaps
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
It also adds aliases for OS names that are different under libosinfo
to maintain backward compatibility.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
It makes clearer to the user to pick the last version available for an
OS when a newer version is not listed by virt-manager/virt-install.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Updated by this script:
find -name '*.py' -exec sed -i "s|^\(#.*[^.?\!]\) \(.*[^#]\)$|\1 \2|g" \{\} \;
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Ensure that any file touched by a @redhat.com author in 2013 has an
updated copyright header.
The files were updated using the build-aux/update-copyright gnulib
script and manually added where the copyright line wasn't present.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This could cause issues for people trying unattended non-graphical
kickstart installs and expecting ttyS0 in the guest to be hooked
up to the default console. So to get back the default behavior, you
can do:
--console pty
Some ARM bits we are about to add would substantially complicate the
current setup, so move all the logic into guest.py where we can be
more flexible. I think this is closer to what libosinfo will give us
as well.
- Unify looking up osdict values
- Have Guest.py pass in its defaults, not encoding them in osdict
- Explicitly specify every device parameter that osdict handles, rather
than have some psuedo magic dictionary format to handle it
Once upon a time solaris entries has typename="unix", but were moved to
typename="solaris". We maintained a link to the unix type for back compat,
but now the distinction doesn't matter at all, so drop it.