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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
And pass it down to treemedia, which acts on our script wrapper
object. This is conceptually a bit simpler because we can see in
one place what data feeds the script build process, depending on
installer props
* 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
The reason this was done, is because we need to inject files with
certain names into the initrd/cdrom media so the guest OS can find
them, but our injection infrastructure didn't have the knowledge
necessary to rename files at injection time.
Having to deal with the subdir complicates cleanup and unattended
data generation, so let's do away with it. Teach the injection
bits about renaming, and adjust all the related bits to use
standard tempdirs
- Break out the installer* unattended prep to its own function
- Move logging into common unattended call
- Use libosinfo APIs to generate script str, then we write it
- Move commandline lookup to installertreemedia
- Rename path->scriptpath for clarity
Instead of using "floppy" as the way to perform unattended installations
for Windoes, let's prefer using "cdrom" instead.
The main reasons behind this change are:
- VMs using q35 may have floppy device disabled in some systems;
- We can drop mstools dependency;
Generating the ISO depends on genisofs, tho. However, it's not a big
deal as genisofs is already a virt-manager dependency.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Let's just use mktemp() as done in several other places and avoid the
risk of having the content of the folder overwritten in case of parallel
installations.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
The main differences are:
- Windows unattended installation will be performed via "floppy"
injection instead of "initrd";
- Windows target disk must be a letter ("C", in our case);
- Windows requires a product-key to be passed
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
By using OsinfoMedia.requires_internet() we ensure this logic is not
spread in our codebase and also keep _OsinfoIter internal to osdict.
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>
The installation source, which can be either "media" or "network",
should be properly set depending on whether we're installing from a
media or performing a tree based installation.
We have to mind here that any media that is set as "netinstall" variant
has to have its installation source set accordingly.
An different approach for this would be to generate the script
specifically from the media whenever a media is passed. However, IMO, it
would just add two new codepaths and having the media passed around
without a real gain against the method chosen.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Let's pass the media down to prepare_install_script() as it'll be used
to:
- select the preferred installation source;
- be passed down to the get_install_script() method;
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
The location has to be passed down to the generate_install_script()
method whenever a tree based installation is being performed.
Although Libosinfo provides information about the URL to be used when
performing a tree based installation, cases where the users prefer to
use, for any specific reason, their own URLs should be covered as well.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
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
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>
--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>