Commit Graph

64 Commits

Author SHA1 Message Date
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
Giuseppe Scrivano db6d001b0e tests: fix to not fail with libosinfo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-24 12:40:42 +01:00
Giuseppe Scrivano ad0575f731 virtinstall: add some quirks
It also adds aliases for OS names that are different under libosinfo
to maintain backward compatibility.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-24 12:40:42 +01:00
Giuseppe Scrivano 28273e3374 virtinstall: read OSes information from libosinfo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-24 12:40:41 +01:00
Giuseppe Scrivano 517bbad087 virtinstall: allow to redefine typename in _OSVariant
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-24 12:40:41 +01:00
Cole Robinson 19a72a4881 support: Remove negative version handling
We can do it in other ways
2014-02-10 16:14:39 -05:00
Cole Robinson dcd67be2db osdict: Use virtio console and qemu ga for RHEL7 2014-01-18 13:06:09 -05:00
Cole Robinson 962994f72f osdict: RHEL7 has a public beta, so it's 'supported' now 2014-01-18 10:35:55 -05:00
Giuseppe Scrivano 25723f98ae osdict: append "(or later)" to the last version of an OS
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>
2013-12-06 20:18:28 +01:00
Giuseppe Scrivano 2a040ccd17 mass update: remove double spaces from comments
Updated by this script:

find -name '*.py' -exec sed -i "s|^\(#.*[^.?\!]\)  \(.*[^#]\)$|\1 \2|g" \{\} \;

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:31 +01:00
Giuseppe Scrivano 0df75c7603 headers: update "Red Hat, Inc." copyright for the year 2013
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>
2013-10-28 17:22:26 +01:00
Cole Robinson 18fa751059 Add qemu-guest-agent channel automatically for supported OS 2013-10-06 09:19:59 -04:00
Cole Robinson f44ad5ae05 Default to virtio console for supported OS
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
2013-10-06 08:53:05 -04:00
Cole Robinson a2cbb9f500 support: s/CONN_HV/CONN/g
We don't need to distinguish these days.
2013-10-02 16:41:23 -04:00
Oden Eriksson 3118821848 osdict: Add Mandriva Business Server 1 2013-09-26 20:17:24 -04:00
Cole Robinson d49e11dabc urlfetcher: Fix distro lookup short circuiting if os_variant specified 2013-09-26 17:45:02 -04:00
Cole Robinson e52f6050fa qemu ARM support: wire up virtio, fix a bunch of defaults
This has some fallout on non-x86 tests which were wrong to begin with.
There's still some missing bits but this is the jist of it.
2013-08-18 12:30:58 -04:00
Cole Robinson a8858cd366 osdict: Don't run support checks, make the caller do it
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.
2013-08-17 17:53:17 -04:00
Cole Robinson c67bd587b7 osdict: Add solaris 11 (bz 894017) 2013-08-17 10:37:59 -04:00
Cole Robinson 7323b58862 osdict: Add Fedora 20 2013-08-12 13:32:30 -04:00
Cole Robinson 81ce0a1085 osdict: Clean up 'default' handling usage
- 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
2013-08-12 13:31:47 -04:00
Cole Robinson f220e6778c Guest: Drop OS listing helpers, and OS_TYPES back compat 2013-08-11 14:52:30 -04:00
Cole Robinson e07154f997 osdict: Drop solaris back compat bits
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.
2013-08-11 13:52:53 -04:00
Cole Robinson c426d5a16f Guest: Drop os_type, just use single os_variant
Internally the distinction hasn't been valuable for a long time,
so simplify the API here.
2013-08-11 12:39:36 -04:00
Cole Robinson f1bf4c7188 osdict: Allow inheiriting from another OS entry 2013-08-11 12:39:28 -04:00
Cole Robinson 3ef81d5d1e osdict: Convert opencoded dicts to explicit classes
Right now this is a no-op, but will be used to simplify things
further.
2013-08-11 12:39:28 -04:00