From 5291227de3ed74bf3a77808f7263c2d7b450cf37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 1 Nov 2013 02:31:13 +0100 Subject: [PATCH] qvm-tools: qvm-start --install-windows-tools (#41 pro) --- qvm-tools/qvm-start | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qvm-tools/qvm-start b/qvm-tools/qvm-start index 28d5fab1..0ecd063d 100755 --- a/qvm-tools/qvm-start +++ b/qvm-tools/qvm-start @@ -56,6 +56,8 @@ def main(): help="Temporarily attach specified drive as hard disk") parser.add_option ("--cdrom", dest="drive_cdrom", default=None, help="Temporarily attach specified drive as CD/DVD") + parser.add_option ("--install-windows-tools", action="store_true", dest="install_windows_tools", default=False, + help="Attach Windows tools CDROM to the VM") parser.add_option ("--dvm", action="store_true", dest="preparing_dvm", default=False, help="Do actions necessary when preparing DVM image") parser.add_option ("--custom-config", action="store", dest="custom_config", default=None, @@ -82,10 +84,13 @@ def main(): print >> sys.stderr, "A VM with the name '{0}' does not exist in the system.".format(vmname) exit(1) - if bool(options.drive_hd) + bool(options.drive_cdrom) + bool(options.drive) > 1: - print >> sys.stderr, "Only one of --drive, --cdrom, --hddisk can be specified" + if bool(options.drive_hd) + bool(options.drive_cdrom) + bool(options.drive) + bool(options.install_windows_tools) > 1: + print >> sys.stderr, "Only one of --drive, --cdrom, --hddisk, --install-windows-tools can be specified" exit(1) + if options.install_windows_tools: + options.drive = 'cdrom:dom0:/usr/lib/qubes/qubes-windows-tools.iso' + if options.drive_hd: options.drive = 'hd:' + options.drive_hd