[virt-manager PATCH v2 20/25] unattended: Adapt the installation_source on generate_install_script()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In case a media is passed, the installation should be performed
using the media itself instead of network.

Mind that it doesn't mean that network may not be required when
performing a media installation, it just means that the primary method
to be used is the media.

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 virtinst/unattended.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/virtinst/unattended.py b/virtinst/unattended.py
index dd8e2033..609f5934 100644
--- a/virtinst/unattended.py
+++ b/virtinst/unattended.py
@@ -27,7 +27,9 @@ def generate_install_script(guest, unattended_data, media=None):
     # and install the systems via network.
     guest.osinfo.set_install_script_preferred_injection_method(
             script, "initrd")
-    guest.osinfo.set_install_script_installation_source(script, "network")
+    installation_source = "media" if media else "network"
+    guest.osinfo.set_install_script_installation_source(
+            script, installation_source)
 
     config = guest.osinfo.get_install_script_config(
             script, unattended_data, guest.os.arch, guest.name)
-- 
2.20.1

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux