mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-26 10:03:54 +03:00
virt-install: Deal with os-variant's install param
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>
This commit is contained in:
parent
cbe84879db
commit
5f7d49d6a3
13
virt-install
13
virt-install
@ -441,6 +441,19 @@ def build_installer(options, guest):
|
|||||||
install_bootdev = None
|
install_bootdev = None
|
||||||
|
|
||||||
has_installer = True
|
has_installer = True
|
||||||
|
if options.os_variant.install == "location":
|
||||||
|
if not options.location:
|
||||||
|
location = guest.osinfo.get_location(guest.os.arch)
|
||||||
|
if not location:
|
||||||
|
logging.debug(_("No location could be guessed from osinfo-db "
|
||||||
|
"and the installation cannot proceed"))
|
||||||
|
# This triggers an error in validate_required_options
|
||||||
|
return None
|
||||||
|
logging.debug("Generated default libosinfo '--location %s'", location)
|
||||||
|
options.location = location
|
||||||
|
elif options.os_variant.install == "cdrom":
|
||||||
|
pass
|
||||||
|
|
||||||
if options.location:
|
if options.location:
|
||||||
(location,
|
(location,
|
||||||
location_kernel,
|
location_kernel,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user