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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
The building process here is mostly independent of the InstallScript
object. Moving it to its own function makes that more clear, makes
InstallScript smaller, and the code is indented less
--unattedend now can be used to perform tree based installations.
The way it's implemented, it takes advantage of the code we currently
have for setting --os-variant install="location|cdrom".
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
As --unattended will take care of generating the install script to be
inject in the initrd and also of the kernel command line to be used
during the installation, we should not mix whatever user is passing as
--initrd-inject or --extra-args when using --unattended.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
In case the InstallerTreeMedia has any unattended_data set, let's just
generate the install script and have everything set up for performing a
unattended installation.
path is appended to the tmpfiles as it's the generated unattended script
and it has to be cleaned up when no longer needed.
cmdline is preppended to the args gotten from _prepare_kernel_url() in
order to be used during the first OS boot (and only there!).
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
unattended_data will be used when we add support for unattended
installations. It'll be passed down to the helper that's responsible for
actually generating the script and the kernel command line to be used
with it during prepare(); nevertheless, the addition does nothing right
now.
Together with the addition of the unattended_data, a setter has been
added.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
generate_install_script() is a helper that will do all the needed
plumbing related to create, populating and generating the install script
and its config.
The method returns the path to the generated install script and the
kernel command line to be used with it.
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>
--unattended is currently a no-op parameter that will be used to perform
unattended installations.
For now, if someone tries to use --unattended virt-install will fail as
the option is still not supported.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
If user renames guest in VM details page before installation starts
there is no need to rename NVRAM file as well.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1667308
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
When cloning a guest in virt-manager the GUI shows a list of disks and
select default cloning policy for every disk. For storage pools where
we know that cloning is not possible we should not select that option
as default one.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1463066
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This fixes virt-xml to return an XML for command:
virt-xml --build-xml --boot os_type=hvm
The VirtCLIParser.parse() expects the _parse() method to return
the parsed object.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Apart from the fact, that 'virtio' is not a valid scsi controller model
the 'has_virtio_scsi' variable is not needed at all. It is used only
in one condition where both 'has_any_scsi' and 'has_virtio_scsi' has to
be false which can happen only if there is no 'scsi' controller defined
by user.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Instead of duplicating the code into CLI and GUI move it into graphics
device file which is used from both places. This also fixes a bug in
virt-xml where changing listen to address was not working.
This also changes behavior to always configure one listen type when
using CLI listen option or GUI. If user wants to modify only specific
listen type they can use listens[] options from CLI.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1565968
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@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>
As os-variant has a new "install" parameter that can be passed, let's
take advantage of it and automatically fill options.location with data
from osinfo-db whenever install=location is passed (and, of course,
osinfo-db has the information).
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
The new "install" parameter receives "location|cdrom" and will be used,
at least for now, to automatically get the URL location of an OS from
osinfo-db.
Signed-off-by: Fabiano Fidêncio <fidencio@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>
Commit 45ab922b2c moved the code to the way it was before the libosinfo
default changes. However, by not setting "options.disk" the parser will
error out and bail the installation as this option must be set. Only
parsing the disk doesn't seem to be enough as the check is actually done
against "options.disk".
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>