Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx> --- virtinst/installer.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/virtinst/installer.py b/virtinst/installer.py index 67cdfb29..cd9e7fc2 100644 --- a/virtinst/installer.py +++ b/virtinst/installer.py @@ -152,6 +152,21 @@ class Installer(object): else: guest.os.bootorder = [] + def _alter_install_resources(self, guest): + if not self._treemedia: + return + if not self._treemedia.requires_internet(): + return + + guest.set_network_install_resources() + + def _restore_resources(self, guest): + if not self._treemedia: + return + if not self._treemedia.requires_internet(): + return + + guest.unset_network_install_resources() ########################## # Internal API overrides # @@ -301,9 +316,11 @@ class Installer(object): data = self._prepare_get_install_xml(guest) try: self._alter_bootconfig(guest) + self._alter_install_resources(guest) ret = guest.get_xml() return ret finally: + self._restore_resources(guest) self._remove_install_cdrom_media(guest) self._finish_get_install_xml(guest, data) -- 2.20.1 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list