IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Init a shared log instance in virtinst/logger.py, and use that
throughout the code base, so we aren't calling directly into
'logging'. This helps protect our logging output from being
cluttered with other library output, as happens with some
'requests' usage
Not sure I want to go down that route if we can avoid it. Instead
just fold the full_id support into the existing option handling.
Streamline the OSVariantData usage throughout the cli tools
Replace the unreleased --os-variant OSNAME,install=location with just
--install OSNAME
Unwind the --unattended dependency on upfront --os-variant while
we are at it, since they are all intertwined. Now we can just do:
virt-install --install OSNAME
and
virt-install --install OSNAME --unattended
* Make all API calls go through the _OsMedia object
* Move most of the unattended specific processing to unattended.py
* Rename requires_internet to is_netinst to clarify what it is checking
If an OS has a <minimum> resources section, and a <recommended>
resources section, but there's a field in the former that isn't in
the latter, currently we throw out the former field entirely. This
is the case for n-cpus for a few OS. Instead we should be using
the <minimum> ncpus value. This changes the default <vcpu> value
for a quite a few test cases.
In case there's no self.osinfo_media, it means the installation won't
happen from the media itself, so it should return "True" (as in, it
requires internet).
Returning "False", though, should be done when no "netinst" variant was
found (but we do have a media).
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Consequently, let's:
- rename urldetect::get_osinfo_media() to get_os_media()
- rename the installertreemedia::_LocationData::osinfo_media to os_media
- rename unattended::prepare_install_script's media argument to os_media
- and also rename media to os_media on its internal
_get_installation_source() method
- rename osdict::get_install_script's media argument to os_media
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
In order to properly do a unattended installation of some medias (as net
installers), we have to check whether the media requires or not
internet. Doing so by checking its variant is not the most beautiful way
(as variants do not have a set of predefined names), but that's the best
that can be done with the current state of osinfo-db.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
The OsMedia class is a wrapper around OsinfoMedia and will help us
to keep the logic of dealing with media related stuff from inside
osdict.py
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
get_network_install_resources() is going to be used when performing a
network based installations where more RAM is needed during the
installation time than the recommended one, which is the case of some
distros as CentOS, RHEL, (some versions of) Silverblue and (some
versions of) Fedora.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
We can use this function to figure out whether the guest OS
supports VirtIO input devices (virtio-tablet, virtio-keyboard
and virtio-mouse).
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
As medias may also have installer scripts associates to themselves and,
in this case, those should be considered instead the OS ones.
More than that, Libosinfo.Media provides an API that tells whether that
specific media supports installer scripts or not and this must be
checked as the first thing. In case no installer script is supported,
let's just error out and abort the installation.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Let's refactor get_install_script() in a way that any addition done in
order to get the install scripts from the media would be cleaner.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
generate_install_script_output() generates the install script,
accordingly to the config passed, in a specific directory.
generate_install_script_cmdline() generates the kernel command line that
has to be used in order to perform the unattended installation.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
As some of the install scripts may act differently depending on whether
the installation is going to be done via the OS media or via network
let's have a wrapper around set_installation_source(), from
Libosinfo.InstallScript, in order to be able to properly set which is
going to be the used installation source.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
As not all unattended installations will be done by the same method,
let's have a wrapper around set_preferred_injection_method(), from
Libosinfo.InstallSript, in order to be able to properly set which is
going to be the preferred injection method for a script.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Let's try to guess the language and keyboard layout from the system's
language.
In case we can't do the guess, let's just let it be and libosinfo will
use the 'en_US' default for both language and keyboard layout.
There's a big issue here, though, that quite often users will *not* have
their keyboard layout matching with the language of their systems and,
unfortunately, I don't see any easy way to detect that unless we totally
rely on GLib.Settings (which, according to my understanding, we can't).
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Let's try to guess the timezone from '/etc/localtime' and use it, if
possible. Otherwise, let's just let it be and libosinfo will use the
default 'America/New_York' one.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
get_install_script_config() method returns an OsinfoInstallScriptConfig
object that's tied to an OsinfoInstallScript object, already configured
based in the info provided by the user and it's ready to be used.
For now, the config will always set the timezome to 'America/New_York'
and the language and keyboard layout to 'en_US'.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
get_install_script() method returns an installer script of a specific
profile type for a specific OS.
In case no OS is defined, None is returned.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
If a distribution has no EOL date set, always consider it supported if
its release status is "rolling".
(crobinso: reformat a bit, appease pylint)
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
get_location() is a new method that returns the osinfo-db tree URL of an
OS, according to the passed architecture.
This method will need some improvement later on once we start having a
specific set of definitions on osinfo-db about what's the type of the OS
we're dealing with (like Server, Desktop, ...).
For now, the new method returns the first URL found without taking into
the consideration the types speficied above.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
guess_os_from_media() has been deprecated for a while and
identify_media() should be used instead.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
This was originally added for fedora to give better names in the UI,
but that's a loose reasoning IMO. The pattern was extended to
other -unknown distros but instead of maintaining that going
forward I'd rather just remove the magic for it.
As some enterprise distros adopted the "unknown" approach in osinfo-db,
and those usually support different versions at the same time, there may
be different "unknown" entries (like rhel-unknown, rhel-8-unknown,
rhel-7-unknown, and so on) for the very same distro.
This situation can easily happen when some ISO matches, for exmaple,
"rhel-unknown" and then the latest one selected would be
"rhel-8-unknown".
In order to avoid this situation from happening, let's just ignore the
"unknown" entries when calling latest_regex().
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Due to OpenSUSE's decision of versioning their OS as 11.x, 12.x, 42.x,
15.x, we have to add a specific check in latest_regex() in order to make
sure we skip the 42.x series in the sorted list of OSes when returning
the OS name to the user.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Currently osinfo-db has "unknown" entries for fedora, opensuse and
asianux. Considering this list may grow even more at some point, let's
just make the check more generic and use it for all of them instead of
keeping it for fedora only.
Changes have also been done in urldetect and tests_url, as those also
used latest_fedora_version().
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Arguments to logging needs to be individual args, otherwise it
fails with "not enough arguments for format string"
Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
There's been various discussions about changing the x86 default
from 'pc' to 'q35' over the years, but it's unlikely to happen
at the qemu or libvirt level for compatibility reasons. So
let's start using it for new enough OS that support it.
At some point in the future it could be a good idea to drop the _aliases
mapping altogether; it will be hard to do so, in case the users are not
informed that they are using a deprecated ID.
(crobinso: Tweak format and message)
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
This is just a big nasty commit.
Turn the OS inspection page into an always available page that
shows the libosinfo name from the domain metadata XML. Use oslist.py
and have it absorb more of the common behavior needed by create.py
and details.py. Add UI tests for it all
We shouldn't concern ourselves with whether the OS supports qemu_ga
out of the box, just set up the channel regardless, as long as
virtio-serial is supported.
This adds the channel for some aarch64 cases which didn't have OS
specified, but that's desired IMO
This case will still work, but be a bit slower, which is fine. Nowadays
-M virt is much better for virt usage and nearly everyone is using that,
so save us the complication. This was really only useful when
bootstrapping arm virt support
The current OS distro selection UI is fairly cumbersome to use. First
you need to decide on a variant, then decide a distro and then look for
the version you want. The list is filtered by default so only a subset
of OS are displayed. So for less common distros you'll then need to
start again and tell it to show all OS to try to find the one you want.
The core problem is that we have an incredibly large list and want to
make it easy for the user to find a specific entry. The modern UI
paradigm for this problem is to provide interactive search with
live updated results. The current UI does provide an interactive search
facility on the OS version results, but you still have to first select a
variant to be able to use the search which is unhelpful.
This patch attempts to better apply the search UI design to the OS selection
problem. We get rid of the notion of variants, distros and version, and
provide a single text entry box in which the user can type a few letters
of the OS name. As they type, a popover displays the matching results
filtered on OS name. By default end of life OS will be hidden, so in
general there will only be a small handful of results left after just
typing a few characters. This makes it very quick to find and select the
desired OS, without needing to provide a mutli-step navigation hierarchy.
https://bugzilla.redhat.com/show_bug.cgi?id=1464306
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
(crobinso: fix some pylint)
The copyright headers in every file were chjanged in this previous commit
commit b6dcee8eb7
Author: Cole Robinson <crobinso@redhat.com>
Date: Tue Mar 20 15:00:02 2018 -0400
Use consistent and minimal license header for every file
Where before this they said "
"either version 2 of the License, or (at your option) any later version."
Now they just say
"GNU GPLv2"
This fixes it to say "GNU GPLv2 or later" again.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Fix all E125:
Continuation line with same indent as next logical line
Also remove ignore options of E125
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
This is now removed in patches on Ubuntu, so seems no longer necessary.
virt-manager-1.3.2/debian/patches/virtinst/use_qxl_for_ubuntu.patch
That patch is also from Marc Deslauriers on 2016-01-28
- pick only the latest version for centos6.x, centos7.x, and
freebsd11.x; the latter two have only one element each currently,
so this is preparing for future versions
- bump the minimum supported version of Fedora to 24
- enable also mageia >= 5, and centos >= 7.0, since they are supported
Hopefully in the future we can reduce these checks (maybe accepting
directly some families), but for now improve our hacks.
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>