summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/clitest.py5
-rw-r--r--virtinst/install/installertreemedia.py11
2 files changed, 11 insertions, 5 deletions
diff --git a/tests/clitest.py b/tests/clitest.py
index e3a91618..9f373fc4 100644
--- a/tests/clitest.py
+++ b/tests/clitest.py
@@ -1074,9 +1074,8 @@ c.add_valid("--pxe --destroy-on-exit", grep="Restarting guest.\n") # destroy-on
c.add_valid("--pxe --transient --destroy-on-exit", grep="Domain creation completed.") # destroy-on-exit + transient
c.add_valid("--pxe --graphics vnc --noreboot", grep="testsuite console command: ['virt-viewer'") # mock virt-viewer waiting, with noreboot magic
c.add_valid("--nographics --cdrom %(EXISTIMG1)s") # console warning about cdrom + nographics
-c.add_valid("--nographics --console none --location %(TREEDIR)s") # console warning about nographics + --console none
-c.add_valid("--nographics --console none --location %(TREEDIR)s") # console warning about nographics + --console none
-c.add_valid("--nographics --location %(TREEDIR)s") # console warning about nographics + missing extra args
+c.add_valid("--nographics --console none --location %(TREEDIR)s", grep="No --console device added") # console warning about nographics + --console none
+c.add_valid("--nographics --console none --location %(TREEDIR)s", grep="Directory tree installs typically") # warning about directory trees not working well
c.add_valid("--pxe --nographics --transient", grep="testsuite console command: ['virsh'") # --transient handling
diff --git a/virtinst/install/installertreemedia.py b/virtinst/install/installertreemedia.py
index 6ed9ddec..4f8d336c 100644
--- a/virtinst/install/installertreemedia.py
+++ b/virtinst/install/installertreemedia.py
@@ -248,8 +248,15 @@ class InstallerTreeMedia(object):
self._extra_args.append(install_args)
if self._install_kernel_args:
- return self._install_kernel_args
- return " ".join(self._extra_args)
+ ret = self._install_kernel_args
+ else:
+ ret = " ".join(self._extra_args)
+
+ if self._media_type == MEDIA_DIR and not ret:
+ log.warning(_("Directory tree installs typically do not work "
+ "unless extra kernel args are passed to point the "
+ "installer at a network accessible install tree."))
+ return ret
def prepare(self, guest, meter, unattended_script):
fetcher = self._get_fetcher(guest, meter)