show_conversion_dialog() hides the VCPU and memory limit warning signs unconditionally. The warning signs and the associated label text(s) can only be displayed later, when the VCPUs or the memory entry changes, and vcpus_or_memory_check_callback() is called.
This is incorrect: we may initialize each of these entries from the physical machine such that it breaks the corresponding limit at once. (The problem can be triggered by reducing MAX_SUPPORTED_VCPUS to (say) 1, and invoking "make run-virt-p2v-directly" on a dual-core (at least) computer.) Therefore call vcpus_or_memory_check_callback() from show_conversion_dialog() immediately, in place of hiding the warning signs unconditionally. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1590721 Signed-off-by: Laszlo Ersek <ler...@redhat.com> Acked-by: Richard W.M. Jones <rjo...@redhat.com> --- Notes: v2: - pick up Rich's ACK gui.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gui.c b/gui.c index 227e41d2516f..5c4f1343095a 100644 --- a/gui.c +++ b/gui.c @@ -973,8 +973,7 @@ show_conversion_dialog (void) /* Show the conversion dialog. */ gtk_widget_show_all (conv_dlg); - gtk_widget_hide (vcpus_warning); - gtk_widget_hide (memory_warning); + vcpus_or_memory_check_callback (NULL, NULL); /* output_drivers may have been updated, so repopulate o_combo. */ repopulate_output_combo (NULL); _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs