diff --git a/qubesadmin/tools/qvm_template.py b/qubesadmin/tools/qvm_template.py index b988efca..d058d2ee 100644 --- a/qubesadmin/tools/qvm_template.py +++ b/qubesadmin/tools/qvm_template.py @@ -64,6 +64,8 @@ def qubes_release(): help='Disable signature checks.') parser.add_argument('--allow-pv', action='store_true', help='Allow setting virt_mode to pv in configuration file.') +parser.add_argument('--pool', + help='Specify pool to store created VMs in.') # qvm-template download parser.add_argument('--downloaddir', default='.', help='Override download directory.') @@ -228,6 +230,8 @@ def install(args, app, version_selector=VersionSelector.LATEST, ] if args.allow_pv: cmdline.append('--allow-pv') + if args.pool: + cmdline += ['--pool', args.pool] subprocess.check_call(cmdline + [ 'post-install', name, diff --git a/qubesadmin/tools/qvm_template_postprocess.py b/qubesadmin/tools/qvm_template_postprocess.py index 568cfdea..c6b51f71 100644 --- a/qubesadmin/tools/qvm_template_postprocess.py +++ b/qubesadmin/tools/qvm_template_postprocess.py @@ -53,6 +53,8 @@ help='Do not set installed_by_rpm') parser.add_argument('--allow-pv', action='store_true', help='Allow setting virt_mode to pv in configuration file.') +parser.add_argument('--pool', + help='Specify pool to store created VMs in.') parser.add_argument('action', choices=['post-install', 'pre-remove'], help='Action to perform') parser.add_argument('name', action='store', @@ -259,7 +261,8 @@ def post_install(args): vm = app.add_new_vm('TemplateVM', name=args.name, - label=qubesadmin.config.defaults['template_label']) + label=qubesadmin.config.defaults['template_label'], + pool=args.pool) vm_created = True vm.log.info('Importing data')