mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +03:00
virt-install: Split out show_console_warnings
And only call it once console handling is in play Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
4ef519229d
commit
1676f05a59
@ -319,7 +319,7 @@ def validate_required_options(options, guest, installer):
|
|||||||
fail(msg)
|
fail(msg)
|
||||||
|
|
||||||
|
|
||||||
def _show_nographics_warnings(options, guest, installer):
|
def show_console_warnings(options, guest, installer):
|
||||||
if guest.devices.graphics:
|
if guest.devices.graphics:
|
||||||
return
|
return
|
||||||
if not options.autoconsole:
|
if not options.autoconsole:
|
||||||
@ -350,7 +350,7 @@ def _show_memory_warnings(guest):
|
|||||||
"Were you trying to specify GiB?"), rammb)
|
"Were you trying to specify GiB?"), rammb)
|
||||||
|
|
||||||
|
|
||||||
def show_warnings(options, guest, installer, osdata):
|
def show_guest_warnings(options, guest, osdata):
|
||||||
if options.pxe and not supports_pxe(guest):
|
if options.pxe and not supports_pxe(guest):
|
||||||
log.warning(_("The guest's network configuration does not support "
|
log.warning(_("The guest's network configuration does not support "
|
||||||
"PXE"))
|
"PXE"))
|
||||||
@ -365,7 +365,6 @@ def show_warnings(options, guest, installer, osdata):
|
|||||||
"suffer. Specify an OS with --os-variant for optimal results."))
|
"suffer. Specify an OS with --os-variant for optimal results."))
|
||||||
|
|
||||||
_show_memory_warnings(guest)
|
_show_memory_warnings(guest)
|
||||||
_show_nographics_warnings(options, guest, installer)
|
|
||||||
|
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
@ -568,7 +567,7 @@ def build_guest_instance(conn, options):
|
|||||||
cli.validate_disk(disk)
|
cli.validate_disk(disk)
|
||||||
|
|
||||||
validate_required_options(options, guest, installer)
|
validate_required_options(options, guest, installer)
|
||||||
show_warnings(options, guest, installer, osdata)
|
show_guest_warnings(options, guest, osdata)
|
||||||
|
|
||||||
return guest, installer
|
return guest, installer
|
||||||
|
|
||||||
@ -634,6 +633,8 @@ class WaitHandler:
|
|||||||
|
|
||||||
|
|
||||||
def start_install(guest, installer, options):
|
def start_install(guest, installer, options):
|
||||||
|
show_console_warnings(options, guest, installer)
|
||||||
|
|
||||||
conscb = None
|
conscb = None
|
||||||
if options.autoconsole:
|
if options.autoconsole:
|
||||||
conscb = cli.get_console_cb(guest)
|
conscb = cli.get_console_cb(guest)
|
||||||
|
Loading…
Reference in New Issue
Block a user