From a425873e73a97c5b63da99652b6815540199645b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 31 Jul 2015 02:39:17 +0200 Subject: [PATCH] core: add offline mode to qvm-pci Called on LiveUSB system before libvirtd starts. --- qvm-tools/qvm-pci | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qvm-tools/qvm-pci b/qvm-tools/qvm-pci index e8392be5..80ca4a1f 100755 --- a/qvm-tools/qvm-pci +++ b/qvm-tools/qvm-pci @@ -26,6 +26,8 @@ from optparse import OptionParser import subprocess import os import sys +from qubes.qubes import vmm + def main(): usage = "usage: %prog -l [options] \n"\ @@ -37,6 +39,9 @@ def main(): parser.add_option ("-l", "--list", action="store_true", dest="do_list", default=False) parser.add_option ("-a", "--add", action="store_true", dest="do_add", default=False) parser.add_option ("-d", "--delete", action="store_true", dest="do_delete", default=False) + parser.add_option ("--offline-mode", dest="offline_mode", + action="store_true", default=False, + help="Offline mode") (options, args) = parser.parse_args () if (len (args) < 1): @@ -48,6 +53,9 @@ def main(): print >> sys.stderr, "Only one of -l -a -d is allowed!" exit (1) + if options.offline_mode: + vmm.offline_mode = True + if options.do_add or options.do_delete: qvm_collection = QubesVmCollection() qvm_collection.lock_db_for_writing()