diff -r c0b20d1eaaf2 virt-install
--- a/virt-install	Wed Oct 03 15:39:18 2007 -0400
+++ b/virt-install	Thu Oct 04 16:00:34 2007 -0400
@@ -276,6 +276,9 @@ def parse_args():
     # Misc options
     parser.add_option("-d", "--debug", action="store_true", dest="debug", 
                       help=_("Print debugging information"))
+    parser.add_option("", "--nointeract", action="store_false", 
+                      dest="interact", default="true",
+                      help=_("Do not use interactive prompts, just error instead."))
 
 
     (options,args) = parser.parse_args()
@@ -333,6 +336,7 @@ def main():
     options = parse_args()
 
     cli.setupLogging("virt-install", options.debug)
+    cli.set_interaction(options.interact)
     conn = cli.getConnection(options.connect)
     type = None
 
diff -r c0b20d1eaaf2 virtinst/cli.py
--- a/virtinst/cli.py	Wed Oct 03 15:39:18 2007 -0400
+++ b/virtinst/cli.py	Thu Oct 04 16:09:54 2007 -0400
@@ -70,9 +70,19 @@ def getConnection(connect):
 # Prompting
 #
 
-def prompt_for_input(prompt = "", val = None):
+global_interact=True
+
+def set_interaction(val):
+    global global_interact
+    global_interact = val
+
+def prompt_for_input(prompt = "", val = None, interact = None):
     if val is not None:
         return val
+    if interact is None:
+        interact=global_interact
+    if not interact:
+        raise RuntimeError, _("Attempted to prompt for input with interactivity disabled. Prompt was '%s'") % prompt
     print prompt + " ",
     return sys.stdin.readline().strip()
 
