diff --git a/dom0/qvm-tools/qvm-start b/dom0/qvm-tools/qvm-start index 1211d265..5ec3c1c5 100755 --- a/dom0/qvm-tools/qvm-start +++ b/dom0/qvm-tools/qvm-start @@ -37,6 +37,8 @@ def main(): help="Do not start the GUId (ignored)") parser.add_option ("--console", action="store_true", dest="debug_console", default=False, help="Attach debugging console to the newly started VM") + parser.add_option ("--drive", dest="drive", default=None, + help="Temporarily attach specified drive as CD/DVD") parser.add_option ("--dvm", action="store_true", dest="preparing_dvm", default=False, help="Do actions necessary when preparing DVM image") @@ -55,6 +57,13 @@ def main(): print >> sys.stderr, "A VM with the name '{0}' does not exist in the system.".format(vmname) exit(1) + if options.drive: + if hasattr(vm, 'drive'): + vm.drive = options.drive + else: + print >> sys.stderr, "This VM does not support attaching drives" + exit (1) + try: vm.verify_files() xid = vm.start(debug_console=options.debug_console, verbose=options.verbose, preparing_dvm=options.preparing_dvm)