Commit Graph

89 Commits

Author SHA1 Message Date
Cole Robinson 617b92710f osdict: Don't return virtio1.0-net as a valid device name (bug 1399083)
We can't depend on libosinfo device names being valid libvirt network
model names, so use a whitelist

https://bugzilla.redhat.com/show_bug.cgi?id=1399083
2016-12-13 12:58:14 -05:00
Guido Günther a26c656d5c osdict: Debian8 onwards has qemu-ga 2016-10-31 09:07:33 -04:00
Cole Robinson f55772845a osdict: Remove some pylint 2016-08-09 11:53:44 -04:00
Cole Robinson 1d2cd30677 osdict: Fix incorrect usage of virtio input
Regression reported with latest libosinfo, when the OS reports
virtio-input support:

http://www.redhat.com/archives/virt-tools-list/2016-July/msg00109.html

Really our code presently only cares about the USB tablet, so adjust
our libosinfo lookup to explicitly check for it
2016-07-29 13:17:36 -04:00
Andrew Cook 1421772e4e Disable x2apic for solaris 11
Same hack that 10 needs
2016-03-24 14:15:49 -04:00
Marc-André Lureau ea1bd169c1 virtinst: use virtio if spice+gl
Use virtio+accel3d by default whenever spice+gl is chosen. This allows
to easily set up accelerated gpu VM.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-03-09 20:25:37 -05:00
Cole Robinson 8700fda757 urlfetcher: Fix ubuntu url detection with latest libosinfo 2015-11-24 21:59:23 -05:00
Cole Robinson ac6c1df1ac osdict: Remove redundant os name lookup 2015-11-03 16:00:52 -05:00
Cole Robinson b7e073a407 osdict: Disable x2apic for solaris10 (bz 1262093)
It breaks networking:
https://bugzilla.redhat.com/show_bug.cgi?id=1262093
https://bugs.launchpad.net/bugs/1395217
2015-11-03 16:00:52 -05:00
Cole Robinson 4057de13f2 osdict: Use qxl for newer ubuntu
Works better in my testing as explained in the comment
2015-09-23 18:10:40 -04:00
Cole Robinson a538b69356 guest: Remove code for default virtio console
It's been disabled for a while and we don't plan on re-enabling it
2015-09-22 12:41:57 -04:00
Cole Robinson cde2f0ef67 Suppress gi warnings about lack of require_version 2015-09-03 17:31:43 -04:00
Cole Robinson 55b43dcbb8 osdict: Fix unix alias
Needs to point to proper libosinfo name freebsd9.0
2015-08-10 13:01:04 -04:00
Pavel Hrdina 1590490fa3 capabilities: detect ACPI and APIC capabilites properly
Instead of hard-coding that ACPI and APIC are enabled by default, detect
their presence from libvirt capabilities and use it.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1215692

(crobinso: Adjust for recently added test case)

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-14 13:26:42 -04:00
Lin Ma bbc4f83bd3 virtinst: enable qemu_ga for sles-11-sp4 and newer
Qemu guest agent becomes available since sles 11 sp4 distro,
So enable qemu_ga while installing sles11sp4 and newer sles.

Signed-off-by: Lin Ma <lma@suse.com>
2015-05-20 14:01:50 -04:00
Cole Robinson dcfce5585a osdict: If detecting fedora-unknown, convert to latest fedora
That's basically what it is internally for libosinfo, and it helps
us generate better names in virt-manager
2015-04-13 17:07:16 -04:00
Cole Robinson cc3a522455 Use is_pseries() helper more consistently 2015-04-08 09:31:01 -04:00
Cole Robinson af64b79679 osdict: Use is_related_to for support check
Simplifies our whitelist maintenance
2015-04-04 16:08:00 -04:00
Cole Robinson d0c65b30a4 osdict: Simplify a bunch of the checks, drop some legacy stuff 2015-04-04 15:32:35 -04:00
Cole Robinson a7dbc5e250 tests: Add more osdict.py coverage 2015-04-04 14:43:12 -04:00
Cole Robinson ce73272c7e create: Drop hardcoded STABLE_OS_SUPPORT list
It's out of date, and doesn't even seem to work with current RHEL versions
and no one is complaining.

If we want to add it back, it should be an explicit setup.py configure
option.
2015-04-04 13:48:15 -04:00
Cole Robinson 595b5b4bdf osdict: Drop explicit 'type' class
create.py is the only thing that cares about this nowadays, so we can
work with things to make it all simpler.
2015-04-04 12:48:50 -04:00
Cole Robinson bd9ab2d5b5 osdict: Add toplevel OSDB as API entry point
Makes code more readable, and lazy loading simpler.
2015-04-04 12:06:41 -04:00
Cole Robinson f644b0997d osdict: Have users call functions, rather than access properties
Gives us more future flexibility, and simplifies the flow quite a bit.
2015-04-04 11:24:18 -04:00
Cole Robinson 710c588eaf guest: Use cached osdict object for all lookups
Rather than have lookup_osdict_key constantly do the dictionary lookup.

This is step one towards simplifying the osdict lazy loading
2015-04-04 11:23:54 -04:00
Cole Robinson 67b36a086c osdict: Remove unused diskbus field 2014-11-20 10:58:15 -05:00
Cole Robinson 60e62e2676 osdict: Add back compat 'virtio26' entry
We used to have that in the old osdict. Map it to fedora10 which gives
virtio net/block but nothing else, which matches the old behavior.
2014-11-17 10:22:37 -05:00
Cole Robinson 310f65273f osdict: Restrict n-cpus to 1 for machvirt
It fails to boot otherwise
2014-09-23 17:09:36 -04:00
Cole Robinson 30db9ece22 osdict: Add qemu-ga for RHEL6 and RHEL7 guests (bz 1139109) 2014-09-22 17:33:55 -04:00
Cole Robinson e1c803dc7c osdict: Only list latest point release in virt-manager
So only list RHEL6.5, and not 6.4-6.0 as well. That earlier versions
can be seen by selecting 'show all options'
2014-09-22 17:20:07 -04:00
Cole Robinson b3fa8bb650 tests: Ensure osdict.py aliases is never extended 2014-09-21 15:26:03 -04:00
Giuseppe Scrivano 21319c4232 osdict, libosinfo: use "minimum" resources when "recommended" is missing
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>
2014-09-16 09:12:04 +02:00
Giuseppe Scrivano a94cc98238 osdict: merge _OsVariantOsInfo with _OsVariant
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>
2014-09-12 10:36:11 +02:00
Giuseppe Scrivano 1291ffc8b7 osdict: _OsVariantOsInfo._init_ doesn't call _OsVariant._init_
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-12 10:36:11 +02:00
Giuseppe Scrivano cbe5ffcee7 osdict: drop attribute "parent" from _OSVariant
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-12 10:36:11 +02:00
Cole Robinson bfb3174ec2 osdict: Manually tweak 'supported' info
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.
2014-09-07 10:49:50 -04:00
Cole Robinson eb01bc1b61 osdict: Disable virtioconsole default
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
2014-09-06 18:37:20 -04:00
Cole Robinson 7d25dbe7a3 osdict: Always use vmvga for ubuntu
There's been a couple reports recently that virt-manager's default of video
model=qxl doesn't work well with latest ubuntu 14.04:

https://bugzilla.redhat.com/show_bug.cgi?id=1129803
https://lists.fedoraproject.org/pipermail/virt/2014-August/004105.html

However vmvga works, so let's use it for all ubuntu versions and not just a
couple of them. Marc Deslauriers confirmed it should be safe.
2014-09-06 13:45:15 -04:00
Cole Robinson 0759a31acc osdict: Turn videomodel check into a function
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.
2014-09-06 13:45:15 -04:00
Cole Robinson 8ea634f9e4 guest: Enable Hyper-v Enlightenments for Windows VMs
These are the recommended defaults for all windows VMs, when using
a new enough libvirt + kvm. Some more details in this boxes bug report:

https://bugzilla.gnome.org/show_bug.cgi?id=732811
2014-07-07 18:24:40 -04:00
Giuseppe Scrivano b84f8cb406 osdict: fix default value for devices data
commit 4f056dcba9 didn't take into
account the default value.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-05-21 10:09:41 +02:00
Giuseppe Scrivano 4f056dcba9 osdict: lazy load devices data
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>
2014-05-20 08:41:22 +02:00
Cole Robinson 196ff823b3 Fix warnings with latest pep8 2014-05-02 10:20:59 -04:00
Cole Robinson 6ed988ebfc osdict: Prevent traceback in the logs when detection fails 2014-04-25 16:31:00 -04:00
Cole Robinson a398d245cb Clean up pylint integration
- Drop no longer needed disable= bits
- Use string names for all skipped pylint messages
2014-04-02 19:00:24 -04:00
Giuseppe Scrivano 5120b90fc3 osdict: lazy load data from libosinfo
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>
2014-03-29 21:28:50 +01:00
Giuseppe Scrivano a3e1444a28 osdict: handle libosinfo lookup failure
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-26 16:12:13 +01:00
Giuseppe Scrivano af216ebaf6 osdict: add new function lookup_os_by_media
"lookup_os_by_media" fetches the OS of the installation media by
querying libosinfo.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-26 10:51:40 +01:00
Chen Hanxiao e4e39b777d osdict: fix a typo
s/inheiriting/inheriting

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-03-25 22:34:35 +08:00
Giuseppe Scrivano 2374f8458e osdict: expose libosinfo recommended resources for an OS
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-24 12:40:42 +01:00